Add aggregator backfill, pulling fine+coarse buckets from collectors
This commit is contained in:
@@ -23,6 +23,7 @@ const (
|
||||
LogtailService_Trend_FullMethodName = "/logtail.LogtailService/Trend"
|
||||
LogtailService_StreamSnapshots_FullMethodName = "/logtail.LogtailService/StreamSnapshots"
|
||||
LogtailService_ListTargets_FullMethodName = "/logtail.LogtailService/ListTargets"
|
||||
LogtailService_DumpSnapshots_FullMethodName = "/logtail.LogtailService/DumpSnapshots"
|
||||
)
|
||||
|
||||
// LogtailServiceClient is the client API for LogtailService service.
|
||||
@@ -33,6 +34,7 @@ type LogtailServiceClient interface {
|
||||
Trend(ctx context.Context, in *TrendRequest, opts ...grpc.CallOption) (*TrendResponse, error)
|
||||
StreamSnapshots(ctx context.Context, in *SnapshotRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Snapshot], error)
|
||||
ListTargets(ctx context.Context, in *ListTargetsRequest, opts ...grpc.CallOption) (*ListTargetsResponse, error)
|
||||
DumpSnapshots(ctx context.Context, in *DumpSnapshotsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Snapshot], error)
|
||||
}
|
||||
|
||||
type logtailServiceClient struct {
|
||||
@@ -92,6 +94,25 @@ func (c *logtailServiceClient) ListTargets(ctx context.Context, in *ListTargetsR
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *logtailServiceClient) DumpSnapshots(ctx context.Context, in *DumpSnapshotsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Snapshot], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &LogtailService_ServiceDesc.Streams[1], LogtailService_DumpSnapshots_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[DumpSnapshotsRequest, Snapshot]{ClientStream: stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type LogtailService_DumpSnapshotsClient = grpc.ServerStreamingClient[Snapshot]
|
||||
|
||||
// LogtailServiceServer is the server API for LogtailService service.
|
||||
// All implementations must embed UnimplementedLogtailServiceServer
|
||||
// for forward compatibility.
|
||||
@@ -100,6 +121,7 @@ type LogtailServiceServer interface {
|
||||
Trend(context.Context, *TrendRequest) (*TrendResponse, error)
|
||||
StreamSnapshots(*SnapshotRequest, grpc.ServerStreamingServer[Snapshot]) error
|
||||
ListTargets(context.Context, *ListTargetsRequest) (*ListTargetsResponse, error)
|
||||
DumpSnapshots(*DumpSnapshotsRequest, grpc.ServerStreamingServer[Snapshot]) error
|
||||
mustEmbedUnimplementedLogtailServiceServer()
|
||||
}
|
||||
|
||||
@@ -122,6 +144,9 @@ func (UnimplementedLogtailServiceServer) StreamSnapshots(*SnapshotRequest, grpc.
|
||||
func (UnimplementedLogtailServiceServer) ListTargets(context.Context, *ListTargetsRequest) (*ListTargetsResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListTargets not implemented")
|
||||
}
|
||||
func (UnimplementedLogtailServiceServer) DumpSnapshots(*DumpSnapshotsRequest, grpc.ServerStreamingServer[Snapshot]) error {
|
||||
return status.Error(codes.Unimplemented, "method DumpSnapshots not implemented")
|
||||
}
|
||||
func (UnimplementedLogtailServiceServer) mustEmbedUnimplementedLogtailServiceServer() {}
|
||||
func (UnimplementedLogtailServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -208,6 +233,17 @@ func _LogtailService_ListTargets_Handler(srv interface{}, ctx context.Context, d
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _LogtailService_DumpSnapshots_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(DumpSnapshotsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(LogtailServiceServer).DumpSnapshots(m, &grpc.GenericServerStream[DumpSnapshotsRequest, Snapshot]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type LogtailService_DumpSnapshotsServer = grpc.ServerStreamingServer[Snapshot]
|
||||
|
||||
// LogtailService_ServiceDesc is the grpc.ServiceDesc for LogtailService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -234,6 +270,11 @@ var LogtailService_ServiceDesc = grpc.ServiceDesc{
|
||||
Handler: _LogtailService_StreamSnapshots_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "DumpSnapshots",
|
||||
Handler: _LogtailService_DumpSnapshots_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "proto/logtail.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user