Path: blob/main/components/supervisor-api/go/task_grpc.pb.go
2498 views
// Copyright (c) 2024 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Code generated by protoc-gen-go-grpc. DO NOT EDIT.5// versions:6// - protoc-gen-go-grpc v1.2.07// - protoc v3.20.18// source: task.proto910package api1112import (13context "context"14grpc "google.golang.org/grpc"15codes "google.golang.org/grpc/codes"16status "google.golang.org/grpc/status"17)1819// This is a compile-time assertion to ensure that this generated file20// is compatible with the grpc package it is being compiled against.21// Requires gRPC-Go v1.32.0 or later.22const _ = grpc.SupportPackageIsVersion72324// TaskServiceClient is the client API for TaskService service.25//26// 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.27type TaskServiceClient interface {28// Listens to the output of a given task29ListenToOutput(ctx context.Context, in *ListenToOutputRequest, opts ...grpc.CallOption) (TaskService_ListenToOutputClient, error)30}3132type taskServiceClient struct {33cc grpc.ClientConnInterface34}3536func NewTaskServiceClient(cc grpc.ClientConnInterface) TaskServiceClient {37return &taskServiceClient{cc}38}3940func (c *taskServiceClient) ListenToOutput(ctx context.Context, in *ListenToOutputRequest, opts ...grpc.CallOption) (TaskService_ListenToOutputClient, error) {41stream, err := c.cc.NewStream(ctx, &TaskService_ServiceDesc.Streams[0], "/supervisor.TaskService/ListenToOutput", opts...)42if err != nil {43return nil, err44}45x := &taskServiceListenToOutputClient{stream}46if err := x.ClientStream.SendMsg(in); err != nil {47return nil, err48}49if err := x.ClientStream.CloseSend(); err != nil {50return nil, err51}52return x, nil53}5455type TaskService_ListenToOutputClient interface {56Recv() (*ListenToOutputResponse, error)57grpc.ClientStream58}5960type taskServiceListenToOutputClient struct {61grpc.ClientStream62}6364func (x *taskServiceListenToOutputClient) Recv() (*ListenToOutputResponse, error) {65m := new(ListenToOutputResponse)66if err := x.ClientStream.RecvMsg(m); err != nil {67return nil, err68}69return m, nil70}7172// TaskServiceServer is the server API for TaskService service.73// All implementations must embed UnimplementedTaskServiceServer74// for forward compatibility75type TaskServiceServer interface {76// Listens to the output of a given task77ListenToOutput(*ListenToOutputRequest, TaskService_ListenToOutputServer) error78mustEmbedUnimplementedTaskServiceServer()79}8081// UnimplementedTaskServiceServer must be embedded to have forward compatible implementations.82type UnimplementedTaskServiceServer struct {83}8485func (UnimplementedTaskServiceServer) ListenToOutput(*ListenToOutputRequest, TaskService_ListenToOutputServer) error {86return status.Errorf(codes.Unimplemented, "method ListenToOutput not implemented")87}88func (UnimplementedTaskServiceServer) mustEmbedUnimplementedTaskServiceServer() {}8990// UnsafeTaskServiceServer may be embedded to opt out of forward compatibility for this service.91// Use of this interface is not recommended, as added methods to TaskServiceServer will92// result in compilation errors.93type UnsafeTaskServiceServer interface {94mustEmbedUnimplementedTaskServiceServer()95}9697func RegisterTaskServiceServer(s grpc.ServiceRegistrar, srv TaskServiceServer) {98s.RegisterService(&TaskService_ServiceDesc, srv)99}100101func _TaskService_ListenToOutput_Handler(srv interface{}, stream grpc.ServerStream) error {102m := new(ListenToOutputRequest)103if err := stream.RecvMsg(m); err != nil {104return err105}106return srv.(TaskServiceServer).ListenToOutput(m, &taskServiceListenToOutputServer{stream})107}108109type TaskService_ListenToOutputServer interface {110Send(*ListenToOutputResponse) error111grpc.ServerStream112}113114type taskServiceListenToOutputServer struct {115grpc.ServerStream116}117118func (x *taskServiceListenToOutputServer) Send(m *ListenToOutputResponse) error {119return x.ServerStream.SendMsg(m)120}121122// TaskService_ServiceDesc is the grpc.ServiceDesc for TaskService service.123// It's only intended for direct use with grpc.RegisterService,124// and not to be introspected or modified (even as a copy)125var TaskService_ServiceDesc = grpc.ServiceDesc{126ServiceName: "supervisor.TaskService",127HandlerType: (*TaskServiceServer)(nil),128Methods: []grpc.MethodDesc{},129Streams: []grpc.StreamDesc{130{131StreamName: "ListenToOutput",132Handler: _TaskService_ListenToOutput_Handler,133ServerStreams: true,134},135},136Metadata: "task.proto",137}138139140