Documentation ¶
Index ¶
- func GetBigIntFromString(data interface{}) *big.Int
- func GetString(data interface{}) string
- func GetUint64(data interface{}) uint64
- type PersistentStatusHandler
- func (psh *PersistentStatusHandler) AddUint64(key string, value uint64)
- func (psh *PersistentStatusHandler) Close()
- func (psh *PersistentStatusHandler) Decrement(key string)
- func (psh *PersistentStatusHandler) Increment(key string)
- func (psh *PersistentStatusHandler) IsInterfaceNil() bool
- func (psh *PersistentStatusHandler) SetInt64Value(key string, value int64)
- func (psh *PersistentStatusHandler) SetStorage(store storage.Storer) error
- func (psh *PersistentStatusHandler) SetStringValue(key string, value string)
- func (psh *PersistentStatusHandler) SetUInt64Value(key string, value uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBigIntFromString ¶
GetBigIntFromString will try to convert an interface type in a string and the corresponding *big.Int
Types ¶
type PersistentStatusHandler ¶
type PersistentStatusHandler struct {
// contains filtered or unexported fields
}
PersistentStatusHandler is a status handler that will save metrics in storage
func NewPersistentStatusHandler ¶
func NewPersistentStatusHandler( marshalizer marshal.Marshalizer, uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter, ) (*PersistentStatusHandler, error)
NewPersistentStatusHandler will return an instance of the persistent status handler
func (*PersistentStatusHandler) AddUint64 ¶
func (psh *PersistentStatusHandler) AddUint64(key string, value uint64)
AddUint64 - will increase the value of a key with a value
func (*PersistentStatusHandler) Close ¶
func (psh *PersistentStatusHandler) Close()
Close method - won't do anything
func (*PersistentStatusHandler) Decrement ¶
func (psh *PersistentStatusHandler) Decrement(key string)
Decrement - will decrement the value of a key
func (*PersistentStatusHandler) Increment ¶
func (psh *PersistentStatusHandler) Increment(key string)
Increment - will increment the value of a key
func (*PersistentStatusHandler) IsInterfaceNil ¶
func (psh *PersistentStatusHandler) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*PersistentStatusHandler) SetInt64Value ¶
func (psh *PersistentStatusHandler) SetInt64Value(key string, value int64)
SetInt64Value method - will update the value for a key
func (*PersistentStatusHandler) SetStorage ¶
func (psh *PersistentStatusHandler) SetStorage(store storage.Storer) error
SetStorage will set storage for persistent status handler
func (*PersistentStatusHandler) SetStringValue ¶
func (psh *PersistentStatusHandler) SetStringValue(key string, value string)
SetStringValue method - will update the value of a key
func (*PersistentStatusHandler) SetUInt64Value ¶
func (psh *PersistentStatusHandler) SetUInt64Value(key string, value uint64)
SetUInt64Value method - will update the value for a key