server

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEchoServiceServer

func NewEchoServiceServer() *echoServiceServer

func NewServer

func NewServer(handler Handler, mw []grpc.UnaryServerInterceptor, streamMw []grpc.StreamServerInterceptor, addr net.Addr, logger pry.Logger, options ...grpc.ServerOption) *server

Types

type ErrorMapper

type ErrorMapper interface {
	Errors() map[error]codes.Code
}

type Handler

type Handler interface {
	Setup(server *grpc.Server)
}

type Interceptor

type Interceptor interface {
	Run() grpc.UnaryServerInterceptor
}

Interceptor: chained in the order the caller lists them, outermost first. status (error→gRPC code mapping) has to sit inside tracing and log, or both see every failure as Unknown.

type Interceptors added in v1.6.1

type Interceptors []Interceptor

Interceptors is the chain, in order. Named, so it is one replaceable thing rather than an argument every registration has to repeat.

type StreamInterceptor

type StreamInterceptor interface {
	Run() grpc.StreamServerInterceptor
}

type StreamInterceptors added in v1.6.1

type StreamInterceptors []StreamInterceptor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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