Documentation
¶
Overview ¶
Package grpcbackend implements gRPC API for metrics collector server.
Index ¶
- func New(address entity.NetAddress, recorder services.Recorder, ...) *grpcserver.Server
- func NewHealthServer(server *grpc.Server, healthcheck services.HealthCheck)
- func NewMetricsServer(server *grpc.Server, recorder services.Recorder, signer *security.Signer)
- type HealthServer
- type MetricsServer
- func (s MetricsServer) BatchUpdate(ctx context.Context, req *grpcapi.BatchUpdateRequest) (*grpcapi.BatchUpdateResponse, error)
- func (s MetricsServer) Get(ctx context.Context, req *grpcapi.GetMetricRequest) (*grpcapi.MetricReq, error)
- func (s MetricsServer) Update(ctx context.Context, req *grpcapi.MetricReq) (*grpcapi.MetricReq, error)
- type MetricsServerMock
- func (m *MetricsServerMock) BatchUpdate(ctx context.Context, req *grpcapi.BatchUpdateRequest) (*grpcapi.BatchUpdateResponse, error)
- func (m *MetricsServerMock) Get(ctx context.Context, req *grpcapi.GetMetricRequest) (*grpcapi.MetricReq, error)
- func (m *MetricsServerMock) Update(ctx context.Context, req *grpcapi.MetricReq) (*grpcapi.MetricReq, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New( address entity.NetAddress, recorder services.Recorder, healthcheck services.HealthCheck, signer *security.Signer, trustedSubnet *net.IPNet, ) *grpcserver.Server
func NewHealthServer ¶
func NewHealthServer(server *grpc.Server, healthcheck services.HealthCheck)
NewHealthServer creates new instance of gRPC serving Health API and attaches it to the server.
Types ¶
type HealthServer ¶
type HealthServer struct {
grpcapi.UnimplementedHealthServer
// contains filtered or unexported fields
}
HealthServer verifies current health status of the service.
type MetricsServer ¶
type MetricsServer struct {
grpcapi.UnimplementedMetricsServer
// contains filtered or unexported fields
}
MetricsServer allows to store and retrieve metrics.
func (MetricsServer) BatchUpdate ¶
func (s MetricsServer) BatchUpdate( ctx context.Context, req *grpcapi.BatchUpdateRequest, ) (*grpcapi.BatchUpdateResponse, error)
BatchUpdate pushes list of metrics data.
func (MetricsServer) Get ¶
func (s MetricsServer) Get(ctx context.Context, req *grpcapi.GetMetricRequest) (*grpcapi.MetricReq, error)
Get metrics value.
type MetricsServerMock ¶
type MetricsServerMock struct {
mock.Mock
grpcapi.UnimplementedMetricsServer
}
func (*MetricsServerMock) BatchUpdate ¶
func (m *MetricsServerMock) BatchUpdate( ctx context.Context, req *grpcapi.BatchUpdateRequest, ) (*grpcapi.BatchUpdateResponse, error)
func (*MetricsServerMock) Get ¶
func (m *MetricsServerMock) Get(ctx context.Context, req *grpcapi.GetMetricRequest) (*grpcapi.MetricReq, error)
Click to show internal directories.
Click to hide internal directories.