| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: loopback.proto |
| |
| package protocol |
| |
| import ( |
| context "context" |
| fmt "fmt" |
| proto "github.com/golang/protobuf/proto" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| math "math" |
| ) |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| type ExecRequest struct { |
| // Types that are valid to be assigned to Type: |
| // *ExecRequest_Init |
| // *ExecRequest_Stdin |
| Type isExecRequest_Type `protobuf_oneof:"type"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExecRequest) Reset() { *m = ExecRequest{} } |
| func (m *ExecRequest) String() string { return proto.CompactTextString(m) } |
| func (*ExecRequest) ProtoMessage() {} |
| func (*ExecRequest) Descriptor() ([]byte, []int) { |
| return fileDescriptor_9680e6cb38eb7b19, []int{0} |
| } |
| |
| func (m *ExecRequest) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExecRequest.Unmarshal(m, b) |
| } |
| func (m *ExecRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExecRequest.Marshal(b, m, deterministic) |
| } |
| func (m *ExecRequest) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExecRequest.Merge(m, src) |
| } |
| func (m *ExecRequest) XXX_Size() int { |
| return xxx_messageInfo_ExecRequest.Size(m) |
| } |
| func (m *ExecRequest) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExecRequest.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExecRequest proto.InternalMessageInfo |
| |
| type isExecRequest_Type interface { |
| isExecRequest_Type() |
| } |
| |
| type ExecRequest_Init struct { |
| Init *InitEvent `protobuf:"bytes,1,opt,name=init,proto3,oneof"` |
| } |
| |
| type ExecRequest_Stdin struct { |
| Stdin *PipeEvent `protobuf:"bytes,2,opt,name=stdin,proto3,oneof"` |
| } |
| |
| func (*ExecRequest_Init) isExecRequest_Type() {} |
| |
| func (*ExecRequest_Stdin) isExecRequest_Type() {} |
| |
| func (m *ExecRequest) GetType() isExecRequest_Type { |
| if m != nil { |
| return m.Type |
| } |
| return nil |
| } |
| |
| func (m *ExecRequest) GetInit() *InitEvent { |
| if x, ok := m.GetType().(*ExecRequest_Init); ok { |
| return x.Init |
| } |
| return nil |
| } |
| |
| func (m *ExecRequest) GetStdin() *PipeEvent { |
| if x, ok := m.GetType().(*ExecRequest_Stdin); ok { |
| return x.Stdin |
| } |
| return nil |
| } |
| |
| // XXX_OneofWrappers is for the internal use of the proto package. |
| func (*ExecRequest) XXX_OneofWrappers() []interface{} { |
| return []interface{}{ |
| (*ExecRequest_Init)(nil), |
| (*ExecRequest_Stdin)(nil), |
| } |
| } |
| |
| type ExecResponse struct { |
| // Types that are valid to be assigned to Type: |
| // *ExecResponse_Exit |
| // *ExecResponse_Stdout |
| // *ExecResponse_Stderr |
| Type isExecResponse_Type `protobuf_oneof:"type"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExecResponse) Reset() { *m = ExecResponse{} } |
| func (m *ExecResponse) String() string { return proto.CompactTextString(m) } |
| func (*ExecResponse) ProtoMessage() {} |
| func (*ExecResponse) Descriptor() ([]byte, []int) { |
| return fileDescriptor_9680e6cb38eb7b19, []int{1} |
| } |
| |
| func (m *ExecResponse) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExecResponse.Unmarshal(m, b) |
| } |
| func (m *ExecResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExecResponse.Marshal(b, m, deterministic) |
| } |
| func (m *ExecResponse) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExecResponse.Merge(m, src) |
| } |
| func (m *ExecResponse) XXX_Size() int { |
| return xxx_messageInfo_ExecResponse.Size(m) |
| } |
| func (m *ExecResponse) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExecResponse.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExecResponse proto.InternalMessageInfo |
| |
| type isExecResponse_Type interface { |
| isExecResponse_Type() |
| } |
| |
| type ExecResponse_Exit struct { |
| Exit *ExitEvent `protobuf:"bytes,1,opt,name=exit,proto3,oneof"` |
| } |
| |
| type ExecResponse_Stdout struct { |
| Stdout *PipeEvent `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"` |
| } |
| |
| type ExecResponse_Stderr struct { |
| Stderr *PipeEvent `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"` |
| } |
| |
| func (*ExecResponse_Exit) isExecResponse_Type() {} |
| |
| func (*ExecResponse_Stdout) isExecResponse_Type() {} |
| |
| func (*ExecResponse_Stderr) isExecResponse_Type() {} |
| |
| func (m *ExecResponse) GetType() isExecResponse_Type { |
| if m != nil { |
| return m.Type |
| } |
| return nil |
| } |
| |
| func (m *ExecResponse) GetExit() *ExitEvent { |
| if x, ok := m.GetType().(*ExecResponse_Exit); ok { |
| return x.Exit |
| } |
| return nil |
| } |
| |
| func (m *ExecResponse) GetStdout() *PipeEvent { |
| if x, ok := m.GetType().(*ExecResponse_Stdout); ok { |
| return x.Stdout |
| } |
| return nil |
| } |
| |
| func (m *ExecResponse) GetStderr() *PipeEvent { |
| if x, ok := m.GetType().(*ExecResponse_Stderr); ok { |
| return x.Stderr |
| } |
| return nil |
| } |
| |
| // XXX_OneofWrappers is for the internal use of the proto package. |
| func (*ExecResponse) XXX_OneofWrappers() []interface{} { |
| return []interface{}{ |
| (*ExecResponse_Exit)(nil), |
| (*ExecResponse_Stdout)(nil), |
| (*ExecResponse_Stderr)(nil), |
| } |
| } |
| |
| type InitEvent struct { |
| Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *InitEvent) Reset() { *m = InitEvent{} } |
| func (m *InitEvent) String() string { return proto.CompactTextString(m) } |
| func (*InitEvent) ProtoMessage() {} |
| func (*InitEvent) Descriptor() ([]byte, []int) { |
| return fileDescriptor_9680e6cb38eb7b19, []int{2} |
| } |
| |
| func (m *InitEvent) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_InitEvent.Unmarshal(m, b) |
| } |
| func (m *InitEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_InitEvent.Marshal(b, m, deterministic) |
| } |
| func (m *InitEvent) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_InitEvent.Merge(m, src) |
| } |
| func (m *InitEvent) XXX_Size() int { |
| return xxx_messageInfo_InitEvent.Size(m) |
| } |
| func (m *InitEvent) XXX_DiscardUnknown() { |
| xxx_messageInfo_InitEvent.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_InitEvent proto.InternalMessageInfo |
| |
| func (m *InitEvent) GetArgs() []string { |
| if m != nil { |
| return m.Args |
| } |
| return nil |
| } |
| |
| type ExitEvent struct { |
| Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExitEvent) Reset() { *m = ExitEvent{} } |
| func (m *ExitEvent) String() string { return proto.CompactTextString(m) } |
| func (*ExitEvent) ProtoMessage() {} |
| func (*ExitEvent) Descriptor() ([]byte, []int) { |
| return fileDescriptor_9680e6cb38eb7b19, []int{3} |
| } |
| |
| func (m *ExitEvent) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExitEvent.Unmarshal(m, b) |
| } |
| func (m *ExitEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExitEvent.Marshal(b, m, deterministic) |
| } |
| func (m *ExitEvent) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExitEvent.Merge(m, src) |
| } |
| func (m *ExitEvent) XXX_Size() int { |
| return xxx_messageInfo_ExitEvent.Size(m) |
| } |
| func (m *ExitEvent) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExitEvent.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExitEvent proto.InternalMessageInfo |
| |
| func (m *ExitEvent) GetCode() int32 { |
| if m != nil { |
| return m.Code |
| } |
| return 0 |
| } |
| |
| type PipeEvent struct { |
| Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` |
| Close bool `protobuf:"varint,2,opt,name=close,proto3" json:"close,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *PipeEvent) Reset() { *m = PipeEvent{} } |
| func (m *PipeEvent) String() string { return proto.CompactTextString(m) } |
| func (*PipeEvent) ProtoMessage() {} |
| func (*PipeEvent) Descriptor() ([]byte, []int) { |
| return fileDescriptor_9680e6cb38eb7b19, []int{4} |
| } |
| |
| func (m *PipeEvent) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_PipeEvent.Unmarshal(m, b) |
| } |
| func (m *PipeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_PipeEvent.Marshal(b, m, deterministic) |
| } |
| func (m *PipeEvent) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_PipeEvent.Merge(m, src) |
| } |
| func (m *PipeEvent) XXX_Size() int { |
| return xxx_messageInfo_PipeEvent.Size(m) |
| } |
| func (m *PipeEvent) XXX_DiscardUnknown() { |
| xxx_messageInfo_PipeEvent.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_PipeEvent proto.InternalMessageInfo |
| |
| func (m *PipeEvent) GetData() []byte { |
| if m != nil { |
| return m.Data |
| } |
| return nil |
| } |
| |
| func (m *PipeEvent) GetClose() bool { |
| if m != nil { |
| return m.Close |
| } |
| return false |
| } |
| |
| func init() { |
| proto.RegisterType((*ExecRequest)(nil), "tast.core.ExecRequest") |
| proto.RegisterType((*ExecResponse)(nil), "tast.core.ExecResponse") |
| proto.RegisterType((*InitEvent)(nil), "tast.core.InitEvent") |
| proto.RegisterType((*ExitEvent)(nil), "tast.core.ExitEvent") |
| proto.RegisterType((*PipeEvent)(nil), "tast.core.PipeEvent") |
| } |
| |
| func init() { proto.RegisterFile("loopback.proto", fileDescriptor_9680e6cb38eb7b19) } |
| |
| var fileDescriptor_9680e6cb38eb7b19 = []byte{ |
| // 313 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd2, 0x41, 0x4b, 0xc3, 0x30, |
| 0x14, 0x07, 0xf0, 0xd5, 0x75, 0xc3, 0xbe, 0x0d, 0x0f, 0x71, 0x68, 0xf1, 0xe2, 0xac, 0x97, 0x21, |
| 0xd2, 0xc9, 0xc4, 0xa3, 0x97, 0xc1, 0x40, 0xc1, 0x83, 0x54, 0x4f, 0xde, 0xba, 0xf4, 0xa1, 0xc1, |
| 0x2e, 0xaf, 0x26, 0x6f, 0x63, 0x7e, 0x1d, 0x3f, 0xa9, 0x24, 0x9d, 0x45, 0x99, 0xb0, 0xdb, 0x3f, |
| 0xe5, 0x07, 0xff, 0xbc, 0x97, 0xc2, 0x41, 0x49, 0x54, 0xcd, 0x73, 0xf9, 0x9e, 0x56, 0x86, 0x98, |
| 0x44, 0xc4, 0xb9, 0xe5, 0x54, 0x92, 0xc1, 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93, 0xd6, 0x28, 0xb8, 0x0a, 0xa6, |
| 0xe7, 0x2f, 0x67, 0xf2, 0xcd, 0xd0, 0x42, 0x2d, 0x17, 0x64, 0xc7, 0x8e, 0x8e, 0x95, 0x66, 0x34, |
| 0x3a, 0x2f, 0xc7, 0xfe, 0x8f, 0x90, 0x54, 0xce, 0xbb, 0x3e, 0x5d, 0x7f, 0x07, 0x00, 0x00, 0xff, |
| 0xff, 0xe6, 0x36, 0x87, 0xc6, 0x2d, 0x02, 0x00, 0x00, |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConn |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion4 |
| |
| // LoopbackExecServiceClient is the client API for LoopbackExecService service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type LoopbackExecServiceClient interface { |
| Exec(ctx context.Context, opts ...grpc.CallOption) (LoopbackExecService_ExecClient, error) |
| } |
| |
| type loopbackExecServiceClient struct { |
| cc *grpc.ClientConn |
| } |
| |
| func NewLoopbackExecServiceClient(cc *grpc.ClientConn) LoopbackExecServiceClient { |
| return &loopbackExecServiceClient{cc} |
| } |
| |
| func (c *loopbackExecServiceClient) Exec(ctx context.Context, opts ...grpc.CallOption) (LoopbackExecService_ExecClient, error) { |
| stream, err := c.cc.NewStream(ctx, &_LoopbackExecService_serviceDesc.Streams[0], "/tast.core.LoopbackExecService/Exec", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &loopbackExecServiceExecClient{stream} |
| return x, nil |
| } |
| |
| type LoopbackExecService_ExecClient interface { |
| Send(*ExecRequest) error |
| Recv() (*ExecResponse, error) |
| grpc.ClientStream |
| } |
| |
| type loopbackExecServiceExecClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *loopbackExecServiceExecClient) Send(m *ExecRequest) error { |
| return x.ClientStream.SendMsg(m) |
| } |
| |
| func (x *loopbackExecServiceExecClient) Recv() (*ExecResponse, error) { |
| m := new(ExecResponse) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| // LoopbackExecServiceServer is the server API for LoopbackExecService service. |
| type LoopbackExecServiceServer interface { |
| Exec(LoopbackExecService_ExecServer) error |
| } |
| |
| // UnimplementedLoopbackExecServiceServer can be embedded to have forward compatible implementations. |
| type UnimplementedLoopbackExecServiceServer struct { |
| } |
| |
| func (*UnimplementedLoopbackExecServiceServer) Exec(srv LoopbackExecService_ExecServer) error { |
| return status.Errorf(codes.Unimplemented, "method Exec not implemented") |
| } |
| |
| func RegisterLoopbackExecServiceServer(s *grpc.Server, srv LoopbackExecServiceServer) { |
| s.RegisterService(&_LoopbackExecService_serviceDesc, srv) |
| } |
| |
| func _LoopbackExecService_Exec_Handler(srv interface{}, stream grpc.ServerStream) error { |
| return srv.(LoopbackExecServiceServer).Exec(&loopbackExecServiceExecServer{stream}) |
| } |
| |
| type LoopbackExecService_ExecServer interface { |
| Send(*ExecResponse) error |
| Recv() (*ExecRequest, error) |
| grpc.ServerStream |
| } |
| |
| type loopbackExecServiceExecServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *loopbackExecServiceExecServer) Send(m *ExecResponse) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| func (x *loopbackExecServiceExecServer) Recv() (*ExecRequest, error) { |
| m := new(ExecRequest) |
| if err := x.ServerStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| var _LoopbackExecService_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "tast.core.LoopbackExecService", |
| HandlerType: (*LoopbackExecServiceServer)(nil), |
| Methods: []grpc.MethodDesc{}, |
| Streams: []grpc.StreamDesc{ |
| { |
| StreamName: "Exec", |
| Handler: _LoopbackExecService_Exec_Handler, |
| ServerStreams: true, |
| ClientStreams: true, |
| }, |
| }, |
| Metadata: "loopback.proto", |
| } |