registry

package
v0.0.0-...-c21bcf3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *options)

func Context

func Context(ctx context.Context) Option

func Namespace

func Namespace(ns string) Option

func TTL

func TTL(ttl time.Duration) Option

func WatcherTTL

func WatcherTTL(ttl time.Duration) Option

type Registry

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

func New

func New(client *redis.Client, opts ...Option) *Registry

func (*Registry) Deregister

func (r *Registry) Deregister(ctx context.Context, service *registry.ServiceInstance) error

func (*Registry) GetService

func (r *Registry) GetService(ctx context.Context, serviceName string) ([]*registry.ServiceInstance, error)

func (*Registry) Register

func (r *Registry) Register(ctx context.Context, service *registry.ServiceInstance) error

func (*Registry) Watch

func (r *Registry) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)

Jump to

Keyboard shortcuts

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