grpc

package
v0.0.0-...-52d9df3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Module provided to fxlog
	// https://uber-go.github.io/fx/modules.html
	Module = fx.Module("grpcfx", grpcProviders, grpcInvokes) //nolint:gochecknoglobals

)

Functions

This section is empty.

Types

type GrpcClient

type GrpcClient interface {
	GetGrpcConnection() *grpc.ClientConn
	Close() error
	// WaitForAvailableConnection waiting for grpc endpoint becomes ready in the given timeout
	WaitForAvailableConnection() error
}

func NewGrpcClient

func NewGrpcClient(config *config.GrpcOptions) (GrpcClient, error)

type GrpcServer

type GrpcServer interface {
	RunGrpcServer(configGrpc ...func(grpcServer *googleGrpc.Server)) error
	GracefulShutdown()
	GetCurrentGrpcServer() *googleGrpc.Server
	GrpcServiceBuilder() *GrpcServiceBuilder
}

func NewGrpcServer

func NewGrpcServer(
	config *config.GrpcOptions,
	logger logger.Logger,
	meter metric.Meter,
) GrpcServer

type GrpcServiceBuilder

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

func NewGrpcServiceBuilder

func NewGrpcServiceBuilder(server *grpc.Server) *GrpcServiceBuilder

func (*GrpcServiceBuilder) Build

func (r *GrpcServiceBuilder) Build() *grpc.Server

func (*GrpcServiceBuilder) RegisterRoutes

func (r *GrpcServiceBuilder) RegisterRoutes(builder func(s *grpc.Server)) *GrpcServiceBuilder

Directories

Path Synopsis
interceptors
otel

Jump to

Keyboard shortcuts

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