grpc

package
v0.0.0-...-9f3355a Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 26 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

type GRPCServer struct {
	*grpc.Server
}

func NewGRPCServer

func NewGRPCServer(ctx context.Context, args NewGRPCServerArgs) *GRPCServer

Creates and returns a gRPC server.

func (*GRPCServer) GracefulShutdown

func (server *GRPCServer) GracefulShutdown()

Stops the gRPC server from accepting new connections and RPC requests. Then, waits for the RPCs which are currently being processed, to finish.

func (*GRPCServer) Run

func (server *GRPCServer) Run(ctx context.Context, port int) error

Creates a TCP listener at the given address and uses it to run the gRPC server.

Panics if any error occurs.

type HealthcheckService

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

func (*HealthcheckService) Check

func (*HealthcheckService) Watch

type NewGRPCServerArgs

type NewGRPCServerArgs struct {
	DevModeEnabled bool

	Healthcheckables []healthcheck.Healthcheckable

	ToGRPCErrorStatusCodeFn ToGRPCErrorStatusCodeFn
}

type ToGRPCErrorStatusCodeFn

type ToGRPCErrorStatusCodeFn = func(error) codes.Code

Jump to

Keyboard shortcuts

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