pubsub

package
v0.0.0-...-9c1c3c2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var V1 = struct {
	Publish EventType
}{
	Publish: "google.cloud.pubsub.topic.v1.messagePublished",
}

Functions

This section is empty.

Types

type Event

type Event struct {
	EventID string  `json:"eventId"`
	Data    Message `json:"data"`
}

type EventType

type EventType string
const MessagePublished EventType = "google.pubsub.topic.publish"

type Function

type Function struct {
	EventType EventType
	Topic     string
	Region    string
	RunWith   runwith.Options
	Callback  interface{}
}

func Topic

func Topic(topicId string) Function

func (Function) AddBackendDescription

func (p Function) AddBackendDescription(symbolName string, b *runtime.Backend)

func (Function) OnPublish

func (p Function) OnPublish(callback interface{}) Function

func (Function) RunWithOptions

func (p Function) RunWithOptions(options runwith.Options) Function

func (Function) Validate

func (p Function) Validate() error

type Message

type Message struct {
	Data       interface{}       `json:"data"`
	Attributes map[string]string `json:"attributes"`
}

Jump to

Keyboard shortcuts

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