agent

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0, MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogWriter

func NewLogWriter(buf int) *logWriter

NewLogWriter creates a logWriter with the given buffer capacity

Types

type AppendSliceValue

type AppendSliceValue []string

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

func (*AppendSliceValue) Set

func (s *AppendSliceValue) Set(value string) error

func (*AppendSliceValue) String

func (s *AppendSliceValue) String() string

type GatedWriter

type GatedWriter struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

GatedWriter is an io.Writer implementation that buffers all of its data into an internal buffer until it is told to let data through.

func (*GatedWriter) Flush

func (w *GatedWriter) Flush()

Flush tells the GatedWriter to flush any buffered data and to stop buffering.

func (*GatedWriter) Write

func (w *GatedWriter) Write(p []byte) (n int, err error)

type LogHandler

type LogHandler interface {
	HandleLog(string)
}

LogHandler interface is used for clients that want to subscribe to logs, for example to stream them over an IPC mechanism

type MockEventHandler

type MockEventHandler struct {
	Events []serf.Event
	sync.Mutex
}

MockEventHandler is an EventHandler implementation that can be used for tests.

func (*MockEventHandler) HandleEvent

func (h *MockEventHandler) HandleEvent(e serf.Event)

type MockQueryHandler

type MockQueryHandler struct {
	Response []byte
	Queries  []*serf.Query
	sync.Mutex
}

MockQueryHandler is an EventHandler implementation used for tests, it always responds to a query with a given response

func (*MockQueryHandler) HandleEvent

func (h *MockQueryHandler) HandleEvent(e serf.Event)

Jump to

Keyboard shortcuts

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