Documentation ¶
Overview ¶
Package converters contains pubsub message to cloudevent converters used by pubsub-based source.
Index ¶
Constants ¶
View Source
const (
CloudAuditLogsConverter = "com.google.cloud.auditlogs"
)
View Source
const (
CloudSchedulerConverter = "com.google.cloud.scheduler"
)
View Source
const (
CloudStorageConverter = "com.google.cloud.storage"
)
Variables ¶
This section is empty.
Functions ¶
func Convert ¶
func Convert(ctx context.Context, msg *cepubsub.Message, sendMode ModeType, converterType string) (*cloudevents.Event, error)
Convert converts a message off the pubsub format to a source specific if there's a registered handler for the type in the converters map. If there's no registered handler, a default Pubsub one will be used.
Types ¶
type ModeType ¶
type ModeType string
ModeType is the type for mode enum.
const ( // Binary mode is binary encoding. Binary ModeType = "binary" // Structured mode is structured encoding. Structured ModeType = "structured" // Push mode emulates Pub/Sub push encoding. Push ModeType = "push" // DefaultSendMode is the default choice. DefaultSendMode = Binary // The key used in the message attributes which defines the converter type. KnativeGCPConverter = "knative-gcp" )
type UnknownMsg ¶ added in v0.12.0
func (*UnknownMsg) ProtoMessage ¶ added in v0.12.0
func (m *UnknownMsg) ProtoMessage()
func (*UnknownMsg) Reset ¶ added in v0.12.0
func (m *UnknownMsg) Reset()
func (*UnknownMsg) String ¶ added in v0.12.0
func (m *UnknownMsg) String() string
Click to show internal directories.
Click to hide internal directories.