Skip to content

Commit

Permalink
bump github.com/redhat-cne/sdk-go to v2
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Ding <jackding@gmail.com>
  • Loading branch information
jzding committed Aug 29, 2024
1 parent b538fe0 commit 388a2ef
Show file tree
Hide file tree
Showing 35 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/redhat-cne/sdk-go
module github.com/redhat-cne/sdk-go/v2

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion pkg/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"strings"

"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

const APISchemaVersion = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion pkg/event/event_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

cloudevent "github.com/cloudevents/sdk-go/v2"
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
)

// NewCloudEvent create new cloud event from cloud native events and pubsub
Expand Down
10 changes: 5 additions & 5 deletions pkg/event/event_ce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

ce "github.com/cloudevents/sdk-go/v2"
"github.com/google/uuid"
cneevent "github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/ptp"
cnepubsub "github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/types"
cneeventv1 "github.com/redhat-cne/sdk-go/v1/event"
cneevent "github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/ptp"
cnepubsub "github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
cneeventv1 "github.com/redhat-cne/sdk-go/v2/v1/event"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion pkg/event/event_marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io"

jsoniter "github.com/json-iterator/go"
"github.com/redhat-cne/sdk-go/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/v2/pkg/event/redfish"
)

// WriteJSON writes the in event in the provided writer.
Expand Down
8 changes: 4 additions & 4 deletions pkg/event/event_marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

"github.com/stretchr/testify/require"

"github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/ptp"
"github.com/redhat-cne/sdk-go/pkg/types"
v1 "github.com/redhat-cne/sdk-go/v1/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/ptp"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
v1 "github.com/redhat-cne/sdk-go/v2/v1/event"
)

