resetter

package
v2.0.0-beta2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "resetter"

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Collects

func (p *Plugin) Collects() []interface{}

Collects declares services to be collected.

func (*Plugin) GetAll

func (p *Plugin) GetAll() []string

func (*Plugin) Init

func (p *Plugin) Init(log logger.Logger) error

func (*Plugin) Name

func (p *Plugin) Name() string

Name of the service.

func (*Plugin) RPC

func (p *Plugin) RPC() interface{}

RPCService returns associated rpc service.

func (*Plugin) RegisterTarget

func (p *Plugin) RegisterTarget(name endure.Named, r Resettable) error

RegisterTarget resettable service.

func (*Plugin) Reset

func (p *Plugin) Reset(name string) error

Reset named service.

func (*Plugin) ResetAll

func (p *Plugin) ResetAll() error

func (*Plugin) ResetByName

func (p *Plugin) ResetByName(plugin string) error

type Resettable

type Resettable interface {
	// Reset reload all plugins
	Reset() error
}

If plugin implements Resettable interface, than it state can be resetted without reload in runtime via RPC/HTTP

type Resetter

type Resetter interface {
	// Reset all registered plugins
	ResetAll() error
	// Reset by plugin name
	ResetByName(string) error
	// GetAll registered plugins
	GetAll() []string
}

Resetter interface is the Resetter plugin main interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL