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