Documentation ¶
Index ¶
- Constants
- func DelServicer(s Servicer)
- func Empty() *node
- func ExtractAddress(address string) (string, int)
- func GenerateAddress(host string, port int) string
- func NewNode(host string, port int, opts ...Option) *node
- func SetServicer(s Servicer) (err error)
- func UpdateServicer(s Servicer)
- type Node
- type Option
- type Servicer
- type Statistics
Constants ¶
View Source
const ( TypeRegistry uint8 = 1 TypeIPPort uint8 = 2 TypeDomain uint8 = 3 )
Variables ¶
This section is empty.
Functions ¶
func DelServicer ¶
func DelServicer(s Servicer)
func ExtractAddress ¶ added in v1.0.2
func GenerateAddress ¶ added in v1.0.2
func SetServicer ¶
func UpdateServicer ¶ added in v1.0.5
func UpdateServicer(s Servicer)
Types ¶
type Option ¶ added in v1.0.2
type Option func(*node)
func WithFloatWeight ¶ added in v1.0.2
func WithWeight ¶ added in v1.0.2
type Servicer ¶
type Servicer interface { Name() string RegistryName() string Pick(ctx context.Context) (Node, error) All(ctx context.Context) ([]Node, error) Done(ctx context.Context, node Node, err error) error GetCaCrt() []byte GetClientPem() []byte GetClientKey() []byte }
func GetServicer ¶
type Statistics ¶ added in v1.0.2
Click to show internal directories.
Click to hide internal directories.