config

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

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
}

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
}

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