broker

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventArrivalTime is used to access the metadata stored on a
	// CloudEvent to measure the time difference between when an event is
	// received on a broker and before it is dispatched to the trigger function.
	// The format is an RFC3339 time in string format. For example: 2019-08-26T23:38:17.834384404Z.
	EventArrivalTime = "knativearrivaltime"

	// TraceParent is a documented extension for CloudEvent to include traces.
	// https://github.com/cloudevents/spec/blob/v0.3/extensions/distributed-tracing.md#traceparent
	// The format is: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01,
	// which stands for version("00" is the current version)-traceID-spanID-trace options
	TraceParent = "traceparent"
)
View Source
const (
	// V03TTLAttribute is the name of the CloudEvents 0.3 extension attribute used to store the
	// Broker's TTL (number of times a single event can reply through a Broker continuously). All
	// interactions with the attribute should be done through the GetTTL and SetTTL functions.
	V03TTLAttribute = "knativebrokerttl"
)

Variables

This section is empty.

Functions

func ExtractPassThroughHeaders added in v0.9.0

func ExtractPassThroughHeaders(tctx cloudevents.HTTPTransportContext) http.Header

ExtractPassThroughHeaders extracts the headers that are in the `forwardHeaders` set or has any of the prefixes in `forwardPrefixes`.

func GetTTL added in v0.6.1

func GetTTL(ctx cloudevents.EventContext) (interface{}, string)

GetTTL finds the TTL in the EventContext using a case insensitive comparison for the key. The second return param, is the case preserved key that matched. Depending on the encoding/transport, the extension case could be changed.

func SendingContext

func SendingContext(ctx context.Context, tctx cloudevents.HTTPTransportContext, targetURI *url.URL) context.Context

SendingContext creates the context to use when sending a Cloud Event with ceclient.Client. It sets the target and attaches a filtered set of headers from the initial request.

func SetTTL

func SetTTL(ctx cloudevents.EventContext, ttl interface{}) (cloudevents.EventContext, error)

SetTTL sets the TTL into the EventContext. ttl should be a positive integer.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL