grpcutil

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerStatusMetricHandler

func StreamServerStatusMetricHandler(statusCodes map[string][]uint64, promRequest func(string, int)) grpc.StreamServerInterceptor

func StreamServerTimeHandler

func StreamServerTimeHandler(cb func(payload, peer string, t time.Duration)) grpc.StreamServerInterceptor

func UnaryServerStatusMetricHandler

func UnaryServerStatusMetricHandler(statusCodes map[string][]uint64, promRequest func(string, int)) grpc.UnaryServerInterceptor

func UnaryServerTimeHandler

func UnaryServerTimeHandler(cb func(payload, peer string, t time.Duration)) grpc.UnaryServerInterceptor

Types

type WrappedStream

type WrappedStream struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func GetWrappedStream

func GetWrappedStream(ss grpc.ServerStream) *WrappedStream

func (*WrappedStream) Context

func (ws *WrappedStream) Context() context.Context

func (*WrappedStream) Payload

func (ws *WrappedStream) Payload() string

func (*WrappedStream) RecvMsg

func (ws *WrappedStream) RecvMsg(m interface{}) error

func (*WrappedStream) SetContext

func (ws *WrappedStream) SetContext(ctx context.Context)

Jump to

Keyboard shortcuts

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