options

package
v0.17.17 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: Apache-2.0 Imports: 22 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RecvMsgSize = 100 * 1024 * 1024 // 100MB
	SendMsgSize = 100 * 1024 * 1024 // 100MB
)

These are defined as global variables, so that folks can expose them as flags in their entrypoints, if they choose.

Functions

func ClientOptions added in v0.17.9

func ClientOptions() []option.ClientOption

ClientOptions wraps GRPCDialOptions as google.golang.org/api/option.ClientOption for use with Google API clients.

func GRPCDialOptions added in v0.17.9

func GRPCDialOptions() []grpc.DialOption

GRPCDialOptions returns the standard set of gRPC dial options for production use, including OTEL tracing, Prometheus client metrics, client identity propagation, and retry support.

func GRPCOptions

func GRPCOptions(delegate url.URL) (string, []grpc.DialOption)

GRPCOptions returns a target address and dial options appropriate for the given URL scheme (http, https, bufnet, or registered test listeners).

func LoopbackDialOptions added in v0.17.16

func LoopbackDialOptions() []grpc.DialOption

LoopbackDialOptions returns a minimal set of dial options suitable for grpc-gateway loopback connections. It includes the clientid interceptor (so the server sees who originated the REST call) but omits client-side Prometheus metrics, OTEL tracing, and retries which would double-count or create noisy self-referential telemetry.

func RegisterListenerForTest added in v0.4.0

func RegisterListenerForTest(listener DialableListener) string

Register a test listener and get a provided scheme.

func UnregisterTestListener added in v0.4.0

func UnregisterTestListener(scheme string)

Unregister a test listener.

Types

type DialableListener added in v0.4.0

type DialableListener interface {
	net.Listener

	Dial() (net.Conn, error)
}
var ListenerForTest DialableListener

ListenerForTest is to support bufnet in our testing.

Jump to

Keyboard shortcuts

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