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

memory

package
v3.10.13 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package memory provides an in-memory registry

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRegistry

func NewRegistry(opts ...registry.Option) registry.Registry

NewRegistry returns an initialized in-memory registry

func Services

func Services(s map[string][]*registry.Service) registry.Option

Services is an option that preloads service data

Types

type Registry

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

func (*Registry) Deregister

func (m *Registry) Deregister(s *registry.Service, opts ...registry.DeregisterOption) error

func (*Registry) GetService

func (m *Registry) GetService(name string, opts ...registry.GetOption) ([]*registry.Service, error)

func (*Registry) Init

func (m *Registry) Init(opts ...registry.Option) error

func (*Registry) ListServices

func (m *Registry) ListServices(opts ...registry.ListOption) ([]*registry.Service, error)

func (*Registry) Options

func (m *Registry) Options() registry.Options

func (*Registry) Register

func (m *Registry) Register(s *registry.Service, opts ...registry.RegisterOption) error

func (*Registry) String

func (m *Registry) String() string

func (*Registry) Watch

func (m *Registry) Watch(opts ...registry.WatchOption) (registry.Watcher, error)

type Watcher

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

func (*Watcher) Next

func (m *Watcher) Next() (*registry.Result, error)

func (*Watcher) Stop

func (m *Watcher) Stop()

Jump to

Keyboard shortcuts

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