simple_noop_plugin

package
v0.0.0-...-dcc555a Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurer

type Configurer interface {
	// UnmarshalKey takes a single key and unmarshal it into a Struct.
	UnmarshalKey(name string, out any) error
	// Has checks if config section exists.
	Has(name string) bool
}

type F

type F interface {
	FooBar() string
}

type Logger

type Logger interface {
	NamedLogger(name string) *zap.Logger
}

type Plugin

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

func (*Plugin) Collects

func (p *Plugin) Collects() []*dep.In

Collects all plugins which implement Name + RPCer interfaces

func (*Plugin) FooBar

func (p *Plugin) FooBar() string

func (*Plugin) Init

func (p *Plugin) Init(logger Logger, cfg Configurer) error

Init .. Logger and Configurer interfaces represents logger and configurer plugins. They would be provided automatically when registered in the RRs container.

func (*Plugin) Name

func (p *Plugin) Name() string

Name interface should be implemented to provide a user-friendly plugin name.

func (*Plugin) Serve

func (p *Plugin) Serve() chan error

func (*Plugin) Stop

func (p *Plugin) Stop(_ context.Context) error

Stop would be called on the RR stop.

func (*Plugin) Weight

func (p *Plugin) Weight() uint

Jump to

Keyboard shortcuts

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