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 zetatime 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 Zeta. this is basically based on the time of the chain in use.
func (*Svc) GetTimeLastBatch ¶
GetTimeLastBatch returns the previous zeta time.
func (*Svc) GetTimeNow ¶
GetTimeNow returns the current time in zeta.
func (*Svc) NotifyOnTick ¶
NotifyOnTick allows other services to register a callback function which will be called once the zeta time is updated (SetTimeNow is called).
func (*Svc) ReloadConf ¶
ReloadConf reload the configuration for the zetatime service.