discoverer

package
v0.0.0-...-0b4a972 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugin

func Plugin(name string, b Constructor) map[string][]interface{}

func RegisterDiscovererPlugin

func RegisterDiscovererPlugin(name string, discoverer Constructor)

Types

type Builders

type Builders struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(builders []builder.Builder, appenders []appender.Appender) *Builders

func (*Builders) AddAppender

func (b *Builders) AddAppender(a appender.Appender)

func (*Builders) AddBuilder

func (b *Builders) AddBuilder(builder builder.Builder)

func (*Builders) SetFactory

func (b *Builders) SetFactory(factory factory.Factory)

func (*Builders) StartModuleRunners

func (b *Builders) StartModuleRunners(obj interface{})

func (*Builders) StopModuleRunners

func (b *Builders) StopModuleRunners(obj interface{})

type Constructor

type Constructor func(config *common.Config) (Discoverer, error)

type Discoverer

type Discoverer interface {
	Start(builder *Builders)
	Stop()
	String() string
}

type DiscovererPlugin

type DiscovererPlugin struct {
	Name       string
	Config     *common.Config
	Discoverer Discoverer
}

func InitDiscoverers

func InitDiscoverers(
	configs map[string]*common.Config,
) ([]*DiscovererPlugin, error)

Jump to

Keyboard shortcuts

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