Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) { return &Events{ AcceptedTimeUpdated: event.New1[time.Time](), ConfirmedTimeUpdated: event.New1[time.Time](), } })
NewEvents is the constructor of the Events object.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface { // Accepted returns a notion of time that is anchored to the latest accepted block. Accepted() RelativeTime Confirmed() RelativeTime // Snapshot returns a snapshot of all time values tracked in the clock read atomically. Snapshot() *Snapshot // Reset resets the time values tracked in the clock to the given time. Reset(newTime time.Time) // Interface embeds the required methods of the module.Interface. module.Interface }
Clock is an engine module that provides different notions of time according to the different levels of finality.
type Events ¶
type Events struct { // AcceptedTimeUpdated is triggered when the accepted time is updated. AcceptedTimeUpdated *event.Event1[time.Time] // ConfirmedTimeUpdated is triggered when the confirmed time is updated. ConfirmedTimeUpdated *event.Event1[time.Time] // Group is trait that makes the dictionary linkable. event.Group[Events, *Events] }
Events contains a dictionary of events that are triggered by the Clock.
Click to show internal directories.
Click to hide internal directories.