state

package
v0.0.0-...-365054f Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDebounceDuration = time.Millisecond * 200

DefaultDebounceDuration is the default time interval suggested for debouncing

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

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

Keeper keeps track of state through eventual consistency. This should become the de-facto place to get your info about node.

func NewKeeper

func NewKeeper(deps KeeperDeps, debounceDuration time.Duration) *Keeper

NewKeeper returns a new instance of the keeper.

func (*Keeper) GetConnection

func (k *Keeper) GetConnection(id string) (state stateEvent.Connection)

GetConnection returns the connection state.

func (*Keeper) GetState

func (k *Keeper) GetState() (res stateEvent.State)

GetState returns the current state

func (*Keeper) Subscribe

func (k *Keeper) Subscribe(bus eventbus.Subscriber) error

Subscribe subscribes to the event bus.

type KeeperDeps

type KeeperDeps struct {
	Publisher                 publisher
	ServiceLister             serviceLister
	IdentityProvider          identityProvider
	IdentityRegistry          registry.IdentityRegistry
	IdentityChannelCalculator channelAddressCalculator
	BalanceProvider           balanceProvider
	EarningsProvider          earningsProvider
	ChainID                   int64
	ProposalPricer            proposalPricer
}

KeeperDeps to construct the state.Keeper.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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