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

# Functions

No description provided by the author
MapSetNow sets the now func on m returning a func that undoes the set.
MonoApply wraps apply to ensure that consecutive calls to the returned ApplyFunc will cancel the context passed to apply.
New creates a new Service using apply to spin up background tasks based on config of type C.
NewMap creates and returns a new empty Map using the given create funcs.
NewMapOf creates an immutable map containing only the given known services.
WithNow configures a service with a custom time functions instead of the default time.Now.
WithOnStop sets a function on the Service that will be called each time Service.Stop is executed.
WithParser configures a Service to use the given parse func instead of the default json.Unmarshaler.

# Variables

ErrAlreadyLoading is returned from Service.Configure if the service state is loading.
ErrAlreadyStarted is returned from Service.Start if the service state is active.
ErrAlreadyStopped is returned from Service.Stop if the service state is not active.
No description provided by the author
No description provided by the author
IdIsKind is an IdFunc that attempts to use the kind as the id.
No description provided by the author
No description provided by the author

# Structs

Change represents a change to a Map.
Map tracks multiple Record with the ability to create, delete, and listen for changes to the tracked records.
No description provided by the author
Service manages the lifecycle of a background task.
State contains all the properties of the service.

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

ApplyFunc is called each time an active service has its config updated.
CreateFunc returns a new Lifecycle for the given kind.
IdFunc generates a new id given the passed parameters.
OptionFunc adapts a func of the correct signature to implement Option.
ParseFunc is called to convert raw []byte config into a known config structure.