Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DialTarget 访问目标
DialTarget = schema + ":///"
)
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
func DialContext(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
DialContext 带上下文的拨号
Types ¶
type BuilderOptions ¶ added in v1.0.1
type BuilderOptions struct { Server string Version string Endpoint string LooperTime time.Duration }
BuilderOptions builder's configure
type ServerRegister ¶
ServerRegister regist or revoke server interface
func NewDefaultServerRegister ¶
func NewDefaultServerRegister(c ServerRegisterConfig) ServerRegister
NewDefaultServerRegister instance of server regitster
type ServerRegisterConfig ¶
type ServerRegisterConfig struct { Name string Target string Service string // host & port Version string // server's version TTL time.Duration Interval time.Duration RegistRetryTimes int // contains filtered or unexported fields }
ServerRegisterConfig struct server regiter config name: server name target: etcd' client url, separate by ',' serv: server address host:port interval: Rotation time to registe serv into etcd ttl: expired time, seconds registRetryTimes: allow failed to regist server and retry times; -1 alaways retry
Click to show internal directories.
Click to hide internal directories.