Documentation ¶
Index ¶
- Constants
- Variables
- func CloudEventData(source, eventType string, encoding binding.Encoding) map[string]interface{}
- func CloudEventMode(encoding binding.Encoding) string
- func ExtractLegacyTypeFromSubscriptionV1Alpha2Type(eventVersion, eventType string, typeMatching eventingv1alpha2.TypeMatching) string
- func ExtractVersionFromEventType(eventType string) string
- func Is2XX(statusCode int) bool
- func LegacyEventData(source, eventType string) string
- func LegacyEventPayload(id, eventVersion, eventType, data string) string
- func NewCloudEvent(eventSource, eventType string, encoding binding.Encoding) (*cloudevents.Event, error)
- func NewLegacyEvent(eventSource, eventType string, typeMatching eventingv1alpha2.TypeMatching) (string, string, string, string)
- type Publisher
- func (p *Publisher) LegacyPublishEndpoint(source string) string
- func (p *Publisher) PublishEndpoint() string
- func (p *Publisher) SendCloudEvent(event *cloudevents.Event, encoding binding.Encoding) error
- func (p *Publisher) SendCloudEventWithRetries(event *cloudevents.Event, encoding binding.Encoding, attempts int, ...) error
- func (p *Publisher) SendLegacyEvent(source, eventType, payload string) error
- func (p *Publisher) SendLegacyEventWithRetries(source, eventType, payload string, attempts int, interval time.Duration) error
- type SinkClient
- type SinkEvent
- type TestSubscriptionInfo
Constants ¶
View Source
const ( LegacyPublishEndpointFormat = "%s/%s/v1/events" CloudEventPublishEndpointFormat = "%s/publish" )
View Source
const (
EventsEndpointFormat = "%s/events/%s"
)
Variables ¶
View Source
var ( ErrFailedSendingCE = errors.New("failed to send cloudevent") ErrEncodingNotSupported = errors.New("unsupported cloudevent encoding") )
Functions ¶
func CloudEventData ¶
func CloudEventMode ¶
func ExtractLegacyTypeFromSubscriptionV1Alpha2Type ¶
func ExtractLegacyTypeFromSubscriptionV1Alpha2Type(eventVersion, eventType string, typeMatching eventingv1alpha2.TypeMatching) string
func LegacyEventData ¶
func LegacyEventPayload ¶
func NewCloudEvent ¶
func NewLegacyEvent ¶
func NewLegacyEvent(eventSource, eventType string, typeMatching eventingv1alpha2.TypeMatching) (string, string, string, string)
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func (*Publisher) LegacyPublishEndpoint ¶
func (*Publisher) PublishEndpoint ¶
func (*Publisher) SendCloudEvent ¶
func (*Publisher) SendCloudEventWithRetries ¶
func (*Publisher) SendLegacyEvent ¶
type SinkClient ¶
type SinkClient struct {
// contains filtered or unexported fields
}
func NewSinkClient ¶
func (*SinkClient) EventsEndpoint ¶
func (sc *SinkClient) EventsEndpoint(id string) string
func (*SinkClient) GetEventFromSink ¶
func (sc *SinkClient) GetEventFromSink(eventID string) (*SinkEvent, error)
func (*SinkClient) GetEventFromSinkWithRetries ¶
type TestSubscriptionInfo ¶
type TestSubscriptionInfo struct { Name string Description string TypeMatching eventingv1alpha2.TypeMatching Source string Types []string }
func (TestSubscriptionInfo) ToSubscriptionV1Alpha2 ¶
func (s TestSubscriptionInfo) ToSubscriptionV1Alpha2(sink, namespace string) *eventingv1alpha2.Subscription
Click to show internal directories.
Click to hide internal directories.