table

package
v0.0.0-...-aadf7d6 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: GPL-2.0 Imports: 8 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 Apps

func Apps(s map[string][]*registry.App) registry.Option

Apps is an option that preloads service data

serviceName
   V

func NewTable

func NewTable(opts ...registry.Option) registry.Table

NewTable returns an initialized in-memory registry

Types

type Table

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

func (*Table) Add

func (m *Table) Add(s *registry.App, opts ...registry.AddOption) error

func (*Table) Get

func (m *Table) Get(name string, opts ...registry.GetOption) ([]*registry.App, error)

func (*Table) Init

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

func (*Table) List

func (m *Table) List(opts ...registry.ListOption) ([]*registry.App, error)

func (*Table) Options

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

func (*Table) Remove

func (m *Table) Remove(s *registry.App, opts ...registry.RemoveOption) error

func (*Table) String

func (m *Table) String() string

func (*Table) Watch

func (m *Table) 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