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

registry

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT, 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