-
Notifications
You must be signed in to change notification settings - Fork 79
/
exec.pb.go
196 lines (161 loc) · 5.76 KB
/
exec.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// Code generated by protoc-gen-go.
// source: pkg/protobuf/exec/exec.proto
// DO NOT EDIT!
/*
Package exec is a generated protocol buffer package.
It is generated from these files:
pkg/protobuf/exec/exec.proto
It has these top-level messages:
CommandRequest
CommandResponse
*/
package exec
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
type CommandRequest struct {
AppName string `protobuf:"bytes,1,opt,name=app_name,json=appName" json:"app_name,omitempty"`
Command []string `protobuf:"bytes,2,rep,name=command" json:"command,omitempty"`
}
func (m *CommandRequest) Reset() { *m = CommandRequest{} }
func (m *CommandRequest) String() string { return proto.CompactTextString(m) }
func (*CommandRequest) ProtoMessage() {}
func (*CommandRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *CommandRequest) GetAppName() string {
if m != nil {
return m.AppName
}
return ""
}
func (m *CommandRequest) GetCommand() []string {
if m != nil {
return m.Command
}
return nil
}
type CommandResponse struct {
Text string `protobuf:"bytes,1,opt,name=text" json:"text,omitempty"`
}
func (m *CommandResponse) Reset() { *m = CommandResponse{} }
func (m *CommandResponse) String() string { return proto.CompactTextString(m) }
func (*CommandResponse) ProtoMessage() {}
func (*CommandResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *CommandResponse) GetText() string {
if m != nil {
return m.Text
}
return ""
}
func init() {
proto.RegisterType((*CommandRequest)(nil), "exec.CommandRequest")
proto.RegisterType((*CommandResponse)(nil), "exec.CommandResponse")
}
// 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
// Client API for Exec service
type ExecClient interface {
Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (Exec_CommandClient, error)
}
type execClient struct {
cc *grpc.ClientConn
}
func NewExecClient(cc *grpc.ClientConn) ExecClient {
return &execClient{cc}
}
func (c *execClient) Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (Exec_CommandClient, error) {
stream, err := grpc.NewClientStream(ctx, &_Exec_serviceDesc.Streams[0], c.cc, "/exec.Exec/Command", opts...)
if err != nil {
return nil, err
}
x := &execCommandClient{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
}
type Exec_CommandClient interface {
Recv() (*CommandResponse, error)
grpc.ClientStream
}
type execCommandClient struct {
grpc.ClientStream
}
func (x *execCommandClient) Recv() (*CommandResponse, error) {
m := new(CommandResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// Server API for Exec service
type ExecServer interface {
Command(*CommandRequest, Exec_CommandServer) error
}
func RegisterExecServer(s *grpc.Server, srv ExecServer) {
s.RegisterService(&_Exec_serviceDesc, srv)
}
func _Exec_Command_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(CommandRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ExecServer).Command(m, &execCommandServer{stream})
}
type Exec_CommandServer interface {
Send(*CommandResponse) error
grpc.ServerStream
}
type execCommandServer struct {
grpc.ServerStream
}
func (x *execCommandServer) Send(m *CommandResponse) error {
return x.ServerStream.SendMsg(m)
}
var _Exec_serviceDesc = grpc.ServiceDesc{
ServiceName: "exec.Exec",
HandlerType: (*ExecServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Command",
Handler: _Exec_Command_Handler,
ServerStreams: true,
},
},
Metadata: "pkg/protobuf/exec/exec.proto",
}
func init() { proto.RegisterFile("pkg/protobuf/exec/exec.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 170 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0xc8, 0x4e, 0xd7,
0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xad, 0x48, 0x4d, 0x06, 0x13, 0x7a,
0x60, 0x21, 0x21, 0x16, 0x10, 0x5b, 0xc9, 0x95, 0x8b, 0xcf, 0x39, 0x3f, 0x37, 0x37, 0x31, 0x2f,
0x25, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x92, 0x8b, 0x23, 0xb1, 0xa0, 0x20, 0x3e,
0x2f, 0x31, 0x37, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x3d, 0xb1, 0xa0, 0xc0, 0x2f,
0x31, 0x37, 0x55, 0x48, 0x82, 0x8b, 0x3d, 0x19, 0xa2, 0x58, 0x82, 0x49, 0x81, 0x19, 0x24, 0x03,
0xe5, 0x2a, 0xa9, 0x72, 0xf1, 0xc3, 0x8d, 0x29, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x12, 0xe2,
0x62, 0x29, 0x49, 0xad, 0x28, 0x81, 0x9a, 0x01, 0x66, 0x1b, 0x39, 0x70, 0xb1, 0xb8, 0x56, 0xa4,
0x26, 0x0b, 0x59, 0x70, 0xb1, 0x43, 0x95, 0x0b, 0x89, 0xe8, 0x81, 0xdd, 0x84, 0xea, 0x08, 0x29,
0x51, 0x34, 0x51, 0x88, 0x99, 0x06, 0x8c, 0x49, 0x6c, 0x60, 0xc7, 0x1b, 0x03, 0x02, 0x00, 0x00,
0xff, 0xff, 0x8a, 0xe7, 0xd1, 0xc5, 0xdc, 0x00, 0x00, 0x00,
}