gcppubsub

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// ProjectID is the pre-existing gcp project id to use.
	ProjectID string
	// TopicID is the pre-existing gcp pub/sub topic id to use.
	TopicID string
	// SubscriptionID is the pre-existing gcp pub/sub subscription id to use.
	SubscriptionID string
	// SinkURI is the URI messages will be forwarded on to.
	SinkURI string
	// TransformerURI is the URI messages will be forwarded on to for any transformation
	// before they are sent to SinkURI.
	TransformerURI string
	// contains filtered or unexported fields
}

Adapter implements the GCP Pub/Sub adapter to deliver Pub/Sub messages from a pre-existing topic/subscription to a Sink.

func (*Adapter) Start

func (a *Adapter) Start(ctx context.Context) error

type PubSubMessage

type PubSubMessage interface {
	Ack()
	Nack()
	ID() string
	PublishTime() time.Time
	Data() []byte

	Message() *pubsub.Message
}

type PubSubMessageWrapper

type PubSubMessageWrapper struct {
	M *pubsub.Message
}

func (*PubSubMessageWrapper) Ack

func (w *PubSubMessageWrapper) Ack()

func (*PubSubMessageWrapper) Data

func (w *PubSubMessageWrapper) Data() []byte

func (*PubSubMessageWrapper) ID

func (w *PubSubMessageWrapper) ID() string

func (*PubSubMessageWrapper) Message

func (w *PubSubMessageWrapper) Message() *pubsub.Message

func (*PubSubMessageWrapper) Nack

func (w *PubSubMessageWrapper) Nack()

func (*PubSubMessageWrapper) PublishTime

func (w *PubSubMessageWrapper) PublishTime() time.Time

Jump to

Keyboard shortcuts

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