Skip to content

Commit

Permalink
add mirror health checking
Browse files Browse the repository at this point in the history
Currently, the mirror is set to unavailable if the failed times reach failure_limit.
We added mirror health checking, which will recover unavailable mirror.
The failure_limit indicates the failed time at which the mirror is set to unavailable.
The health_check_interval indicates the time interval to recover the unavailable mirror.
The ping_url is the endpoint to check mirror server health.

Signed-off-by: Bin Tang <[email protected]>
  • Loading branch information
sctb512 committed Nov 4, 2022
1 parent 7801806 commit 7851ea8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config/daemonconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ type DaemonConfig struct {
}

type MirrorConfig struct {
Host string `json:"host,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Host string `json:"host,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
AuthThrough bool `json:"auth_through,omitempty"`
HealthCheckInterval int `json:"health_check_interval,omitempty"`
FailureLimit uint8 `json:"failure_limit,omitempty"`
PingURL string `json:"ping_url,omitempty"`
}
type BackendConfig struct {
// Localfs backend configs
Expand Down

0 comments on commit 7851ea8

Please sign in to comment.