grpcserver

package
v2.1.50 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port string

	// 性能配置
	Performance struct {
		MaxConcurrentStreams  uint32
		MaxRecvMsgSize        int
		MaxSendMsgSize        int
		InitialWindowSize     int32
		InitialConnWindowSize int32
		WriteBufferSize       int
		ReadBufferSize        int
	}

	// Keepalive 配置
	Keepalive struct {
		MaxConnectionIdleSec     time.Duration
		MaxConnectionAgeSec      time.Duration
		MaxConnectionAgeGraceSec time.Duration
		TimeSec                  time.Duration
		TimeoutSec               time.Duration
	}

	// 连接策略配置
	KeepAlivePolicy struct {
		MinTimeSec          time.Duration
		PermitWithoutStream bool
	}
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(configPath string, serviceList ...Service) *Manager

func (*Manager) Run

func (m *Manager) Run(ctx context.Context) error

type Service

type Service interface {
	RegisterService(s grpc.ServiceRegistrar)
}

Jump to

Keyboard shortcuts

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