event

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker added in v0.3.0

type Broker interface {
	Publisher
	Subscriber
}

A Broker publishes events and subscribes to them.

func NewNopBroker added in v0.3.0

func NewNopBroker() Broker

NewNopBroker returns a broker that does nothing.

type Publisher

type Publisher interface {
	Publish(context.Context, []byte) error
}

A Publisher broadcasts events to a topic.

type Subscriber added in v0.2.3

type Subscriber interface {
	Subscribe(topic string, handler func(context.Context, []byte)) error
}

A Subscriber registers event handlers for events received on a topic.

type TaskQueued added in v0.2.3

type TaskQueued struct {
	Target      *ent.Target
	Task        *ent.Task
	Credentials []*ent.Credential
	Tags        []*ent.Tag
}

TaskQueued is a struct used to serialize a Task Queued event to pubsub

Jump to

Keyboard shortcuts

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