package
0.10.2
Repository: https://github.com/hashicorp/serf.git
Documentation: pkg.go.dev

# Functions

Create creates a new agent, potentially returning an error.
DecodeConfig reads the configuration from the given reader in JSON format and decodes it into a proper Config structure.
DefaultConfig contains the defaults for configurations.
LevelFilter returns a LevelFilter that is configured with the log levels that we use.
MarshalTags is a utility function which takes a map of tag key/value pairs and returns the same tags as strings in 'key=value' format.
MergeConfig merges two configurations together to make a single new configuration.
NewAgentIPC is used to create a new Agent IPC handler.
NewAgentMDNS is used to create a new AgentMDNS.
NewLogWriter creates a logWriter with the given buffer capacity.
ParseEventFilter a string with the event type filters and parses it into a series of EventFilters if it can.
ParseEventScript takes a string in the format of "type=script" and parses it into an EventScript struct, if it can.
ReadConfigPaths reads the paths in the given order to load configurations.
UnmarshalTags is a utility function which takes a slice of strings in key=value format and returns them as a tag mapping.
ValidateLevelFilter verifies that the log levels within the filter are valid.

# Constants

This is the default port that we use for Serf communication.
No description provided by the author
No description provided by the author

# Structs

Agent starts and manages a Serf instance, adding some niceties on top of Serf such as storing logs that you can later retrieve, and invoking EventHandlers when events occur.
No description provided by the author
AgentMDNS is used to advertise ourself using mDNS and to attempt to join peers periodically using mDNS queries.
Command is a Command implementation that runs a Serf agent.
Config is the configuration that can be set for an Agent.
EventFilter is used to filter which events are processed.
EventScript is a single event script that will be executed in the case of an event, and is configured from the command-line or from a configuration file.
GatedWriter is an io.Writer implementation that buffers all of its data into an internal buffer until it is told to let data through.
No description provided by the author
No description provided by the author
No description provided by the author
MockEventHandler is an EventHandler implementation that can be used for tests.
MockQueryHandler is an EventHandler implementation used for tests, it always responds to a query with a given response.
ScriptEventHandler invokes scripts for the events that it receives.
SyslogWrapper is used to cleaup log messages before writing them to a Syslogger.

# Interfaces

EventHandler is a handler that does things when events happen.
LogHandler interface is used for clients that want to subscribe to logs, for example to stream them over an IPC mechanism.

# Type aliases

AppendSliceValue implements the flag.Value interface and allows multiple calls to the same variable to append a list.