collect/ebpf/profiling/v3/Profile_grpc.pb.go (132 lines of code) (raw):

// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package v3 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" v3 "skywalking.apache.org/repo/goapi/collect/common/v3" ) // 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // EBPFProfilingServiceClient is the client API for EBPFProfilingService 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 EBPFProfilingServiceClient interface { // Query profiling (start or stop) tasks QueryTasks(ctx context.Context, in *EBPFProfilingTaskQuery, opts ...grpc.CallOption) (*v3.Commands, error) // collect profiling data CollectProfilingData(ctx context.Context, opts ...grpc.CallOption) (EBPFProfilingService_CollectProfilingDataClient, error) } type eBPFProfilingServiceClient struct { cc grpc.ClientConnInterface } func NewEBPFProfilingServiceClient(cc grpc.ClientConnInterface) EBPFProfilingServiceClient { return &eBPFProfilingServiceClient{cc} } func (c *eBPFProfilingServiceClient) QueryTasks(ctx context.Context, in *EBPFProfilingTaskQuery, opts ...grpc.CallOption) (*v3.Commands, error) { out := new(v3.Commands) err := c.cc.Invoke(ctx, "/skywalking.v3.EBPFProfilingService/queryTasks", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *eBPFProfilingServiceClient) CollectProfilingData(ctx context.Context, opts ...grpc.CallOption) (EBPFProfilingService_CollectProfilingDataClient, error) { stream, err := c.cc.NewStream(ctx, &EBPFProfilingService_ServiceDesc.Streams[0], "/skywalking.v3.EBPFProfilingService/collectProfilingData", opts...) if err != nil { return nil, err } x := &eBPFProfilingServiceCollectProfilingDataClient{stream} return x, nil } type EBPFProfilingService_CollectProfilingDataClient interface { Send(*EBPFProfilingData) error CloseAndRecv() (*v3.Commands, error) grpc.ClientStream } type eBPFProfilingServiceCollectProfilingDataClient struct { grpc.ClientStream } func (x *eBPFProfilingServiceCollectProfilingDataClient) Send(m *EBPFProfilingData) error { return x.ClientStream.SendMsg(m) } func (x *eBPFProfilingServiceCollectProfilingDataClient) CloseAndRecv() (*v3.Commands, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } m := new(v3.Commands) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // EBPFProfilingServiceServer is the server API for EBPFProfilingService service. // All implementations must embed UnimplementedEBPFProfilingServiceServer // for forward compatibility type EBPFProfilingServiceServer interface { // Query profiling (start or stop) tasks QueryTasks(context.Context, *EBPFProfilingTaskQuery) (*v3.Commands, error) // collect profiling data CollectProfilingData(EBPFProfilingService_CollectProfilingDataServer) error mustEmbedUnimplementedEBPFProfilingServiceServer() } // UnimplementedEBPFProfilingServiceServer must be embedded to have forward compatible implementations. type UnimplementedEBPFProfilingServiceServer struct { } func (UnimplementedEBPFProfilingServiceServer) QueryTasks(context.Context, *EBPFProfilingTaskQuery) (*v3.Commands, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryTasks not implemented") } func (UnimplementedEBPFProfilingServiceServer) CollectProfilingData(EBPFProfilingService_CollectProfilingDataServer) error { return status.Errorf(codes.Unimplemented, "method CollectProfilingData not implemented") } func (UnimplementedEBPFProfilingServiceServer) mustEmbedUnimplementedEBPFProfilingServiceServer() {} // UnsafeEBPFProfilingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EBPFProfilingServiceServer will // result in compilation errors. type UnsafeEBPFProfilingServiceServer interface { mustEmbedUnimplementedEBPFProfilingServiceServer() } func RegisterEBPFProfilingServiceServer(s grpc.ServiceRegistrar, srv EBPFProfilingServiceServer) { s.RegisterService(&EBPFProfilingService_ServiceDesc, srv) } func _EBPFProfilingService_QueryTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EBPFProfilingTaskQuery) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EBPFProfilingServiceServer).QueryTasks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/skywalking.v3.EBPFProfilingService/queryTasks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EBPFProfilingServiceServer).QueryTasks(ctx, req.(*EBPFProfilingTaskQuery)) } return interceptor(ctx, in, info, handler) } func _EBPFProfilingService_CollectProfilingData_Handler(srv interface{}, stream grpc.ServerStream) error { return srv.(EBPFProfilingServiceServer).CollectProfilingData(&eBPFProfilingServiceCollectProfilingDataServer{stream}) } type EBPFProfilingService_CollectProfilingDataServer interface { SendAndClose(*v3.Commands) error Recv() (*EBPFProfilingData, error) grpc.ServerStream } type eBPFProfilingServiceCollectProfilingDataServer struct { grpc.ServerStream } func (x *eBPFProfilingServiceCollectProfilingDataServer) SendAndClose(m *v3.Commands) error { return x.ServerStream.SendMsg(m) } func (x *eBPFProfilingServiceCollectProfilingDataServer) Recv() (*EBPFProfilingData, error) { m := new(EBPFProfilingData) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // EBPFProfilingService_ServiceDesc is the grpc.ServiceDesc for EBPFProfilingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var EBPFProfilingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "skywalking.v3.EBPFProfilingService", HandlerType: (*EBPFProfilingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "queryTasks", Handler: _EBPFProfilingService_QueryTasks_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "collectProfilingData", Handler: _EBPFProfilingService_CollectProfilingData_Handler, ClientStreams: true, }, }, Metadata: "ebpf/profiling/Profile.proto", }