Skip to content

Commit

Permalink
Set Event Source according to O-RAN Spec (redhat-cne#98)
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Ding <[email protected]>
  • Loading branch information
jzding authored Jul 16, 2024
1 parent f435c15 commit 19a18fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/event/event_ce.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func (e *Event) NewCloudEvent(ps *pubsub.PubSub) (*cloudevent.Event, error) {
}

// NewCloudEvent create new cloud event from cloud native events and pubsub
func (e *Event) NewCloudEventV2(ps *pubsub.PubSub) (*cloudevent.Event, error) {
func (e *Event) NewCloudEventV2() (*cloudevent.Event, error) {
ce := cloudevent.NewEvent(cloudevent.VersionV1)
ce.SetTime(e.GetTime())
ce.SetType(e.Type)
ce.SetSource(ps.Resource) // bus address
ce.SetSource(e.Source)
ce.SetSpecVersion(cloudevent.VersionV1)
ce.SetID(uuid.New().String())
if err := ce.SetData("", e.GetData()); err != nil {
Expand Down

0 comments on commit 19a18fd

Please sign in to comment.