listeners

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Listeners = make(map[uuid.UUID]*Listener)

Listeners contains all of the instantiated Listener objects

Functions

func Exists

func Exists(name string) bool

Exists determines if the Listener has already been instantiated

func GetList

func GetList() func(string) []string

GetList returns a list of Listeners that exist and is used for command line tab completion

func GetListenerOptions

func GetListenerOptions(protocol string) map[string]string

GetListenerOptions gets a map of all configurable module options

func GetListenerOptionsCompleter

func GetListenerOptionsCompleter(protocol string) func(string) []string

GetListenerOptionsCompleter gets an array of listener options to be used for tab completion for CLI tab completion

func GetListenerTypes

func GetListenerTypes() []string

GetListenerTypes returns a list of listener types that Merlin supports

func GetListenerTypesCompleter

func GetListenerTypesCompleter() func(string) []string

GetListenerTypesCompleter returns a list of listener types that Merlin supports for CLI tab completion

func RemoveByID

func RemoveByID(id uuid.UUID) error

RemoveByID deletes a Listener from the global list of Listeners by the input UUID

Types

type Listener

type Listener struct {
	ID          uuid.UUID               // Unique identifier for the Listener object
	Name        string                  // Name of the listener
	Description string                  // A description of the listener
	Server      servers.ServerInterface // Interface to interact with server objects
}

Listener is a structure for created Merlin listener with an embedded Server object

func GetListenerByID

func GetListenerByID(id uuid.UUID) (*Listener, error)

GetListenerByID finds and returns a pointer to an instantiated listener object by its ID (UUIDv4)

func GetListenerByName

func GetListenerByName(name string) (*Listener, error)

GetListenerByName finds and returns a pointer to an instantiated listener object by its name (string)

func GetListeners

func GetListeners() []Listener

GetListeners is used to return a list of Listener objects to be consumed by a client application

func New

func New(options map[string]string) (*Listener, error)

New instantiates a Listener object

func (*Listener) GetConfiguredOptions

func (l *Listener) GetConfiguredOptions() map[string]string

GetConfiguredOptions returns the server's current configuration for options that can be set by the user

func (*Listener) Restart

func (l *Listener) Restart(options map[string]string) error

Restart creates a new server instance because http servers can not be reused after they are stopped

func (*Listener) SetOption

func (l *Listener) SetOption(option string, value string) error

SetOption sets the value for a configurable option on the Listener

Jump to

Keyboard shortcuts

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