Documentation ¶
Index ¶
- Constants
- func CheckNetErrClosing(err error) error
- func PanicServerInterceptor(panicHandler func(ctx context.Context, err error, params ...interface{}) error, ...) grpc.UnaryServerInterceptor
- func SetGrpcServerOptions(conf configs.Configs, lg logr.Logger, ...) ([]grpc.ServerOption, error)
- type ProviderServer
- type Server
Constants ¶
View Source
const ( KeepaliveTimeoutCanceledErr = "keepalive timeout is canceled" ReqGetMetricsCastErr = `protobuf "ReqGetMetrics" type cast error` PeriodOrMetricsFieldEmptyErr = `period or metrics slice is empty` )
View Source
const (
DefaultMaxMsgSize = 2 << 20 // 2Mb
)
Variables ¶
This section is empty.
Functions ¶
func CheckNetErrClosing ¶
func PanicServerInterceptor ¶
func SetGrpcServerOptions ¶
func SetGrpcServerOptions(conf configs.Configs, lg logr.Logger, internalInterceptors ...grpc.UnaryServerInterceptor) ([]grpc.ServerOption, error)
Types ¶
type ProviderServer ¶
type ProviderServer struct {
// contains filtered or unexported fields
}
func NewProviderServer ¶
func (ProviderServer) GetMetrics ¶
func (ps ProviderServer) GetMetrics(ctx context.Context, req *pb.ReqGetMetrics) (res *pb.ResGetMetrics, err error)
func (*ProviderServer) Start ¶
func (ps *ProviderServer) Start() <-chan error
func (*ProviderServer) Stop ¶
func (ps *ProviderServer) Stop() error
Click to show internal directories.
Click to hide internal directories.