transportcfg

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(caBundle string) (*http.Client, error)

func WithProfileTimeout

func WithProfileTimeout(ctx context.Context, profile Profile) (context.Context, context.CancelFunc)

Types

type Config

type Config struct {
	BridgeHealthProbeTimeout time.Duration
	BridgeDialTimeout        time.Duration
	BridgeWriteTimeout       time.Duration
	BridgeReadTimeout        time.Duration

	HTTPDialTimeout           time.Duration
	HTTPKeepAlive             time.Duration
	HTTPTLSHandshakeTimeout   time.Duration
	HTTPResponseHeaderTimeout time.Duration
	HTTPIdleConnTimeout       time.Duration
	HTTPMaxIdleConns          int
	HTTPMaxIdleConnsPerHost   int

	ProfileTimeouts map[Profile]time.Duration
}

func Resolve

func Resolve() Config

func (Config) TimeoutForProfile

func (c Config) TimeoutForProfile(profile Profile) time.Duration

type Profile

type Profile string
const (
	ProfileBridgeFastPath Profile = "bridge_fast_path"
	ProfileHealthProbe    Profile = "health_probe"
	ProfileAuthRefresh    Profile = "auth_refresh"
	ProfileRPCDefault     Profile = "rpc_default"
	ProfileRPCReadHeavy   Profile = "rpc_read_heavy"
)

Jump to

Keyboard shortcuts

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