etcdbalancer

package module
v0.0.0-...-1f9e48c Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Register

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

Register grpc server register to etcd and keepalive

func NewRegister

func NewRegister(schema, name, addr string, config etcd.Config) *Register

NewRegister new register

func (*Register) RegisterServer

func (r *Register) RegisterServer(ttl int64) error

RegisterServer register server to etcd

func (*Register) UnRegister

func (r *Register) UnRegister()

UnRegister remove server from etcd

type Resolver

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

Resolver grpc remote server address resolver

func NewResolver

func NewResolver(schema string, config etcd.Config) *Resolver

NewResolver new resolver

func (*Resolver) Build

Build implement grpc Builder interface

func (*Resolver) Close

func (r *Resolver) Close()

Close graceful close grpc resolver balancer

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(option resolver.ResolveNowOption)

func (*Resolver) Scheme

func (r *Resolver) Scheme() string

Scheme implement grpc Builder interface

Directories

Path Synopsis
example module

Jump to

Keyboard shortcuts

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