Documentation ¶
Overview ¶
Package selector implements the functions, types, and interfaces for the module.
Package selector implements the functions, types, and interfaces for the module.
Package selector implements the functions, types, and interfaces for the module.
Index ¶
- func DefaultGRPC(cfg *configv1.Service_Selector) (transgrpc.ClientOption, error)
- func DefaultHTTP(cfg *configv1.Service_Selector) (transhttp.ClientOption, error)
- func NewFilter(cfg *configv1.Service_Selector) (selector.NodeFilter, error)
- func SetGlobalSelector(selectorType string)
- type GRPCFunc
- type HTTPFunc
- type NodeFilter
- type Option
- type OptionSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGRPC ¶ added in v0.0.4
func DefaultGRPC(cfg *configv1.Service_Selector) (transgrpc.ClientOption, error)
DefaultGRPC returns a default gRPC client option based on the provided service selector configuration.
If the version is specified in the configuration, it sets a node filter with the version.
func DefaultHTTP ¶ added in v0.0.4
func DefaultHTTP(cfg *configv1.Service_Selector) (transhttp.ClientOption, error)
DefaultHTTP returns a default HTTP client option based on the provided service selector configuration.
If the version is specified in the configuration, it sets a node filter with the version.
func NewFilter ¶ added in v0.1.0
func NewFilter(cfg *configv1.Service_Selector) (selector.NodeFilter, error)
func SetGlobalSelector ¶
func SetGlobalSelector(selectorType string)
SetGlobalSelector sets the global selector.
Types ¶
type GRPCFunc ¶ added in v0.1.0
type GRPCFunc = func(cfg *configv1.Service_Selector) (transgrpc.ClientOption, error)
GRPCFunc is a function type that returns a gRPC client option. It takes a service selector configuration as input and returns a client option and an error.
type HTTPFunc ¶ added in v0.1.0
type HTTPFunc = func(cfg *configv1.Service_Selector) (transhttp.ClientOption, error)
HTTPFunc is a function type that returns an HTTP client option. It takes a service selector configuration as input and returns a client option and an error.
type NodeFilter ¶ added in v0.1.0
type NodeFilter = selector.NodeFilter
type Option ¶ added in v0.1.0
type Option struct { // GRPC is a function that returns a gRPC client option. GRPC GRPCFunc // HTTP is a function that returns an HTTP client option. HTTP HTTPFunc }
Option represents a configuration option for a selector.
type OptionSetting ¶ added in v0.1.0
type OptionSetting = func(config *Option)
OptionSetting is a function type that sets a selector option.