delete unused LoadBalanceAlgorithm
This commit is contained in:
parent
60569137ca
commit
e93763da6a
2 changed files with 0 additions and 15 deletions
|
@ -76,9 +76,6 @@ const (
|
||||||
// http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache
|
// http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache
|
||||||
sslSessionCacheSize = "10m"
|
sslSessionCacheSize = "10m"
|
||||||
|
|
||||||
// Default setting for load balancer algorithm
|
|
||||||
defaultLoadBalancerAlgorithm = ""
|
|
||||||
|
|
||||||
// Parameters for a shared memory zone that will keep states for various keys.
|
// Parameters for a shared memory zone that will keep states for various keys.
|
||||||
// http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone
|
// http://nginx.org/en/docs/http/ngx_http_limit_conn_module.html#limit_conn_zone
|
||||||
defaultLimitConnZoneVariable = "$binary_remote_addr"
|
defaultLimitConnZoneVariable = "$binary_remote_addr"
|
||||||
|
@ -381,9 +378,6 @@ type Configuration struct {
|
||||||
// http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout
|
// http://nginx.org/en/docs/ngx_core_module.html#worker_shutdown_timeout
|
||||||
WorkerShutdownTimeout string `json:"worker-shutdown-timeout,omitempty"`
|
WorkerShutdownTimeout string `json:"worker-shutdown-timeout,omitempty"`
|
||||||
|
|
||||||
// Defines the load balancing algorithm to use. The deault is round-robin
|
|
||||||
LoadBalanceAlgorithm string `json:"load-balance,omitempty"`
|
|
||||||
|
|
||||||
// Sets the bucket size for the variables hash table.
|
// Sets the bucket size for the variables hash table.
|
||||||
// http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size
|
// http://nginx.org/en/docs/http/ngx_http_map_module.html#variables_hash_bucket_size
|
||||||
VariablesHashBucketSize int `json:"variables-hash-bucket-size,omitempty"`
|
VariablesHashBucketSize int `json:"variables-hash-bucket-size,omitempty"`
|
||||||
|
@ -637,7 +631,6 @@ func NewDefault() Configuration {
|
||||||
UseGeoIP2: false,
|
UseGeoIP2: false,
|
||||||
WorkerProcesses: strconv.Itoa(runtime.NumCPU()),
|
WorkerProcesses: strconv.Itoa(runtime.NumCPU()),
|
||||||
WorkerShutdownTimeout: "10s",
|
WorkerShutdownTimeout: "10s",
|
||||||
LoadBalanceAlgorithm: defaultLoadBalancerAlgorithm,
|
|
||||||
VariablesHashBucketSize: 128,
|
VariablesHashBucketSize: 128,
|
||||||
VariablesHashMaxSize: 2048,
|
VariablesHashMaxSize: 2048,
|
||||||
UseHTTP2: true,
|
UseHTTP2: true,
|
||||||
|
|
|
@ -151,11 +151,3 @@ func TestMergeConfigMapToStruct(t *testing.T) {
|
||||||
t.Errorf("unexpected diff: (-got +want)\n%s", diff)
|
t.Errorf("unexpected diff: (-got +want)\n%s", diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDefaultLoadBalance(t *testing.T) {
|
|
||||||
conf := map[string]string{}
|
|
||||||
to := ReadConfig(conf)
|
|
||||||
if to.LoadBalanceAlgorithm != "" {
|
|
||||||
t.Errorf("default load balance algorithm wrong")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue