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 // AddBeforeStartHooks adds before start hooks AddBeforeStartHooks(hook ...func() error) // AddBeforeStopHooks adds before stop hooks AddBeforeStopHooks(hook ...func() error) // AddAfterStartHooks adds after start hooks AddAfterStartHooks(hook ...func() error) // AddAfterStopHooks adds after stop hooks AddAfterStopHooks(hook ...func() error) }
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 ¶
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 ¶
func WithRunnerServicesSequence ¶
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 //nolint:containedctx OpsConfig ops.Config // contains filtered or unexported fields }
type RunnerServicesSequence ¶
type RunnerServicesSequence int
Click to show internal directories.
Click to hide internal directories.