managers

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0 Imports: 1 Imported by: 5

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