Documentation ¶
Index ¶
- func CheckHeath(serviceid string) error
- func DeRegister(name string, addr string, port int) error
- func FindNode(servicename string) (*consulapi.AgentService, error)
- func FindServer(servicename string) (*grpc.ClientConn, error)
- func Init(config *Config) error
- func KVGet(key string, flags uint64) (*[]byte, error)
- func KVPut(key string, values *[]byte, flags uint64) (*consulapi.WriteMeta, error)
- func New() (*consulapi.Client, error)
- func Register(name string, addr string, port int, tags ...string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeRegister ¶
DeRegister 取消consul注册的服务
func FindServer ¶
func FindServer(servicename string) (*grpc.ClientConn, error)
FindServer 从consul中发现服务
Types ¶
Click to show internal directories.
Click to hide internal directories.