Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions apis/duck/v1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@ type SourceStatus struct {
// Source.
// +optional
SinkURI *apis.URL `json:"sinkUri,omitempty"`

// CloudEventAttributes are the specific attributes that the Source uses
// as part of its CloudEvents.
// +optional
CloudEventAttributes []CloudEventAttributes `json:"ceAttributes,omitempty"`
}

// CloudEventAttributes specifies the attributes that a Source
// uses as part of its CloudEvents.
type CloudEventAttributes struct {

// Type refers to the CloudEvent type attribute.
Type string `json:"type,omitempty"`

// Source is the CloudEvents source attribute.
Source string `json:"source,omitempty"`
Comment thread
nachocano marked this conversation as resolved.
}

// IsReady returns true if the resource is ready overall.
Expand Down Expand Up @@ -137,6 +153,10 @@ func (s *Source) Populate() {
Host: "tableflip.dev",
RawQuery: "flip=mattmoor",
}
s.Status.CloudEventAttributes = []CloudEventAttributes{{
Type: "dev.knative.foo",
Source: "http://knative.dev/knative/eventing",
}}
}

// GetListType implements apis.Listable
Expand Down
21 changes: 21 additions & 0 deletions apis/duck/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.