grpc

package
v0.0.0-...-eb1b8cc Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, grpcAddress string, timeoutSecond int, opt ...grpc.DialOption) (context.Context, context.CancelFunc, *grpc.ClientConn, error)

Example

  • NewClient(context.Background(), "localhost:3100", 30)

func NewServer

func NewServer(serviceName string, sentryDSN string, opt ...grpc.ServerOption) *grpc.Server

Example Default

  • NewClient(JAEGER_SERVICE_NAME, SENTRY_DSN)

Example with Addon ServerOption

  • options = grpc.MaxRecvMsgSize(grpcMaxReceiveSize) = ขยายขนาด Body buffer ที่รับได้
  • NewClient(JAEGER_SERVICE_NAME, SENTRY_DSN, options)

func StreamServerGrpcCaptureException

func StreamServerGrpcCaptureException(serviceName string, sentryDSN string) func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

func UnaryServerGrpcCaptureException

func UnaryServerGrpcCaptureException(serviceName string, sentryDSN string) func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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