diff --git a/api/api_client.gen.go b/api/api_client.gen.go index 6add407c4..f90364e45 100644 --- a/api/api_client.gen.go +++ b/api/api_client.gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. package api import ( diff --git a/api/api_server.gen.go b/api/api_server.gen.go index acaf12e62..fdcdd2e05 100644 --- a/api/api_server.gen.go +++ b/api/api_server.gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. package api import ( diff --git a/api/api_types.gen.go b/api/api_types.gen.go index 46c3ba9d7..cda20516f 100644 --- a/api/api_types.gen.go +++ b/api/api_types.gen.go @@ -1,6 +1,6 @@ // Package api provides primitives to interact with the openapi HTTP API. // -// Code generated by github.com/deepmap/oapi-codegen version v1.15.0 DO NOT EDIT. +// Code generated by github.com/deepmap/oapi-codegen version v1.16.2 DO NOT EDIT. package api // ApiBlockingStatus defines model for api.BlockingStatus. diff --git a/config/config.go b/config/config.go index 1f181c388..6d249d701 100644 --- a/config/config.go +++ b/config/config.go @@ -124,7 +124,7 @@ func (s *StartStrategyType) do(setup func() error, logErr func(error)) error { type QueryLogField string // UpstreamStrategy data field to be logged -// ENUM(parallel_best,strict) +// ENUM(parallel_best,strict,random) type UpstreamStrategy uint8 //nolint:gochecknoglobals diff --git a/config/config_enum.go b/config/config_enum.go index 9bc7574b8..422afd70a 100644 --- a/config/config_enum.go +++ b/config/config_enum.go @@ -482,15 +482,18 @@ const ( UpstreamStrategyParallelBest UpstreamStrategy = iota // UpstreamStrategyStrict is a UpstreamStrategy of type Strict. UpstreamStrategyStrict + // UpstreamStrategyRandom is a UpstreamStrategy of type Random. + UpstreamStrategyRandom ) var ErrInvalidUpstreamStrategy = fmt.Errorf("not a valid UpstreamStrategy, try [%s]", strings.Join(_UpstreamStrategyNames, ", ")) -const _UpstreamStrategyName = "parallel_beststrict" +const _UpstreamStrategyName = "parallel_beststrictrandom" var _UpstreamStrategyNames = []string{ _UpstreamStrategyName[0:13], _UpstreamStrategyName[13:19], + _UpstreamStrategyName[19:25], } // UpstreamStrategyNames returns a list of possible string values of UpstreamStrategy. @@ -505,12 +508,14 @@ func UpstreamStrategyValues() []UpstreamStrategy { return []UpstreamStrategy{ UpstreamStrategyParallelBest, UpstreamStrategyStrict, + UpstreamStrategyRandom, } } var _UpstreamStrategyMap = map[UpstreamStrategy]string{ UpstreamStrategyParallelBest: _UpstreamStrategyName[0:13], UpstreamStrategyStrict: _UpstreamStrategyName[13:19], + UpstreamStrategyRandom: _UpstreamStrategyName[19:25], } // String implements the Stringer interface. @@ -531,6 +536,7 @@ func (x UpstreamStrategy) IsValid() bool { var _UpstreamStrategyValue = map[string]UpstreamStrategy{ _UpstreamStrategyName[0:13]: UpstreamStrategyParallelBest, _UpstreamStrategyName[13:19]: UpstreamStrategyStrict, + _UpstreamStrategyName[19:25]: UpstreamStrategyRandom, } // ParseUpstreamStrategy attempts to convert a string to a UpstreamStrategy.