producer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

Factory is a function that returns a new instance of producer

type Producer

type Producer interface {
	Start()
}

Producer represents a producer

type Registrar

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

Registrar represents producer factory registration.

func NewRegistrar

func NewRegistrar(logger *zap.Logger) *Registrar

NewRegistrar creates new registrar.

func (*Registrar) GetProducerFactory

func (pr *Registrar) GetProducerFactory(name string) (Factory, bool)

GetProducerFactory returns requested producer factory.

func (*Registrar) Register

func (pr *Registrar) Register(name, vendor string, pf Factory)

Register adds new producer factory

Directories

Path Synopsis
nsq

Jump to

Keyboard shortcuts

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