events

package
v0.9.0-rc.30 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDelay added in v0.9.0

func WithDelay(duration time.Duration) func(*v1.EventPublishRequest)

WithDelay - Delay event publishing by the given duration

Types

type Event

type Event struct {
	Payload     map[string]interface{} `json:"payload"`
	PayloadType string                 `json:"payloadType"`
	ID          string                 `json:"id"`
}

type Events

type Events interface {
	// Topic - Retrieve a Topic reference
	Topic(name string) Topic
	// Topics - Retrievs a list of available Topic references
	Topics() ([]Topic, error)
}

Events

func New

func New() (Events, error)

New - Construct a new Eventing Client with default options

type PublishOption added in v0.9.0

type PublishOption = func(*v1.EventPublishRequest)

type Topic

type Topic interface {
	// Name returns the Topic name.
	Name() string

	// Publish will publish the provided events on the topic.
	Publish(*Event, ...PublishOption) (*Event, error)
}

Topic for pub/sub async messaging.

Jump to

Keyboard shortcuts

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