Documentation ¶
Index ¶
- Constants
- type ILauncher
- type IServicesRunner
- type Option
- func WithAfterStart(fn func() error) Option
- func WithAfterStop(fn func() error) Option
- func WithAppStartStopLog(v bool) Option
- func WithBeforeStart(fn func() error) Option
- func WithBeforeStop(fn func() error) Option
- func WithContext(ctx context.Context) Option
- func WithLogger(l logger.ExtendedLogger) Option
- func WithName(n string) Option
- func WithOpsConfig(c ops.Config) Option
- func WithRunnerServicesSequence(v RunnerServicesSequence) Option
- func WithSignal(b bool) Option
- func WithVersion(v string) Option
- type Options
- type RunnerServicesSequence
Constants ¶
View Source
const ( RunnerServicesSequenceNone = iota RunnerServicesSequenceFifo RunnerServicesSequenceLifo )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ILauncher ¶
type ILauncher interface { // Run launcher and all services Run() error // Stop launcher and all services Stop() // ServicesRunner return services runner ServicesRunner() IServicesRunner // Context return global context Context() context.Context }
type IServicesRunner ¶
type Option ¶
type Option func(*Options)
func WithAfterStart ¶
WithAfterStart run funcs after service starts
func WithAfterStop ¶
WithAfterStop run funcs after service stops
func WithAppStartStopLog ¶ added in v0.2.2
func WithBeforeStart ¶
WithBeforeStart run funcs before service starts
func WithBeforeStop ¶
WithBeforeStop run funcs before service stops
func WithContext ¶
func WithLogger ¶
func WithLogger(l logger.ExtendedLogger) Option
func WithOpsConfig ¶ added in v0.1.0
func WithRunnerServicesSequence ¶ added in v0.1.0
func WithRunnerServicesSequence(v RunnerServicesSequence) Option
func WithSignal ¶
type Options ¶
type Options struct { Name string Version string // Before and After funcs BeforeStart []func() error BeforeStop []func() error AfterStart []func() error AfterStop []func() error AppStartStopLog bool RunnerServicesSequence RunnerServicesSequence Signal bool Context context.Context OpsConfig ops.Config // contains filtered or unexported fields }
type RunnerServicesSequence ¶ added in v0.1.0
type RunnerServicesSequence int
Click to show internal directories.
Click to hide internal directories.