ps_grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorInterceptor

func ErrorInterceptor(
	ctx context.Context,
	req any,
	_ *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func NewClientConn

func NewClientConn(ctx context.Context, address string, extra ...grpc.DialOption) (*grpc.ClientConn, error)

func NewClientConnWithBufconn

func NewClientConnWithBufconn(t *testing.T, ctx context.Context, listener *bufconn.Listener) *grpc.ClientConn

func NewClientConnWithBufconnContext

func NewClientConnWithBufconnContext(ctx context.Context, listener *bufconn.Listener) (*grpc.ClientConn, error)

func RecoveryInterceptor

func RecoveryInterceptor(
	ctx context.Context,
	req any,
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func Run

func Run(
	ctx context.Context,
	stopAccepting <-chan struct{},
	address string,
	healthServer *health.Server,
	register func(*grpc.Server),
) error

Run serves until stopAccepting closes, then waits for active RPCs. Canceling ctx forces remaining RPCs to stop. register installs application services before serving starts. Run returns after serving and shutdown have finished.

Types

This section is empty.

Jump to

Keyboard shortcuts

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