grpcserver

package
v0.0.0-...-9135e14 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnableAccessLog bool = false

Functions

func BuildGRPCServerOptions

func BuildGRPCServerOptions(ctx context.Context, config *GRPCServerConfig) []grpc.ServerOption

func DebugLoggingInterceptor

func DebugLoggingInterceptor() grpc.UnaryServerInterceptor

func GetMaxConnectionIdle

func GetMaxConnectionIdle() time.Duration

func NewServer

func NewServer(ctx context.Context, grpcConfig *GRPCServerConfig) (*grpc.Server, error)

func SetGrpcAuth

func SetGrpcAuth(ctx context.Context, auth GRPCServerAuth) context.Context

func SetMaxConnectionIdle

func SetMaxConnectionIdle(idle time.Duration)

func SetSelfSignedCerds

func SetSelfSignedCerds(ctx context.Context) context.Context

Types

type GRPCServerAuth

type GRPCServerAuth interface {
	Auth(ctx context.Context, md metadata.MD) error
}

type GRPCServerConfig

type GRPCServerConfig struct {
	MaxMsgSize           int    `mapstructure:"max_msg_size,omitempty" json:"max_msg_size,omitempty"`
	MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams,omitempty" json:"max_concurrent_streams,omitempty"`
}

Config grpcboot config

Jump to

Keyboard shortcuts

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