Help us shape the future of Go! Take the 2026 Go Developer Survey

registry

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 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