events

package
v0.0.0-...-f96b470 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package events is the definition for event consumer & producer.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownConsumerType = fmt.Errorf("unknown consumer type")

ErrUnknownConsumerType is returned when the consumer type is unknown.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	// Consume consumes a message from the queue.
	Consume() error
	// Shutdown shuts down the consumer.
	Shutdown(ctx context.Context) error
}

Consumer consumes messages from the queue.

type Producer

type Producer[T any] interface {
	// Produce produces a message to the queue.
	Produce(ctx context.Context, runID T) error
}

Producer produces messages to the queue.

Directories

Path Synopsis
Package completions initialises the completions event stream consumer and producer.
Package completions initialises the completions event stream consumer and producer.
Package local implements the local event stream for runs.
Package local implements the local event stream for runs.
Package runs initialises the runs event stream consumer and producer.
Package runs initialises the runs event stream consumer and producer.

Jump to

Keyboard shortcuts

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