discover

package
v0.0.0-...-36ee774 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alive

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

func (*Alive) Watch

func (w *Alive) Watch(fn func(name string, serverInfo []*message.ServerInfo))

type Client

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

func (*Client) Alive

func (dis *Client) Alive(serverList ...string) *Alive

func (*Client) All

func (dis *Client) All() ([]byte, error)

func (*Client) Delete

func (dis *Client) Delete(key string) (string, error)

func (*Client) Get

func (dis *Client) Get(key string) ([]byte, error)

func (*Client) Key

func (dis *Client) Key(keyList ...string) *KeyList

func (*Client) OnClose

func (dis *Client) OnClose(fn func())

func (*Client) OnError

func (dis *Client) OnError(fn func(err error))

func (*Client) OnOpen

func (dis *Client) OnOpen(fn func())

func (*Client) Register

func (dis *Client) Register(fn func() message.ServerInfo)

func (*Client) Set

func (dis *Client) Set(key string, value []byte) (string, error)

type Config

type Config struct {
	AutoUpdateInterval time.Duration
}

type Discover

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

func New

func New(serverList ...string) *Discover

func (*Discover) Config

func (d *Discover) Config(config *Config) *Discover

func (*Discover) Connect

func (d *Discover) Connect() *Client

type KeyList

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

func (*KeyList) Watch

func (k *KeyList) Watch(fn func(op *store.Message))

Jump to

Keyboard shortcuts

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