registry

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry is an in memory structure to hold generic map of objects rospo uses registries to hold maps of active tunnels

func NewRegistry

func NewRegistry() *Registry

NewRegistry creates a new registry

func (*Registry) Add

func (r *Registry) Add(t interface{}) int

Add adds an items to the registry in a thread safe way

func (*Registry) Delete

func (r *Registry) Delete(id int) error

Delete removes an item from registry

func (*Registry) GetAll

func (r *Registry) GetAll() map[int]interface{}

GetAll returns all registry contents

func (*Registry) GetByID

func (r *Registry) GetByID(id int) (interface{}, error)

GetByID returns an item give its registry ID

Jump to

Keyboard shortcuts

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