Documentation
¶
Index ¶
- Constants
- Variables
- type Component
- type CompositeComponent
- func (c *CompositeComponent) Destroy(ctx *cli.Context) error
- func (c *CompositeComponent) Init(ctx *cli.Context) error
- func (c *CompositeComponent) Name() string
- func (c *CompositeComponent) SetDestroy(f DestroyFunc) *CompositeComponent
- func (c *CompositeComponent) SetInit(f InitFunc) *CompositeComponent
- type DestroyFunc
- type Func
- type InitFunc
- type Logger
- type Service
- type Starter
Constants ¶
View Source
const (
ServicesGracefulstopTimeout string = "services.gracefulstop.timeout"
)
Variables ¶
View Source
var Flags = []cli.Flag{ altsrc.NewDurationFlag(&cli.DurationFlag{ Name: ServicesGracefulstopTimeout, Usage: "Maximum time to gracefully stop services", EnvVars: []string{"SERVICES_GRACEFULSTOP_TIMEOUT"}, }), }
Functions ¶
This section is empty.
Types ¶
type CompositeComponent ¶ added in v0.0.2
type CompositeComponent struct {
// contains filtered or unexported fields
}
func NewComponent ¶
func NewComponent(name string) *CompositeComponent
func (*CompositeComponent) Destroy ¶ added in v0.0.2
func (c *CompositeComponent) Destroy(ctx *cli.Context) error
func (*CompositeComponent) Init ¶ added in v0.0.2
func (c *CompositeComponent) Init(ctx *cli.Context) error
func (*CompositeComponent) Name ¶ added in v0.0.2
func (c *CompositeComponent) Name() string
func (*CompositeComponent) SetDestroy ¶ added in v0.0.2
func (c *CompositeComponent) SetDestroy(f DestroyFunc) *CompositeComponent
func (*CompositeComponent) SetInit ¶ added in v0.0.2
func (c *CompositeComponent) SetInit(f InitFunc) *CompositeComponent
type DestroyFunc ¶ added in v0.0.2
type Starter ¶
type Starter interface {
// Logger set customer logger
Logger(l Logger) Starter
// Signals
Signals(signals ...os.Signal) Starter
// Init ...
Init(ctx *cli.Context, components ...Component) Starter
// Run ...
Run(ctx *cli.Context, f Func) Starter
// RunServices ...
RunServices(ctx *cli.Context, services ...Service) Starter
// Done
Done() <-chan struct{}
// Stop ...
Stop() Starter
// Wait ...
Wait(ctx *cli.Context) Starter
// Error return pipeline error
Error() error
}
Click to show internal directories.
Click to hide internal directories.
