client

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCancelWatch = errors.New("cancel watch")
View Source
var LOG = log.NewHelper(log.With(log.GetLogger(), "source", "servicewatch"))

Functions

func AddWatch

func AddWatch(ctx context.Context, registry registry.Discovery, endpoint string, applier Applier) bool

func IsSecure

func IsSecure(u *url.URL) bool

IsSecure parses isSecure for Endpoint URL.

Types

type Applier

type Applier interface {
	Callback([]*registry.ServiceInstance) error
	Canceled() bool
}

type Client

type Client interface {
	http.RoundTripper
	io.Closer
}

type Factory

type Factory func(*config.Endpoint) (Client, error)

Factory is returns service client.

func NewFactory

func NewFactory(r registry.Discovery, opts ...Option) Factory

NewFactory new a client factory.

type Option

type Option func(*options)

func WithPickerBuilder

func WithPickerBuilder(in selector.Builder) Option

type Target

type Target struct {
	Scheme    string
	Authority string
	Endpoint  string
}

Target is resolver target

Jump to

Keyboard shortcuts

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