registry

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(t reflect.Type) (interface{}, bool)

func GetFor

func GetFor(v interface{}) (interface{}, bool)

func Set

func Set(t reflect.Type, p interface{})

func SetOnce

func SetOnce(t reflect.Type, p interface{})

Types

type Registry

type Registry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func DefaultRegistry

func DefaultRegistry() *Registry

func New

func New() *Registry

func (*Registry) Get

func (r *Registry) Get(t reflect.Type) (interface{}, bool)

func (*Registry) GetFor

func (r *Registry) GetFor(v interface{}) (interface{}, bool)

func (*Registry) Set

func (r *Registry) Set(t reflect.Type, p interface{})

func (*Registry) SetOnce

func (r *Registry) SetOnce(t reflect.Type, p interface{})

Jump to

Keyboard shortcuts

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