Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RoundToNearest ¶
RoundToNearest round an actual time to the nearest interval.
Types ¶
type Config ¶
Config represent the configuration of furytime service.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type Svc ¶
type Svc struct {
// contains filtered or unexported fields
}
Svc represents the Service managing time inside Fury. this is basically based on the time of the chain in use.
func (*Svc) GetTimeLastBatch ¶
GetTimeLastBatch returns the previous fury time.
func (*Svc) GetTimeNow ¶
GetTimeNow returns the current time in fury.
func (*Svc) NotifyOnTick ¶
NotifyOnTick allows other services to register a callback function which will be called once the fury time is updated (SetTimeNow is called).
func (*Svc) ReloadConf ¶
ReloadConf reload the configuration for the furytime service.