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: 9 Imported by: 0

Documentation

Overview

Package notifications defines basic Listener/Notification support for generic Fleetspeak servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpListener

type HttpListener struct {
	// The address that HttpListener should bind to.
	BindAddress string

	// The address that other servers can find this one at. If unset, a best guess
	// will be set by Start().
	AdvertisedAddress string
	// contains filtered or unexported fields
}

HttpListener is an implementation of the fleetspeak notifications.Listener interface which listens for notifications over HTTP.

The port opened by this listener should not be exposed to public. Only other Fleetspeak servers will need to be able to reach it.

func (*HttpListener) Address

func (l *HttpListener) Address() string

func (*HttpListener) Start

func (l *HttpListener) Start() (<-chan common.ClientID, error)

func (*HttpListener) Stop

func (l *HttpListener) Stop()

type HttpNotifier

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

HttpNotifier is an implementation of the fleetspeak notifications.Notifier interface which is compatible with HttpListener.

func (*HttpNotifier) NewMessageForClient

func (n *HttpNotifier) 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