grpc

package module
v0.0.0-...-745208b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 9 Imported by: 1

README

go-grpc

[LIBRARY] Implements extra functions and methods to gRPC servers

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailRetrieveMetadata error = errors.New("failed to get metadata from context")
	ErrFieldNotFound        error = errors.New("field wasn't found")
)

Functions

func MetadataField

func MetadataField(ctx context.Context, field string) (any, error)

func NewHealthService

func NewHealthService() grpc_health_v1.HealthServer

func NewMuxServer

func NewMuxServer(httpHandler http.Handler, grpcHandler http.Handler) *http.Server

NewMuxServer implements a gRPC http2 connection server using the httpAndGrpcMux to check if

Types

type Key

type Key string

type ServerStream

type ServerStream struct {
	grpc.ServerStream

	Ctx context.Context
}

func (*ServerStream) Context

func (s *ServerStream) Context() context.Context

Directories

Path Synopsis
middlewares
log
recover
This package implements a middleware that will recover from panics, it also logs when some error occurr
This package implements a middleware that will recover from panics, it also logs when some error occurr

Jump to

Keyboard shortcuts

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