Documentation ¶
Index ¶
Constants ¶
View Source
const Version = "v0.0.6"
Variables ¶
This section is empty.
Functions ¶
func RegisterResolver ¶ added in v0.0.2
func RegisterService ¶
ctx 可控制租约
func ServiceName2Key ¶
func SetEtcdClient ¶
Types ¶
type EtcdResolverBuilder ¶
type EtcdResolverBuilder struct{}
func (*EtcdResolverBuilder) Build ¶
func (*EtcdResolverBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
func (*EtcdResolverBuilder) Scheme ¶
func (*EtcdResolverBuilder) Scheme() string
type ServiceDiscovery ¶
type ServiceDiscovery struct {
// contains filtered or unexported fields
}
func NewServiceDiscovery ¶
func NewServiceDiscovery(client *clientv3.Client) *ServiceDiscovery
func (*ServiceDiscovery) DiscoverServices ¶
func (sd *ServiceDiscovery) DiscoverServices(servicename string) ([]string, error)
func (*ServiceDiscovery) WatchServices ¶
func (sd *ServiceDiscovery) WatchServices(ctx context.Context, servicename string) <-chan struct{}
Click to show internal directories.
Click to hide internal directories.