Skip to content

Commit

Permalink
feat: dfdaemon add default healthy config (#1472)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <gaius.qi@gmail.com>
  • Loading branch information
gaius-qi committed Jul 20, 2022
1 parent fb813df commit 73819f7
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ const (
DefaultPeerStartPort = 65000
DefaultUploadStartPort = 65002
DefaultObjectStorageStartPort = 65004
DefaultHealthyStartPort = 40901
)
16 changes: 16 additions & 0 deletions client/config/peerhost_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ var peerHostConfig = func() *DaemonOption {
Multiplex: false,
DiskGCThresholdPercent: 95,
},
Health: &HealthOption{
ListenOption: ListenOption{
Security: SecurityOption{
Insecure: true,
TLSVerify: false,
},
TCPListen: &TCPListenOption{
Listen: net.IPv4zero.String(),
PortRange: TCPListenPortRange{
Start: DefaultHealthyStartPort,
End: DefaultEndPort,
},
},
},
Path: "/server/ping",
},
Reload: ReloadOption{
Interval: util.Duration{
Duration: time.Minute,
Expand Down
16 changes: 16 additions & 0 deletions client/config/peerhost_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,22 @@ var peerHostConfig = func() *DaemonOption {
Multiplex: false,
DiskGCThresholdPercent: 95,
},
Health: &HealthOption{
ListenOption: ListenOption{
Security: SecurityOption{
Insecure: true,
TLSVerify: false,
},
TCPListen: &TCPListenOption{
Listen: net.IPv4zero.String(),
PortRange: TCPListenPortRange{
Start: DefaultHealthyStartPort,
End: DefaultEndPort,
},
},
},
Path: "/server/ping",
},
Reload: ReloadOption{
Interval: util.Duration{
Duration: time.Minute,
Expand Down

0 comments on commit 73819f7

Please sign in to comment.