client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClient                             = newClient()
	DefaultDialTimeout                        = time.Second * 5
	NewClient          func(...Option) Client = newClient
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Init(...Option) error
	Options() Options
	String() string
	Instance() interface{}
}

type Option

type Option func(*Options)

Option used by the Client

func DialTimeout

func DialTimeout(t time.Duration) Option

func Registry

func Registry(r registry.Registry) Option

func Service

func Service(s string) Option

type Options

type Options struct {
	Registry    registry.Registry
	Service     string
	DialTimeout time.Duration
}

func NewOptions

func NewOptions(options ...Option) Options

Jump to

Keyboard shortcuts

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