Documentation
¶
Index ¶
- func DeRegister(c *gin.Context)
- func GetAllServices(c *gin.Context)
- func GetHealthServiceByName(c *gin.Context)
- func GetServiceByName(c *gin.Context)
- func Kv(c *gin.Context)
- func KvAll(c *gin.Context)
- func Pass(c *gin.Context)
- func Register(c *gin.Context)
- type Addr
- type CheckVo
- type HealthAddr
- type HealthServiceResp
- type HealthServiceRespChecks
- type HealthServiceRespNode
- type HealthServiceRespService
- type IpPort
- type ServiceResp
- type ServiceVo
- type TaggedAddresses
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HealthAddr ¶
type HealthServiceResp ¶
type HealthServiceResp struct {
Node HealthServiceRespNode
Service HealthServiceRespService
Checks []HealthServiceRespChecks
}
health service response
func GetHealthServiceResp ¶
func GetHealthServiceResp(serviceName string) HealthServiceResp
init GetHealthServiceResponse by serviceName
type HealthServiceRespChecks ¶
type HealthServiceRespNode ¶
type HealthServiceRespNode struct {
ID string
Node string
Address string
Datacenter string
TaggedAddresses TaggedAddresses
}
type HealthServiceRespService ¶
type HealthServiceRespService struct {
ID string
Service string
Address string
TaggedAddresses HealthAddr
Port int
}
type ServiceResp ¶
type ServiceResp struct {
ID string
Node string
Address string
Datacenter string
ServiceAddress string
ServiceID string
ServiceName string
ServicePort int
ServiceTaggedAddresses Addr
}
catalog service response json
type ServiceVo ¶
type ServiceVo struct {
Id string `json:"id" from:"id"`
Name string `json:"name"`
Port int `json:"port"`
Address string `json:"address"`
Check CheckVo `json:"check"`
}
*
{
"id": "web1",
"name": "web",
"port": 80,
"check": {
"name": "ping check",
"args": ["ping", "-c1", "learn.hashicorp.com"],
"interval": "30s",
"status": "passing"
}
}
service register json
Click to show internal directories.
Click to hide internal directories.