Expose SkipNodeUpdate field and some health check info in the http api

pull/3636/head
Kyle Havlovitz 7 years ago committed by Frank Schroeder
parent b6de1f7446
commit a7c42a6c2a
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD

@ -28,7 +28,7 @@ func (c *Catalog) Register(args *structs.RegisterRequest, reply *struct{}) error
defer metrics.MeasureSince([]string{"catalog", "register"}, time.Now())
// Verify the args.
if args.Node == "" || args.Address == "" {
if args.Node == "" || (args.Address == "" && !args.SkipNodeUpdate) {
return fmt.Errorf("Must provide node and address")
}
if args.ID != "" {

@ -482,6 +482,11 @@ type HealthCheck struct {
ServiceName string // optional service name
ServiceTags []string // optional service tags
HTTP string `json:",omitempty"`
TCP string `json:",omitempty"`
Interval string `json:",omitempty"`
Timeout string `json:",omitempty"`
RaftIndex
}

@ -15,6 +15,10 @@ type AgentCheck struct {
Output string
ServiceID string
ServiceName string
HTTP string
TCP string
Interval string
Timeout string
}
// AgentService represents a service known to the agent

@ -42,6 +42,7 @@ type CatalogRegistration struct {
Datacenter string
Service *AgentService
Check *AgentCheck
SkipNodeUpdate bool
}
type CatalogDeregistration struct {

@ -34,6 +34,11 @@ type HealthCheck struct {
ServiceID string
ServiceName string
ServiceTags []string
HTTP string
TCP string
Interval string
Timeout string
}
// HealthChecks is a collection of HealthCheck structs.

Loading…
Cancel
Save