router

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(ctx context.Context, discovery discovery.Discovery, mod, addr string, ttl time.Duration) error

func Unregister

func Unregister(ctx context.Context, discovery discovery.Discovery, mod string) error

Types

type Cache

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

func NewCache

func NewCache(discovery discovery.Discovery) *Cache

func (*Cache) Add

func (cache *Cache) Add(mod, addr string)

func (*Cache) Init

func (cache *Cache) Init() error

func (*Cache) Lookup

func (cache *Cache) Lookup(mod string) (string, error)

func (*Cache) Remove

func (cache *Cache) Remove(mod string)

func (*Cache) Shutdown

func (cache *Cache) Shutdown()

func (*Cache) Start

func (cache *Cache) Start()

Jump to

Keyboard shortcuts

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