registry

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Id       string            `json:"id"`
	Address  string            `json:"address"`
	Metadata map[string]string `json:"metadata"`
}

type Option

type Option func(*Options)

func Addrs

func Addrs(addrs []string) Option

func Metadata

func Metadata(m map[string]string) Option

func Secure

func Secure(b bool) Option

Secure communication with the registry

func ServiceAddr

func ServiceAddr(name string) Option

func ServiceName

func ServiceName(name string) Option

func TLSConfig

func TLSConfig(t *tls.Config) Option

Specify TLS Config

func Timeout

func Timeout(t time.Duration) Option

type Options

type Options struct {
	ServiceName string
	ServiceAddr string
	Addrs       []string
	Metadata    map[string]string
	Timeout     time.Duration
	Secure      bool
	TLSConfig   *tls.Config
	Context     context.Context
}

Registry Options

type RegisterOption

type RegisterOption func(*RegisterOptions)

func RegisterInterval

func RegisterInterval(interval time.Duration) RegisterOption

func RegisterTTL

func RegisterTTL(ttl time.Duration) RegisterOption

type RegisterOptions

type RegisterOptions struct {
	RegisterTTL      time.Duration
	RegisterInterval time.Duration
}

type Registry

type Registry interface {
	Register(ops ...RegisterOption) error
	Deregister() error
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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