Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTransportContext ¶
func WithTransportContext(ctx context.Context, tcxt TransportContext) context.Context
WithTransportContext return a context with the given TransportContext into the provided context object.
Types ¶
type TransportContext ¶
type TransportContext struct { ID string PublishTime time.Time Project string Topic string Subscription string Method string // push or pull }
TransportContext allows a Receiver to understand the context of a request.
func NewTransportContext ¶
func NewTransportContext(project, topic, subscription, method string, msg *pubsub.Message) TransportContext
NewTransportContext creates a new TransportContext from a pubsub.Message.
func TransportContextFrom ¶
func TransportContextFrom(ctx context.Context) TransportContext
TransportContextFrom pulls a TransportContext out of a context. Always returns a non-nil object.
func (TransportContext) String ¶
func (tx TransportContext) String() string
String generates a pretty-printed version of the resource as a string.
Click to show internal directories.
Click to hide internal directories.