Documentation
¶
Index ¶
Constants ¶
View Source
const ( DISCOVERY_DEFAULT_INTERVAL = 3 DISCOVERY_DEFAULT_TTL = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery struct {
ServiceName string // register service name [required]
RpcAddr string // register server RPC address [required]
Interval int // register interval default 3 seconds [optional]
TTL int // register TTL default 10 seconds [optional]
Endpoints []string // register endpoints of etcd/consul/zookeeper eg. ["192.168.0.10:2379","192.168.0.11:2379"]
}
type EndpointType ¶
type EndpointType int
const ( EndpointType_MDNS EndpointType = 0 // multicast DNS EndpointType_ETCD EndpointType = 1 // etcd EndpointType_CONSUL EndpointType = 2 // consul EndpointType_ZOOKEEPER EndpointType = 3 // zookeeper )
func (EndpointType) String ¶
func (t EndpointType) String() string
Click to show internal directories.
Click to hide internal directories.