notifications

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package notifications defines the plugin interface for components which allow the fleetspeak servers within an installation to notify each other about interesting events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener interface {
	// Start causes the Listener to begin listening for notifications. Once
	// started, should write to ids every time it is notified that there may be
	// new messages for a client.
	Start() (<-chan common.ClientID, error)

	// Stop causes the Listener to stop listening for notifications and close the
	// ids channel.
	Stop()

	// Address returns the address of this listener. These addresses must be
	// suitable to pass as a target to any Notifier compatible with this Listener.
	// Will only be called after Start().
	Address() string
}

type Notifier

type Notifier interface {
	// NewMessageForClient indicates that one or more messages have been written
	// and notifies the provided target of this.
	NewMessageForClient(ctx context.Context, target string, id common.ClientID) error
}

Jump to

Keyboard shortcuts

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