config

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 1 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	// DialTimeout dial rpc server timeout
	DialTimeout time.Duration
	// Block dial mode: sync or async
	Block bool
	// Balancer client balancer, default round robbin
	Balancer string
	// Target rpc server endpoint
	Target string
	// Timeout rpc request timeout
	Timeout time.Duration
	// GRPC ClientParameters
	KeepAliveInterval time.Duration
	KeepAliveTimeout  time.Duration
	// SlowRequestDuration client slow request timeout
	SlowRequestDuration time.Duration
	// NotLog escape log detail path
	NotLog []string
	// MaxCallSendMsgSize default 4*1024*1024
	MaxCallSendMsgSize int
}

ClientConfig rpc client configs

func DefaultClientConfig

func DefaultClientConfig() *ClientConfig

DefaultClientConfig default client config for starting rpc client out of box

type ServerConfig

type ServerConfig struct {
	// Addr server addr,it may be ":8080" or "127.0.0.1:8080"
	Addr string
	// Timeout rpc request timeout
	Timeout time.Duration
	// GRPC ServerParameters
	IdleTimeout       time.Duration
	MaxLifeTime       time.Duration
	ForceCloseWait    time.Duration
	KeepAliveInterval time.Duration
	KeepAliveTimeout  time.Duration
	// SlowRequestDuration slow rpc request timeout
	SlowRequestDuration time.Duration
	// WatchConfig whether watch config file changes
	WatchConfig bool
	// NotLog escape log detail path
	NotLog                []string
	MaxReceiveMessageSize int
}

ServerConfig rpc server config

func DefaultServerConfig

func DefaultServerConfig() *ServerConfig

DefaultServerConfig default server config for starting rpc server out of box

Jump to

Keyboard shortcuts

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