func TestMarshal(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/event/event_unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

jsoniter "github.com/json-iterator/go"

"github.com/redhat-cne/sdk-go/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

var iterPool = sync.Pool{
Expand Down
6 changes: 3 additions & 3 deletions pkg/event/event_unmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/google/go-cmp/cmp"
"github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/ptp"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/ptp"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

func TestUnMarshal(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/event/event_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"time"

"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

var _ Writer = (*Event)(nil)
Expand Down
10 changes: 5 additions & 5 deletions pkg/event/redfish/event_ce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

ce "github.com/cloudevents/sdk-go/v2"
"github.com/google/uuid"
cneevent "github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/redfish"
cnepubsub "github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/types"
cneeventv1 "github.com/redhat-cne/sdk-go/v1/event"
cneevent "github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/redfish"
cnepubsub "github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
cneeventv1 "github.com/redhat-cne/sdk-go/v2/v1/event"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
6 changes: 3 additions & 3 deletions pkg/event/redfish/event_marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"testing"
"time"

"github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
"github.com/stretchr/testify/require"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/event/redfish/event_unmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"testing"
"time"

"github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/redfish"
"github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/redfish"
"github.com/stretchr/testify/require"

"github.com/google/go-cmp/cmp"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

func TestUnMarshal(t *testing.T) {
Expand Down
18 changes: 9 additions & 9 deletions pkg/protocol/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ import (
"syscall"
"time"

"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"

"github.com/redhat-cne/sdk-go/pkg/errorhandler"
"github.com/redhat-cne/sdk-go/v2/pkg/errorhandler"

"github.com/gorilla/mux"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/pkg/util/wait"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/util/wait"

cloudevents "github.com/cloudevents/sdk-go/v2"
httpClient "github.com/cloudevents/sdk-go/v2/client"
cehttp "github.com/cloudevents/sdk-go/v2/protocol/http"
httpP "github.com/cloudevents/sdk-go/v2/protocol/http"
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/pkg/localmetrics"
"github.com/redhat-cne/sdk-go/pkg/protocol"
"github.com/redhat-cne/sdk-go/pkg/subscriber"
subscriberApi "github.com/redhat-cne/sdk-go/v1/subscriber"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/localmetrics"
"github.com/redhat-cne/sdk-go/v2/pkg/protocol"
"github.com/redhat-cne/sdk-go/v2/pkg/subscriber"
subscriberApi "github.com/redhat-cne/sdk-go/v2/v1/subscriber"
log "github.com/sirupsen/logrus"
)

Expand Down
12 changes: 6 additions & 6 deletions pkg/protocol/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
"github.com/cloudevents/sdk-go/v2/event"
cetypes "github.com/cloudevents/sdk-go/v2/types"
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/channel"
cneevent "github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/event/ptp"
ceHttp "github.com/redhat-cne/sdk-go/pkg/protocol/http"
"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
cneevent "github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/event/ptp"
ceHttp "github.com/redhat-cne/sdk-go/v2/pkg/protocol/http"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/protocol/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"

cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
)

// Binder ...protocol binder base struct
Expand Down
4 changes: 2 additions & 2 deletions pkg/pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package pubsub
import (
"strings"

"github.com/redhat-cne/sdk-go/pkg/common"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/common"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

// PubSub represents the canonical representation of a Cloud Native Event Publisher and Sender .
Expand Down
2 changes: 1 addition & 1 deletion pkg/pubsub/pubsub_unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"sync"

jsoniter "github.com/json-iterator/go"
"github.com/redhat-cne/sdk-go/pkg/common"
"github.com/redhat-cne/sdk-go/v2/pkg/common"
)

var iterPool = sync.Pool{
Expand Down
2 changes: 1 addition & 1 deletion pkg/pubsub/pubsub_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"regexp"
"strings"

"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

var _ Writer = (*PubSub)(nil)
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package store
import (
"sync"

"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
)

// PubSubStore defines pub/sub store struct
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/subscriber/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/google/uuid"

"github.com/redhat-cne/sdk-go/pkg/subscriber"
"github.com/redhat-cne/sdk-go/v2/pkg/subscriber"
)

// Store defines subscribers connection store struct
Expand Down
8 changes: 4 additions & 4 deletions pkg/subscriber/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (

"github.com/google/uuid"

"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"

"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/store"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/store"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

// Status of the client connections
Expand Down
4 changes: 2 additions & 2 deletions pkg/subscriber/subscriber_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package subscriber

import (
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/store"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/store"
)

// Copyright 2022 The Cloud Native Events Authors
Expand Down
4 changes: 2 additions & 2 deletions pkg/subscriber/subscriber_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package subscriber
import (
cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/pkg/store"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/store"
)

var _ Reader = (*Subscriber)(nil)
Expand Down
4 changes: 2 additions & 2 deletions pkg/subscriber/subscriber_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/google/uuid"

"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

var _ Writer = (*Subscriber)(nil)
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/timestamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"
"time"

"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
"github.com/stretchr/testify/require"

"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/uri_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

func TestParseURL(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/wait/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"sync"
"time"

"github.com/redhat-cne/sdk-go/pkg/util/clock"
"github.com/redhat-cne/sdk-go/v2/pkg/util/clock"
log "github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/wait/wait_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/redhat-cne/sdk-go/pkg/util/clock"
"github.com/redhat-cne/sdk-go/v2/pkg/util/clock"
)

func TestUntil(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions v1/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/pkg/event"
"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/event"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
)

// PublishCloudEventToLog ... publish event data to a log
Expand Down
8 changes: 4 additions & 4 deletions v1/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (

"github.com/google/uuid"

"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/types"

cloudevents "github.com/cloudevents/sdk-go/v2"
"github.com/redhat-cne/sdk-go/pkg/channel"
"github.com/redhat-cne/sdk-go/pkg/errorhandler"
cneHTTP "github.com/redhat-cne/sdk-go/pkg/protocol/http"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
"github.com/redhat-cne/sdk-go/v2/pkg/errorhandler"
cneHTTP "github.com/redhat-cne/sdk-go/v2/pkg/protocol/http"
log "github.com/sirupsen/logrus"
)

Expand Down
4 changes: 2 additions & 2 deletions v1/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package http_test
import (
"testing"

"github.com/redhat-cne/sdk-go/pkg/channel"
api "github.com/redhat-cne/sdk-go/v1/http"
"github.com/redhat-cne/sdk-go/v2/pkg/channel"
api "github.com/redhat-cne/sdk-go/v2/v1/http"
"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions v1/pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
log "github.com/sirupsen/logrus"

"github.com/google/uuid"
"github.com/redhat-cne/sdk-go/pkg/pubsub"
"github.com/redhat-cne/sdk-go/pkg/store"
"github.com/redhat-cne/sdk-go/pkg/types"
"github.com/redhat-cne/sdk-go/v2/pkg/pubsub"
"github.com/redhat-cne/sdk-go/v2/pkg/store"
"github.com/redhat-cne/sdk-go/v2/pkg/types"
)

// API ... api methods for publisher subscriber
Expand Down
Loading

0 comments on commit 388a2ef

Please sign in to comment.