stream

package
v0.0.0-...-4cf80b3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: GPL-3.0 Imports: 7 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultSubscriptionConfig

func GetDefaultSubscriptionConfig(topic *pubsub.Topic, retentionDuration time.Duration) pubsub.SubscriptionConfig

GetDefaultSubscriptionConfig TODO fill in better defaults - make duration deployment dependant

func PublishProtoToTopic

func PublishProtoToTopic(m proto.Message, encoding pubsub.SchemaEncoding, topic *pubsub.Topic) (*string, error)

func PublishToTopic

func PublishToTopic(m interface{}, topic *pubsub.Topic) (*string, error)

PublishToTopic just wraps json marshalling of an interface and Publish to a google pubsub Topic returning the result of the Publish method

Types

type BrokerDevice

type BrokerDevice struct {
	Source    string
	DeviceUID string
}

type SimpleMessage

type SimpleMessage struct {
	BrokerDevice
	Payload []byte
	Time    time.Time
}

Jump to

Keyboard shortcuts

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