selector

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGRPC added in v0.0.4

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

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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL