nid

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NameHolder

type NameHolder struct {
	LocalPath  string `json:"localPath"`
	LocalIP    string `json:"localIp"`
	ApplyTime  string `json:"applyTime"`
	ServiceKey string `json:"-"`
}

NameHolder ...

func (*NameHolder) DecodeInfo

func (h *NameHolder) DecodeInfo(data []byte) error

func (*NameHolder) EncodeInfo

func (h *NameHolder) EncodeInfo() ([]byte, error)

type NodeNamed

type NodeNamed interface {
	GetNodeID(*NameHolder) (int, error)
}

func NewBoltNamed

func NewBoltNamed(addr string) (NodeNamed, error)

func NewConsulNamed

func NewConsulNamed(addr string) (NodeNamed, error)

func NewEtcdNamed

func NewEtcdNamed(addr string) (NodeNamed, error)

Jump to

Keyboard shortcuts

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