package
0.37.2
Repository: https://github.com/thanos-io/thanos.git
Documentation: pkg.go.dev

# Functions

DescribeService returns name of the service, if it has one, or returns string representation of the service.
NewBasicService returns service built from three functions (using BasicService).
NewIdleService initializes basic service as an "idle" service -- it doesn't do anything in its Running state, but still supports all state transitions.
NewListener provides a simple way to build service listener from supplied functions.
NewTimerService runs iteration function on every interval tick.
StartAndAwaitRunning starts the service, and then waits until it reaches Running state.
StopAndAwaitTerminated asks service to stop, and then waits until service reaches Terminated or Failed state.

# Constants

Failed: Service has failed in Starting, Running or Stopping state.
New: Service is new, not running yet.
Running: Service is fully running now.
Starting: Service is starting.
Stopping: Service is shutting down.
Terminated: Service has stopped successfully.

# Structs

BasicService implements contract of Service interface, using three supplied functions: StartingFn, RunningFn and StoppingFn.

# Interfaces

Listener receives notifications about Service state changes.
NamedService extends Service with a name.
Service defines interface for controlling a service.

# Type aliases

OneIteration is one iteration of the timer service.
RunningFn function is called when service enters Running state.
StartingFn is called when service enters Starting state.
State of the service.
StoppingFn function is called when service enters Stopping state.