lifecycle

package
v2.283.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(initialState State) *Manager

func (*Manager) GetCurrentState

func (m *Manager) GetCurrentState() (state State)

GetCurrentState return the current state of the manager

func (*Manager) UpdateState

func (m *Manager) UpdateState(state State)

UpdateState update the current state of the manager

func (*Manager) WaitForStateChange

func (m *Manager) WaitForStateChange(ctx context.Context, sourceState State) bool

WaitForStateChange waits until the currentState changes from sourceState or ctx expires. A true value is returned in former case and false in latter.

type State

type State int

Jump to

Keyboard shortcuts

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