Skip to content

Commit

Permalink
feat: back source when no available peers or scheduler error (#521)
Browse files Browse the repository at this point in the history
* feature: back source when no available peers

Signed-off-by: Jim Ma <majinjing3@gmail.com>
  • Loading branch information
jim3ma committed Aug 6, 2021
1 parent c0bc4a9 commit 85bfa36
Show file tree
Hide file tree
Showing 16 changed files with 633 additions and 324 deletions.
8 changes: 6 additions & 2 deletions client/config/peerhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ import (
"strings"
"time"

"github.com/pkg/errors"
"gopkg.in/yaml.v3"

"d7y.io/dragonfly/v2/cmd/dependency/base"
"d7y.io/dragonfly/v2/pkg/unit"
"d7y.io/dragonfly/v2/pkg/util/stringutils"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"

"d7y.io/dragonfly/v2/client/clientutil"
"d7y.io/dragonfly/v2/pkg/basic/dfnet"
Expand Down Expand Up @@ -120,6 +121,9 @@ type SchedulerOption struct {

// ScheduleTimeout is request timeout.
ScheduleTimeout clientutil.Duration `mapstructure:"scheduleTimeout" yaml:"scheduleTimeout"`

// DisableAutoBackSource indicates not back source normally, only scheduler says back source
DisableAutoBackSource bool `mapstructure:"disableAutoBackSource" yaml:"disableAutoBackSource"`
}

type HostOption struct {
Expand Down

0 comments on commit 85bfa36

Please sign in to comment.