outputs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Outputs = map[string]Creator{}

Outputs registry

Functions

func Add

func Add(name string, creator Creator)

Add output to the registry

Types

type Creator

type Creator func() Output

Creator function for an output

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager used to handle outputs worker

func NewOutputsManager

func NewOutputsManager(outputs []Output) (*Manager, error)

NewOutputsManager create an outputs manager

func (*Manager) SendEvent

func (m *Manager) SendEvent(event events.Event)

SendEvent sent event to all outputs

func (*Manager) Shutdown

func (m *Manager) Shutdown()

Shutdown stop the manager

type Output

type Output interface {
	// Connect to the Output
	Connect() error
	// Close any connections to the Output
	Close() error
	// SendEvent sent event to the Output
	SendEvent(evt events.Event) error
}

Output writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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