mirror of https://github.com/status-im/consul.git
fix(check): added missing OSService props
This commit is contained in:
parent
5719fd6560
commit
461b42ed48
|
@ -1792,6 +1792,7 @@ type HealthCheckDefinition struct {
|
||||||
TCP string `json:",omitempty"`
|
TCP string `json:",omitempty"`
|
||||||
UDP string `json:",omitempty"`
|
UDP string `json:",omitempty"`
|
||||||
H2PING string `json:",omitempty"`
|
H2PING string `json:",omitempty"`
|
||||||
|
OSService string `json:",omitempty"`
|
||||||
H2PingUseTLS bool `json:",omitempty"`
|
H2PingUseTLS bool `json:",omitempty"`
|
||||||
Interval time.Duration `json:",omitempty"`
|
Interval time.Duration `json:",omitempty"`
|
||||||
OutputMaxSize uint `json:",omitempty"`
|
OutputMaxSize uint `json:",omitempty"`
|
||||||
|
@ -1943,6 +1944,7 @@ func (c *HealthCheck) CheckType() *CheckType {
|
||||||
TCP: c.Definition.TCP,
|
TCP: c.Definition.TCP,
|
||||||
UDP: c.Definition.UDP,
|
UDP: c.Definition.UDP,
|
||||||
H2PING: c.Definition.H2PING,
|
H2PING: c.Definition.H2PING,
|
||||||
|
OSService: c.Definition.OSService,
|
||||||
H2PingUseTLS: c.Definition.H2PingUseTLS,
|
H2PingUseTLS: c.Definition.H2PingUseTLS,
|
||||||
Interval: c.Definition.Interval,
|
Interval: c.Definition.Interval,
|
||||||
DockerContainerID: c.Definition.DockerContainerID,
|
DockerContainerID: c.Definition.DockerContainerID,
|
||||||
|
|
|
@ -275,6 +275,7 @@ func (s *HTTPHandlers) convertOps(resp http.ResponseWriter, req *http.Request) (
|
||||||
TCP: check.Definition.TCP,
|
TCP: check.Definition.TCP,
|
||||||
GRPC: check.Definition.GRPC,
|
GRPC: check.Definition.GRPC,
|
||||||
GRPCUseTLS: check.Definition.GRPCUseTLS,
|
GRPCUseTLS: check.Definition.GRPCUseTLS,
|
||||||
|
OSService: check.Definition.OSService,
|
||||||
Interval: interval,
|
Interval: interval,
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
DeregisterCriticalServiceAfter: deregisterCriticalServiceAfter,
|
DeregisterCriticalServiceAfter: deregisterCriticalServiceAfter,
|
||||||
|
|
|
@ -64,6 +64,7 @@ type HealthCheckDefinition struct {
|
||||||
TCP string
|
TCP string
|
||||||
UDP string
|
UDP string
|
||||||
GRPC string
|
GRPC string
|
||||||
|
OSService string
|
||||||
GRPCUseTLS bool
|
GRPCUseTLS bool
|
||||||
IntervalDuration time.Duration `json:"-"`
|
IntervalDuration time.Duration `json:"-"`
|
||||||
TimeoutDuration time.Duration `json:"-"`
|
TimeoutDuration time.Duration `json:"-"`
|
||||||
|
|
|
@ -144,6 +144,7 @@ func HealthCheckDefinitionToStructs(s *HealthCheckDefinition, t *structs.HealthC
|
||||||
t.TCP = s.TCP
|
t.TCP = s.TCP
|
||||||
t.UDP = s.UDP
|
t.UDP = s.UDP
|
||||||
t.H2PING = s.H2PING
|
t.H2PING = s.H2PING
|
||||||
|
t.OSService = s.OSService
|
||||||
t.H2PingUseTLS = s.H2PingUseTLS
|
t.H2PingUseTLS = s.H2PingUseTLS
|
||||||
t.Interval = structs.DurationFromProto(s.Interval)
|
t.Interval = structs.DurationFromProto(s.Interval)
|
||||||
t.OutputMaxSize = uint(s.OutputMaxSize)
|
t.OutputMaxSize = uint(s.OutputMaxSize)
|
||||||
|
@ -172,6 +173,7 @@ func HealthCheckDefinitionFromStructs(t *structs.HealthCheckDefinition, s *Healt
|
||||||
s.TCP = t.TCP
|
s.TCP = t.TCP
|
||||||
s.UDP = t.UDP
|
s.UDP = t.UDP
|
||||||
s.H2PING = t.H2PING
|
s.H2PING = t.H2PING
|
||||||
|
s.OSService = t.OSService
|
||||||
s.H2PingUseTLS = t.H2PingUseTLS
|
s.H2PingUseTLS = t.H2PingUseTLS
|
||||||
s.Interval = structs.DurationToProto(t.Interval)
|
s.Interval = structs.DurationToProto(t.Interval)
|
||||||
s.OutputMaxSize = uint32(t.OutputMaxSize)
|
s.OutputMaxSize = uint32(t.OutputMaxSize)
|
||||||
|
|
Loading…
Reference in New Issue