Documentation ¶
Index ¶
- Constants
- func AddLocal(local *Local)
- func Close()
- func Dial(serviceName ServiceName, group string) (grpc.ClientConnInterface, error)
- func DialDefault(serviceName ServiceName) (grpc.ClientConnInterface, error)
- func SetLoadBalance(name string)
- func SetLocals(locals []*Local)
- func SetMode(m Mode)
- type LoadBalance
- type Local
- type Locals
- type Mode
- type ServiceName
Constants ¶
View Source
const (
Scheme_Etcd = "etcd"
)
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(serviceName ServiceName, group string) (grpc.ClientConnInterface, error)
func DialDefault ¶ added in v0.0.2
func DialDefault(serviceName ServiceName) (grpc.ClientConnInterface, error)
func SetLoadBalance ¶ added in v0.0.2
func SetLoadBalance(name string)
Types ¶
type LoadBalance ¶ added in v0.0.2
func NewLoadBalance ¶ added in v0.0.2
func NewLoadBalance(name string) LoadBalance
type Local ¶
type Local struct { Host string `yaml:"host" json:"host"` Port int `yaml:"port" json:"port"` Name ServiceName `yaml:"name" json:"name"` Group string `yaml:"group" json:"group"` Weight int64 `yaml:"weight" json:"weight"` Version string `yaml:"version" json:"version"` }
func (*Local) ServiceName ¶
type ServiceName ¶
type ServiceName string
func (ServiceName) Default ¶
func (s ServiceName) Default() string
func (ServiceName) Group ¶
func (s ServiceName) Group(group string) string
Click to show internal directories.
Click to hide internal directories.