Documentation
¶
Index ¶
- func NewClient(ctx context.Context, grpcAddress string, timeoutSecond int, ...) (context.Context, context.CancelFunc, *grpc.ClientConn, error)
- func NewServer(serviceName string, sentryDSN string, opt ...grpc.ServerOption) *grpc.Server
- func StreamServerGrpcCaptureException(serviceName string, sentryDSN string) ...
- func UnaryServerGrpcCaptureException(serviceName string, sentryDSN string) ...
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.