One gRPC service per domain in state.v1 (tasks, executions, accounts, identities, packages, captures, bindings, access, orgs, alerts and so on), each with its own server type in staterpc. RPC and message names and numbers are unchanged.
236 lines
9.2 KiB
Go
236 lines
9.2 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc (unknown)
|
|
// source: state/v1/stats.proto
|
|
|
|
package statev1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
StatsService_StatusCounts_FullMethodName = "/state.v1.StatsService/StatusCounts"
|
|
StatsService_WorkflowStats_FullMethodName = "/state.v1.StatsService/WorkflowStats"
|
|
StatsService_StageStats_FullMethodName = "/state.v1.StatsService/StageStats"
|
|
StatsService_TokensByDay_FullMethodName = "/state.v1.StatsService/TokensByDay"
|
|
)
|
|
|
|
// StatsServiceClient is the client API for StatsService 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.
|
|
type StatsServiceClient interface {
|
|
StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error)
|
|
WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error)
|
|
StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error)
|
|
TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error)
|
|
}
|
|
|
|
type statsServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewStatsServiceClient(cc grpc.ClientConnInterface) StatsServiceClient {
|
|
return &statsServiceClient{cc}
|
|
}
|
|
|
|
func (c *statsServiceClient) StatusCounts(ctx context.Context, in *StatusCountsRequest, opts ...grpc.CallOption) (*StatusCountsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StatusCountsResponse)
|
|
err := c.cc.Invoke(ctx, StatsService_StatusCounts_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *statsServiceClient) WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(WorkflowStatsResponse)
|
|
err := c.cc.Invoke(ctx, StatsService_WorkflowStats_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *statsServiceClient) StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(StageStatsResponse)
|
|
err := c.cc.Invoke(ctx, StatsService_StageStats_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *statsServiceClient) TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(TokensByDayResponse)
|
|
err := c.cc.Invoke(ctx, StatsService_TokensByDay_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// StatsServiceServer is the server API for StatsService service.
|
|
// All implementations must embed UnimplementedStatsServiceServer
|
|
// for forward compatibility.
|
|
type StatsServiceServer interface {
|
|
StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error)
|
|
WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error)
|
|
StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error)
|
|
TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error)
|
|
mustEmbedUnimplementedStatsServiceServer()
|
|
}
|
|
|
|
// UnimplementedStatsServiceServer must 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.
|
|
type UnimplementedStatsServiceServer struct{}
|
|
|
|
func (UnimplementedStatsServiceServer) StatusCounts(context.Context, *StatusCountsRequest) (*StatusCountsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method StatusCounts not implemented")
|
|
}
|
|
func (UnimplementedStatsServiceServer) WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method WorkflowStats not implemented")
|
|
}
|
|
func (UnimplementedStatsServiceServer) StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method StageStats not implemented")
|
|
}
|
|
func (UnimplementedStatsServiceServer) TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method TokensByDay not implemented")
|
|
}
|
|
func (UnimplementedStatsServiceServer) mustEmbedUnimplementedStatsServiceServer() {}
|
|
func (UnimplementedStatsServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeStatsServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to StatsServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeStatsServiceServer interface {
|
|
mustEmbedUnimplementedStatsServiceServer()
|
|
}
|
|
|
|
func RegisterStatsServiceServer(s grpc.ServiceRegistrar, srv StatsServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedStatsServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&StatsService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _StatsService_StatusCounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatusCountsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StatsServiceServer).StatusCounts(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: StatsService_StatusCounts_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StatsServiceServer).StatusCounts(ctx, req.(*StatusCountsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _StatsService_WorkflowStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(WorkflowStatsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StatsServiceServer).WorkflowStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: StatsService_WorkflowStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StatsServiceServer).WorkflowStats(ctx, req.(*WorkflowStatsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _StatsService_StageStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StageStatsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StatsServiceServer).StageStats(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: StatsService_StageStats_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StatsServiceServer).StageStats(ctx, req.(*StageStatsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _StatsService_TokensByDay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(TokensByDayRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(StatsServiceServer).TokensByDay(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: StatsService_TokensByDay_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(StatsServiceServer).TokensByDay(ctx, req.(*TokensByDayRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// StatsService_ServiceDesc is the grpc.ServiceDesc for StatsService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var StatsService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "state.v1.StatsService",
|
|
HandlerType: (*StatsServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "StatusCounts",
|
|
Handler: _StatsService_StatusCounts_Handler,
|
|
},
|
|
{
|
|
MethodName: "WorkflowStats",
|
|
Handler: _StatsService_WorkflowStats_Handler,
|
|
},
|
|
{
|
|
MethodName: "StageStats",
|
|
Handler: _StatsService_StageStats_Handler,
|
|
},
|
|
{
|
|
MethodName: "TokensByDay",
|
|
Handler: _StatsService_TokensByDay_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "state/v1/stats.proto",
|
|
}
|