gcppubsub

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(conf Config) (handler.Handler, error)

NewHandler creates a new Pub/Sub handler.

Types

type Config

type Config struct {
	CredentialsFile string `mapstructure:"credentials_file"`
	ProjectID       string `mapstructure:"project_id"`
	TopicName       string `mapstructure:"topic_name"`
}

Config holds the GCP Pub/Sub integration configuration.

type Handler

type Handler struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Handler implements a Google Cloud Pub/Sub handler.

func (*Handler) Close

func (h *Handler) Close() error

Close closes the handler.

func (*Handler) DataDownChan

func (h *Handler) DataDownChan() chan handler.DataDownPayload

DataDownChan return nil.

func (*Handler) SendACKNotification

func (h *Handler) SendACKNotification(pl handler.ACKNotification) error

SendACKNotification sends an ack notification.

func (*Handler) SendDataUp

func (h *Handler) SendDataUp(pl handler.DataUpPayload) error

SendDataUp sends an uplink data payload.

func (*Handler) SendErrorNotification

func (h *Handler) SendErrorNotification(pl handler.ErrorNotification) error

SendErrorNotification sends an error notification.

func (*Handler) SendJoinNotification

func (h *Handler) SendJoinNotification(pl handler.JoinNotification) error

SendJoinNotification sends a join notification.

func (*Handler) SendLocationNotification

func (h *Handler) SendLocationNotification(pl handler.LocationNotification) error

SendLocationNotification sends a location notification.

func (*Handler) SendStatusNotification

func (h *Handler) SendStatusNotification(pl handler.StatusNotification) error

SendStatusNotification sends a status notification.

Jump to

Keyboard shortcuts

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