managers

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: AGPL-3.0-only Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Managers

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

Managers is a registry for named managers.

func New

func New() *Managers

New creates a new Managers.

func (*Managers) Apply

func (m *Managers) Apply() error

Apply registers the accociated manager's registered managers.

func (*Managers) Get

func (m *Managers) Get(name string) (interface{}, bool)

Get returns the manager identified by the given name from the accociated managers.

func (*Managers) Must

func (m *Managers) Must(name string) interface{}

Must returns the manager indentified by the given name or panics.

func (*Managers) Set

func (m *Managers) Set(name string, manager interface{})

Set adds the provided manager with the provided name to the accociated Managers.

type ServiceUsesManagers

type ServiceUsesManagers interface {
	RegisterManagers(mgrs *Managers) error
}

ServiceUsesManagers is an interface for service which register to managers.

Jump to

Keyboard shortcuts

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