Documentation
¶
Index ¶
- Constants
- func Middleware(name string, middleware types.Middleware)
- func Register(pg Plugin)
- type Base
- func (p *Base) AfterStart(fn func())
- func (p *Base) AfterStarts() []func()
- func (p *Base) AfterStop(fn func())
- func (p *Base) AfterStops() []func()
- func (p *Base) BeforeStart(fn func())
- func (p *Base) BeforeStarts() []func()
- func (p *Base) BeforeStop(fn func())
- func (p *Base) BeforeStops() []func()
- func (p *Base) Commands() *cli.Command
- func (p *Base) Flags() types.Flags
- func (p *Base) Health() types.Healthy
- func (p *Base) Init() error
- func (p *Base) MarshalJSON() ([]byte, error)
- func (p *Base) Middleware() types.Middleware
- func (p *Base) String() string
- func (p *Base) UniqueName() string
- func (p *Base) Vars(f types.Vars) error
- func (p *Base) Watch() types.Watcher
- type Plugin
- type Process
Constants ¶
View Source
const Name = "plugin"
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(name string, middleware types.Middleware)
Types ¶
type Base ¶
type Base struct {
Name string
Descriptor string
Url string
Docs interface{}
OnHealth types.Healthy
OnMiddleware types.Middleware
OnInit func(p Process)
OnCommands func() *types.Command
OnFlags func() types.Flags
OnWatch types.Watcher
OnVars func(v types.Vars)
// contains filtered or unexported fields
}
func (*Base) AfterStart ¶
func (p *Base) AfterStart(fn func())
func (*Base) AfterStarts ¶
func (p *Base) AfterStarts() []func()
func (*Base) AfterStops ¶
func (p *Base) AfterStops() []func()
func (*Base) BeforeStart ¶
func (p *Base) BeforeStart(fn func())
func (*Base) BeforeStarts ¶
func (p *Base) BeforeStarts() []func()
func (*Base) BeforeStop ¶
func (p *Base) BeforeStop(fn func())
func (*Base) BeforeStops ¶
func (p *Base) BeforeStops() []func()
func (*Base) MarshalJSON ¶
func (*Base) Middleware ¶
func (p *Base) Middleware() types.Middleware
func (*Base) UniqueName ¶
type Plugin ¶
type Plugin interface {
String() string
UniqueName() string
Flags() types.Flags
Commands() *types.Command
Init() error
Watch() types.Watcher
Vars(types.Vars) error
Health() types.Healthy
Middleware() types.Middleware
BeforeStarts() []func()
AfterStarts() []func()
BeforeStops() []func()
AfterStops() []func()
}
Click to show internal directories.
Click to hide internal directories.