lifecycle

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventLifecycleStateChanged is dispatched for client lifecycle change events
	EventLifecycleStateChanged = "lifecyclestatechanged"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State int

State indicates the state of the lifecycle event.

const (
	// StateStarting signals that the client is starting.
	StateStarting State = iota
	// StateStarted signals that the client started.
	StateStarted
	// StateShuttingDown signals that the client is shutting down.
	StateShuttingDown
	// StateShutDown signals that the client shut down.
	StateShutDown
	// StateConnected signals that the client connected to the cluster.
	StateConnected
	// StateDisconnected signals that the client disconnected from the cluster.
	StateDisconnected
	// StateChangedCluster signals that the client is connected to a new cluster.
	StateChangedCluster
)

type StateChangedEvent

type StateChangedEvent struct {
	State State
}

StateChangedEvent contains information about a lifecycle event.

func NewLifecycleStateChanged

func NewLifecycleStateChanged(state State) *StateChangedEvent

func (*StateChangedEvent) EventName

func (e *StateChangedEvent) EventName() string

Jump to

Keyboard shortcuts

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