Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)
- type MetricsServiceClient
- type MetricsServiceServer
- type UnimplementedMetricsServiceServer
- func (UnimplementedMetricsServiceServer) GetMetrics(context.Context, *v1.GetMetricsRequest) (*v1.GetMetricsResponse, error)
- func (UnimplementedMetricsServiceServer) GetMetricsPaginated(context.Context, *v1.GetMetricsPaginatedRequest) (*v1.GetMetricsPaginatedResponse, error)
- func (UnimplementedMetricsServiceServer) RecordMetric(context.Context, *v1.RecordMetricRequest) (*v1.RecordMetricResponse, error)
- type UnsafeMetricsServiceServer
Constants ¶
const ( MetricsService_GetMetrics_FullMethodName = "/simplecloud.metrics.v1.MetricsService/GetMetrics" MetricsService_GetMetricsPaginated_FullMethodName = "/simplecloud.metrics.v1.MetricsService/GetMetricsPaginated" MetricsService_RecordMetric_FullMethodName = "/simplecloud.metrics.v1.MetricsService/RecordMetric" )
Variables ¶
var MetricsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "simplecloud.metrics.v1.MetricsService", HandlerType: (*MetricsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMetrics", Handler: _MetricsService_GetMetrics_Handler, }, { MethodName: "GetMetricsPaginated", Handler: _MetricsService_GetMetricsPaginated_Handler, }, { MethodName: "RecordMetric", Handler: _MetricsService_RecordMetric_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "simplecloud/metrics/v1/metrics_api.proto", }
MetricsService_ServiceDesc is the grpc.ServiceDesc for MetricsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMetricsServiceServer ¶
func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)
Types ¶
type MetricsServiceClient ¶
type MetricsServiceClient interface {
// Get metrics without pagination
GetMetrics(ctx context.Context, in *v1.GetMetricsRequest, opts ...grpc.CallOption) (*v1.GetMetricsResponse, error)
// Get metrics with pagination support
GetMetricsPaginated(ctx context.Context, in *v1.GetMetricsPaginatedRequest, opts ...grpc.CallOption) (*v1.GetMetricsPaginatedResponse, error)
// Record a new metric
RecordMetric(ctx context.Context, in *v1.RecordMetricRequest, opts ...grpc.CallOption) (*v1.RecordMetricResponse, error)
}
MetricsServiceClient is the client API for MetricsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewMetricsServiceClient ¶
func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient
type MetricsServiceServer ¶
type MetricsServiceServer interface {
// Get metrics without pagination
GetMetrics(context.Context, *v1.GetMetricsRequest) (*v1.GetMetricsResponse, error)
// Get metrics with pagination support
GetMetricsPaginated(context.Context, *v1.GetMetricsPaginatedRequest) (*v1.GetMetricsPaginatedResponse, error)
// Record a new metric
RecordMetric(context.Context, *v1.RecordMetricRequest) (*v1.RecordMetricResponse, error)
}
MetricsServiceServer is the server API for MetricsService service. All implementations should embed UnimplementedMetricsServiceServer for forward compatibility.
type UnimplementedMetricsServiceServer ¶
type UnimplementedMetricsServiceServer struct{}
UnimplementedMetricsServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedMetricsServiceServer) GetMetrics ¶
func (UnimplementedMetricsServiceServer) GetMetrics(context.Context, *v1.GetMetricsRequest) (*v1.GetMetricsResponse, error)
func (UnimplementedMetricsServiceServer) GetMetricsPaginated ¶
func (UnimplementedMetricsServiceServer) GetMetricsPaginated(context.Context, *v1.GetMetricsPaginatedRequest) (*v1.GetMetricsPaginatedResponse, error)
func (UnimplementedMetricsServiceServer) RecordMetric ¶
func (UnimplementedMetricsServiceServer) RecordMetric(context.Context, *v1.RecordMetricRequest) (*v1.RecordMetricResponse, error)
type UnsafeMetricsServiceServer ¶
type UnsafeMetricsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMetricsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricsServiceServer will result in compilation errors.
Source Files
¶
- metrics_api_grpc.pb.go