Documentation ¶
Index ¶
- Constants
- func DiscoveryServices(serviceName string, q *consul.QueryOptions) ([]consul.AgentServiceChecksInfo, error)
- func InitConsulClient()
- func RegisterGrpcConsul(serviceStruct ServiceConsul) error
- func RegisterWebConsul(serviceStruct ServiceConsul) error
- func UnRegisterConsul(serviceId string)
- type Resolver
- type ServiceConsul
Constants ¶
View Source
const (
DataEmptyError = "data find empty"
)
Variables ¶
This section is empty.
Functions ¶
func DiscoveryServices ¶ added in v0.0.41
func DiscoveryServices(serviceName string, q *consul.QueryOptions) ([]consul.AgentServiceChecksInfo, error)
func InitConsulClient ¶
func InitConsulClient()
func RegisterGrpcConsul ¶
func RegisterGrpcConsul(serviceStruct ServiceConsul) error
func RegisterWebConsul ¶
func RegisterWebConsul(serviceStruct ServiceConsul) error
func UnRegisterConsul ¶
func UnRegisterConsul(serviceId string)
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver for grpc client
func NewResolver ¶
NewResolver create a new resolver.Builder base on etcd
func (*Resolver) Build ¶
func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
Build creates a new resolver.Resolver for the given target
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(o resolver.ResolveNowOptions)
ResolveNow resolver.Resolver interface
Click to show internal directories.
Click to hide internal directories.