etcdv3name

package
v0.0.0-...-93b0e25 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConn

func GetConn(schema, serviceName string, etcdCfg *EtcdCfg) (*grpc.ClientConn, error)

func GetPrefix

func GetPrefix(schema, serviceName string) string

"%s:///%s/"

func Int32ToString

func Int32ToString(i int32) string

func OperationIDGenerator

func OperationIDGenerator() string

func RegisterEtcd

func RegisterEtcd(schema string, cfg *EtcdCfg, myHost string, myPort int, serviceName string, ttl int) (err error)

etcdAddr separated by commas ttl:单位秒

func UnRegisterEtcd

func UnRegisterEtcd()

Types

type EtcdCfg

type EtcdCfg struct {
	Endpoints []string `json:"endpoints"`
	Username  string   `json:"username"`
	Password  string   `json:"password"`
}

type RegEtcd

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

type Resolver

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

func NewResolver

func NewResolver(schema, serviceName string, etcdCfg *EtcdCfg) (*Resolver, error)

func (*Resolver) Build

func (*Resolver) Close

func (r1 *Resolver) Close()

func (*Resolver) ResolveNow

func (r1 *Resolver) ResolveNow(rn resolver.ResolveNowOptions)

func (*Resolver) Scheme

func (r *Resolver) Scheme() string

Jump to

Keyboard shortcuts

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