totalStakedAPI

package
v1.1.28 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotCastAccountHandlerToUserAccount = errors.New("cannot cast AccountHandler to UserAccount")

ErrCannotCastAccountHandlerToUserAccount signal that returned account is wrong

View Source
var ErrCannotReturnTotalStakedFromShardNode = errors.New("total staked value cannot be returned by a shard node")

ErrCannotReturnTotalStakedFromShardNode signals that total staked cannot be returned by a shard node

View Source
var ErrInvalidTotalStakedValueCacheDuration = errors.New("invalid total staked value cache duration")

ErrInvalidTotalStakedValueCacheDuration signals that an invalid cache duration has been provided

View Source
var ErrNilAccountsAdapter = errors.New("trying to set nil accounts adapter")

ErrNilAccountsAdapter signals that a nil accounts adapter has been provided

View Source
var ErrNilMarshalizer = errors.New("trying to set nil marshalizer")

ErrNilMarshalizer signals that a nil marshalizer has been provided

Functions

func CreateTotalStakedValueHandler

func CreateTotalStakedValueHandler(args *ArgsTotalStakedValueHandler) (external.TotalStakedValueHandler, error)

CreateTotalStakedValueHandler wil create a new instance of TotalStakedValueHandler

func NewDisabledTotalStakedValueProcessor

func NewDisabledTotalStakedValueProcessor() (*disabledTotalStakedValueProcessor, error)

NewDisabledTotalStakedValueProcessor -

func NewTotalStakedValueProcessor

func NewTotalStakedValueProcessor(
	marshalizer marshal.Marshalizer,
	cacheDuration time.Duration,
	accounts state.AccountsAdapter,
) (*totalStakedValueProcessor, error)

NewTotalStakedValueProcessor will create a new instance of totalStakedValueProcessor

Types

type ArgsTotalStakedValueHandler

type ArgsTotalStakedValueHandler struct {
	ShardID                     uint32
	RoundDurationInMilliseconds uint64
	InternalMarshalizer         marshal.Marshalizer
	Accounts                    state.AccountsAdapter
}

ArgsTotalStakedValueHandler is struct that contains components that are needed to create a TotalStakedValueHandler

Jump to

Keyboard shortcuts

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