grpc

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceTag     = serviceTag{}
	ErrorMapperTag = errorMapperTag{}
)

Functions

func NewErrorMap

func NewErrorMap(mappers []server.ErrorMapper) server.ErrorMapper

func NewGrpcCommand

func NewGrpcCommand(commands []ServiceHandler, interceptors grpc.Interceptors, streamInterceptors grpc.StreamInterceptors, command app.BaseCommand, addr net.Addr, maxRecvMsgSize int, logger pry.Logger) *grpcCommand

func NewInterceptors added in v1.13.0

func NewInterceptors(interceptors []grpc.Interceptor) grpc.Interceptors

func NewStreamInterceptors added in v1.13.0

func NewStreamInterceptors(interceptors []grpc.StreamInterceptor) grpc.StreamInterceptors

func StreamChain added in v1.10.1

func StreamChain(interceptors grpc.StreamInterceptors) []baseGrpc.StreamServerInterceptor

func UnaryChain added in v1.10.1

func UnaryChain(interceptors grpc.Interceptors) []baseGrpc.UnaryServerInterceptor

Exported so an in-process test server builds the chain the same way.

Types

type Drainer added in v1.26.0

type Drainer interface {
	Drain()
}

type GrpcCommand

type GrpcCommand interface {
	app.Command
}

type InProcess added in v1.10.1

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

func Serve added in v1.10.1

func Serve(handlers []ServiceHandler, interceptors []grpc.Interceptor, streamInterceptors []grpc.StreamInterceptor) (*InProcess, error)

The chain comes from UnaryChain, the same function the daemon uses: a harness that rebuilt it would be checking its own copy of the order.

func (*InProcess) Close added in v1.10.1

func (s *InProcess) Close()

func (*InProcess) Conn added in v1.10.1

type Server

type Server interface {
	Serve(ctx context.Context) error
	Close() error
}

type ServiceHandler

type ServiceHandler interface {
	Start(baseGrpc.ServiceRegistrar)
}

Jump to

Keyboard shortcuts

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