go-micro: github.com/micro/go-micro/registry/memory Index | Files

package memory

import "github.com/micro/go-micro/registry/memory"

Package memory provides an in-memory registry

Index

Package Files

memory.go memory_watcher.go options.go watcher.go

func NewRegistry Uses

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

func Services Uses

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

Services is an option that preloads service data

type Registry Uses

type Registry struct {
    sync.RWMutex
    Services map[string][]*registry.Service
    Watchers map[string]*Watcher
    // contains filtered or unexported fields
}

func (*Registry) Deregister Uses

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

func (*Registry) GetService Uses

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

func (*Registry) Init Uses

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

func (*Registry) ListServices Uses

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

func (*Registry) Options Uses

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

func (*Registry) Register Uses

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

func (*Registry) String Uses

func (m *Registry) String() string

func (*Registry) Watch Uses

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

type Watcher Uses

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

func (*Watcher) Next Uses

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

func (*Watcher) Stop Uses

func (m *Watcher) Stop()

Package memory imports 6 packages (graph) and is imported by 6 packages. Updated 2019-07-16. Refresh now. Tools for package owners.