Documentation ¶
Index ¶
- func WithContext(ctx context.Context, base PluginBase) context.Context
- type OptionFunc
- func Context(ctx context.Context) OptionFunc
- func ID(id string) OptionFunc
- func Metadata(md map[string]string) OptionFunc
- func Monitor(enable bool) OptionFunc
- func Name(name string) OptionFunc
- func RegistrarTimeout(t time.Duration) OptionFunc
- func Registrars(r register.Registrar) OptionFunc
- func Signal(sigs ...os.Signal) OptionFunc
- func Version(version string) OptionFunc
- type PluginBase
- type PluginItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithContext ¶
func WithContext(ctx context.Context, base PluginBase) context.Context
WithContext returns a new Context that carries value.
Types ¶
type OptionFunc ¶
type OptionFunc func(o *pluginOptions)
func RegistrarTimeout ¶
func RegistrarTimeout(t time.Duration) OptionFunc
RegistrarTimeout with registrar timeout.
func Registrars ¶
func Registrars(r register.Registrar) OptionFunc
Registrars with service registry.
type PluginBase ¶
type PluginBase interface { ID() string Name() string Version() string Metadata() map[string]string Add(items ...PluginItem) Run() Stop() error GetOpts() *pluginOptions }
func NewBase ¶
func NewBase(conf *gofkConfs.PluginConfig, opts ...OptionFunc) PluginBase
type PluginItem ¶
Click to show internal directories.
Click to hide internal directories.