registry

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Objects

type Objects map[string]interface{}

Objects defines a list of objects.

type Registry

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

Registry defines a registry object that can register objects.

func New

func New() *Registry

New creates a new registry object.

func (*Registry) Add

func (r *Registry) Add(name string, object interface{}) error

Add adds an object with a given unique id to registry.

func (*Registry) IsExist

func (r *Registry) IsExist(name string) bool

IsExist returns true if object with given name was registered, otherwise it returns false.

func (*Registry) Names

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

Names returns a list of registered object names.

func (*Registry) Remove

func (r *Registry) Remove(name string) *Registry

Remove removes registered object.

Jump to

Keyboard shortcuts

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