registry

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrant

type Registrant interface {
	Name() string
}

Registrant interface implementors may be registered in a Registry

type Registry

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

func Create

func Create(name string) *Registry

Create creates a new registry

func (*Registry) Get

func (r *Registry) Get(name string) interface{}

Get gets a named registrant from a registry

func (*Registry) Names

func (r *Registry) Names() []string

Names returns the sorted registrant names

func (*Registry) Register

func (r *Registry) Register(registrant Registrant)

Register registers a new registrant to a registry

Jump to

Keyboard shortcuts

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