package
1.0.0-beta.2
Repository: https://github.com/vanti-dev/sc-bos.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package serviceapi implements gen.ServiceApi backed by a service.Map.

# Functions

Configurable returns whether the given automation can be configured.
Configure attempts to configure the given automation.
No description provided by the author
NewLifecycle creates a new Lifecycle that calls runFunc each time config is loaded.
No description provided by the author
Poll creates a task that calls a function at a regular interval while it is running.
Run will run a Task to completion in a blocking fashion.
Stop attempts to stop the given automation.
Stoppable returns whether the given automation can be stopped.
WithBackoff adds exponential backoff when retrying tasks.
WithErrorLogger will log to the provided logger every time the Task returns a non-nil error.
WithRetry places a limit on the number of times a Task may be restarted before we give up.
WithRetryDelay adds a fixed delay between a Task returning and the next attempt starting.
WithTimeout imposes a time limit on each individual invocation of the Task.

# Constants

Normal mode of operation - Task is retried if it returns a non-nil error.
ResetBackoff will reset the Task restart delay to its starting value, and then continue as normal.
RetryNow will restart the task immediately, without any delay.
RetryUnlimited allows a Task to be restarted forever.
Task is in its delay period before the next attempt.
Task is waiting to start.
Task is running now.
Task is not running, and won't run again.
The task has valid config and is serving requests.
The task failed to start.
Stopped task.
The task is loading configuration.
StopNow will prevent the task from being restarted, even if it returns a non-nil error.

# Variables

ErrCannotBeConfigured is returned when attempting to Configure an automation that does not implement Configurer.
ErrCannotBeStopped is returned when attempting to Stop an automation that does not implement Stopper.

# Structs

No description provided by the author
No description provided by the author
Intermittent manages the lifecycle of a long-running background operation that needs to outlive a single context.
Lifecycle manages the lifecycle of a driver as per task.Starter, task.Configurer, and task.Stopper.
A Runner allows the caller control over the invocation of a Task.

# Interfaces

Configurer describes types that can be configured.
Starter describes types that can be started.
Stopper describes types that can be stopped.

# Type aliases

Next allows a task to specify a preferred retry behaviour.
No description provided by the author
RunConfigFunc is called when a drivers config changes and should apply those changes.
StartFn is called by an Intermittent to start a background operation.
No description provided by the author
No description provided by the author
No description provided by the author
A Task is a unit of work which can be restarted if it fails.