Run a service. A context is created which will be canceled when the service
receives a SIGINT or SIGTERM signal. A logger is created. These are passed
to the service function. The logger is created with a level of DEBUG if the
DEBUG environment variable is set to true.
type BindEnvironment interface {
BindEnvironment() error}
BindEnvironment can optionally be implemented by a service to bind
environment variables to the service. BindEnvironment will be called after
BindFlags and before Run.
type BindFlags interface {
BindFlags(flags *pflag.FlagSet)
}
BindFlags can optionally be implemented by a service to bind command line
flags to the service. BindFlags will be called before BindEnvironment and
Run.