Documentation ¶
Index ¶
- Variables
- func CreateTotalStakedValueHandler(args *ArgsTotalStakedValueHandler) (external.TotalStakedValueHandler, error)
- func NewDisabledTotalStakedValueProcessor() (*disabledTotalStakedValueProcessor, error)
- func NewTotalStakedValueProcessor(marshalizer marshal.Marshalizer, cacheDuration time.Duration, ...) (*totalStakedValueProcessor, error)
- type ArgsTotalStakedValueHandler
Constants ¶
This section is empty.
Variables ¶
var ErrCannotCastAccountHandlerToUserAccount = errors.New("cannot cast AccountHandler to UserAccount")
ErrCannotCastAccountHandlerToUserAccount signal that returned account is wrong
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
var ErrInvalidTotalStakedValueCacheDuration = errors.New("invalid total staked value cache duration")
ErrInvalidTotalStakedValueCacheDuration signals that an invalid cache duration has been provided
var ErrNilAccountsAdapter = errors.New("trying to set nil accounts adapter")
ErrNilAccountsAdapter signals that a nil accounts adapter has been provided
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