apollo

package
v0.0.0-...-88236ff Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "apollo"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(cfg *client.Config) (client.Client, error)

Types

type Client

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

appId@cluster

func (*Client) Close

func (c *Client) Close() error

func (*Client) Pull

func (c *Client) Pull(ctx context.Context, path string) ([]byte, error)

func (*Client) Push

func (c *Client) Push(ctx context.Context, path string, data []byte) error

func (*Client) Watch

func (c *Client) Watch(path string, cb client.ChangedCallback) error

type Random

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

func NewRandom

func NewRandom(ss []string) *Random

func (*Random) Select

func (r *Random) Select() string

func (*Random) Servers

func (r *Random) Servers() []string

func (*Random) Update

func (r *Random) Update(servers []string)

type Selector

type Selector interface {
	Select() string
	Update([]string)
	Servers() []string
}

type Snapshot

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

Jump to

Keyboard shortcuts

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