util

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPanicListener

func NewPanicListener() node.Listener

NewPanicListener returns a listener that panics on any errors

func NewPullLogsAndPanicListener

func NewPullLogsAndPanicListener(l xlog.Logger, baseDir string) node.Listener

NewPullLogsAndPanicListener returns a listener that attempts to retrieve logs from the remote agent upon OnProcessTerminate invokation, and panics. It does not attempt to retrieve logs for neither OnHeartbeatTimeout, nor OnOverwrite.

Types

type NodePredicate

type NodePredicate func(m3emnode.Node) bool

NodePredicate is a predicate on a M3DB ServiceNode

type NodesWatcher

type NodesWatcher interface {
	io.Closer

	// WaitUntilAll allows you to specify a predicate which must be satisfied
	// on all monitored Nodes within the timeout provided. It returns a flag
	// indicating if this occurred successfully
	WaitUntilAll(p NodePredicate, timeout time.Duration) bool

	// Pending returns the list of nodes which have not satisfied the
	// predicate satisfied
	Pending() []m3emnode.Node

	// PendingAsError returns the list of pending nodes wrapped as an
	// error
	PendingAsError() error
}

NodesWatcher makes it easy to monitor observable properties of M3DB ServiceNodes

func NewNodesWatcher

func NewNodesWatcher(
	nodes []m3emnode.Node,
	logger xlog.Logger,
	reportingInterval time.Duration,
) NodesWatcher

NewNodesWatcher creates a new NodeWatcher

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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