Documentation
¶
Index ¶
- Constants
- func DefaultClient() *capi.Client
- func InitDefaultClient(consulServerAddr string) *capi.Client
- func NewClient(consulServerAddr string) (*capi.Client, error)
- func NewGrpcSvcCheck(host string, port int, interval, timeout string, useTLS bool) *capi.AgentServiceCheck
- func NewHTTPSvcCheck(name, url string, headers map[string][]string, ...) *capi.AgentServiceCheck
- func OneHealthSvcRandom(svcName, tag string) (*capi.AgentService, error)
- func SvcDeregistration(serviceID string) error
- func SvcRegistration(svc *SvcInfo) error
- type SvcInfo
Constants ¶
View Source
const (
// LBPolicyRandom lb policy: random
LBPolicyRandom = "csl_random"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultClient ¶
DefaultClient get default consul client instance
func InitDefaultClient ¶
InitDefaultClient init default consul client
func NewGrpcSvcCheck ¶
func NewGrpcSvcCheck(host string, port int, interval, timeout string, useTLS bool) *capi.AgentServiceCheck
NewGrpcSvcCheck ...
func NewHTTPSvcCheck ¶
func NewHTTPSvcCheck(name, url string, headers map[string][]string, method, interval, timeout string) *capi.AgentServiceCheck
NewHTTPSvcCheck interval and timeout are in Go time format
reference: https://www.consul.io/docs/agent/checks.html
func OneHealthSvcRandom ¶
func OneHealthSvcRandom(svcName, tag string) (*capi.AgentService, error)
OneHealthSvcRandom ...
Types ¶
Click to show internal directories.
Click to hide internal directories.