Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Setup ¶
func Setup(ctx context.Context, coreFactory *core.Factory, httpClient client_plugin.HTTPClient)
Types ¶
type Heartbeat ¶ added in v0.0.23
Heartbeat will call the provided HeartbeatFunc on the supplied period for each enqueued element.
func NewHeartbeat ¶ added in v0.0.23
func NewHeartbeat(period time.Duration, fn HeartbeatFunc) *Heartbeat
func (*Heartbeat) Dequeue ¶ added in v0.0.23
Dequeue removes the heartbeat associated with the id from the list. This is roughly a log(n) runtime. There is _some_ scanning involved, but it's only in the event that two heartbeats are scheduled at the same time.
func (*Heartbeat) Enqueue ¶ added in v0.0.23
Enqueue adds the provided id to the list of elements to process. If runNow is true, then the element is enqueued using the current timestamp rather than one in the future. This operation should be close to log(n) runtime.
type HeartbeatFunc ¶ added in v0.0.23
Click to show internal directories.
Click to hide internal directories.