Skip to content

Commit

Permalink
Update comments and byte alignment (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
lancoLiu authored Jun 21, 2021
1 parent cc8ccf6 commit 70f3200
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bfe_balance/backend/bfe_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ type BfeBackend struct {

sync.RWMutex // guards following fields
avail bool // whether the backend is usable
restarted bool // indicate if this backend is new bring-up by health-check
connNum int // number of connections backend hold
failNum int // number of consecutive failures of normal requests
succNum int // number of consecutive successes of health-check request

closeChan chan bool // tell health-check to stop

restarted bool // indicate if this backend is new bring-up by health-check
}

func NewBfeBackend() *BfeBackend {
Expand Down
4 changes: 2 additions & 2 deletions bfe_balance/backend/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func UpdateStatus(backend *BfeBackend, cluster string) bool {
// get conf of health check, which is separately stored for each cluster
checkConf := getCheckConf(cluster)
if checkConf == nil {
// just ingore if not found health check conf
// just ignore if not found health check conf
return false
}

Expand Down Expand Up @@ -66,7 +66,7 @@ loop:
default:
}

// get lastest conf for health check
// get the latest conf to do health check
checkConf := getCheckConf(cluster)
if checkConf == nil {
// never come here
Expand Down
2 changes: 1 addition & 1 deletion bfe_balance/bal_gslb/bal_gslb.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (bal *BalanceGslb) SetSlowStart(backendConf cluster_conf.BackendBasic) {
bal.lock.Unlock()
}

// Init inializes gslb cluster with config
// Init initializes gslb cluster with config
func (bal *BalanceGslb) Init(gslbConf gslb_conf.GslbClusterConf) error {
totalWeight := 0

Expand Down
8 changes: 4 additions & 4 deletions bfe_config/bfe_cluster_conf/cluster_conf/cluster_conf_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const (

const (
// AnyStatusCode is a special status code used in health-check.
// If AnyStatusCode is used, any status code is acceptd for health-check response.
// If AnyStatusCode is used, any status code is accepted for health-check response.
AnyStatusCode = 0
)

Expand Down Expand Up @@ -390,9 +390,9 @@ func HashConfCheck(conf *HashConf) error {
}

if *conf.HashStrategy != ClientIdOnly &&
*conf.HashStrategy != ClientIpOnly &&
*conf.HashStrategy != ClientIdPreferred &&
*conf.HashStrategy != RequestURI {
*conf.HashStrategy != ClientIpOnly &&
*conf.HashStrategy != ClientIdPreferred &&
*conf.HashStrategy != RequestURI {
return fmt.Errorf("HashStrategy[%d] must be [%d], [%d], [%d] or [%d]",
*conf.HashStrategy, ClientIdOnly, ClientIpOnly, ClientIdPreferred, RequestURI)
}
Expand Down

0 comments on commit 70f3200

Please sign in to comment.