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

        Source Files