/
task-delay-queue-service_grpc.pb.go
245 lines (223 loc) · 10.1 KB
/
task-delay-queue-service_grpc.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package api
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.SupportPackageIsVersion7
// TaskDelayQueueServiceClient is the client API for TaskDelayQueueService 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 TaskDelayQueueServiceClient interface {
// for task producers
PushTask(ctx context.Context, in *PushTaskRequest, opts ...grpc.CallOption) (*PushTaskResponse, error)
FinishTask(ctx context.Context, in *FinishTaskRequest, opts ...grpc.CallOption) (*FinishTaskResponse, error)
CheckTask(ctx context.Context, in *CheckTaskRequest, opts ...grpc.CallOption) (*CheckTaskResponse, error)
// for task comsumers
SubscribeTopic(ctx context.Context, in *SubscribeTopicRequest, opts ...grpc.CallOption) (*SubscribeTopicResponse, error)
UnsubscribeTopic(ctx context.Context, in *UnsubscribeTopicRequest, opts ...grpc.CallOption) (*UnsubscribeTopicResponse, error)
}
type taskDelayQueueServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTaskDelayQueueServiceClient(cc grpc.ClientConnInterface) TaskDelayQueueServiceClient {
return &taskDelayQueueServiceClient{cc}
}
func (c *taskDelayQueueServiceClient) PushTask(ctx context.Context, in *PushTaskRequest, opts ...grpc.CallOption) (*PushTaskResponse, error) {
out := new(PushTaskResponse)
err := c.cc.Invoke(ctx, "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/PushTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskDelayQueueServiceClient) FinishTask(ctx context.Context, in *FinishTaskRequest, opts ...grpc.CallOption) (*FinishTaskResponse, error) {
out := new(FinishTaskResponse)
err := c.cc.Invoke(ctx, "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/FinishTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskDelayQueueServiceClient) CheckTask(ctx context.Context, in *CheckTaskRequest, opts ...grpc.CallOption) (*CheckTaskResponse, error) {
out := new(CheckTaskResponse)
err := c.cc.Invoke(ctx, "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/CheckTask", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskDelayQueueServiceClient) SubscribeTopic(ctx context.Context, in *SubscribeTopicRequest, opts ...grpc.CallOption) (*SubscribeTopicResponse, error) {
out := new(SubscribeTopicResponse)
err := c.cc.Invoke(ctx, "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/SubscribeTopic", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *taskDelayQueueServiceClient) UnsubscribeTopic(ctx context.Context, in *UnsubscribeTopicRequest, opts ...grpc.CallOption) (*UnsubscribeTopicResponse, error) {
out := new(UnsubscribeTopicResponse)
err := c.cc.Invoke(ctx, "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/UnsubscribeTopic", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TaskDelayQueueServiceServer is the server API for TaskDelayQueueService service.
// All implementations must embed UnimplementedTaskDelayQueueServiceServer
// for forward compatibility
type TaskDelayQueueServiceServer interface {
// for task producers
PushTask(context.Context, *PushTaskRequest) (*PushTaskResponse, error)
FinishTask(context.Context, *FinishTaskRequest) (*FinishTaskResponse, error)
CheckTask(context.Context, *CheckTaskRequest) (*CheckTaskResponse, error)
// for task comsumers
SubscribeTopic(context.Context, *SubscribeTopicRequest) (*SubscribeTopicResponse, error)
UnsubscribeTopic(context.Context, *UnsubscribeTopicRequest) (*UnsubscribeTopicResponse, error)
mustEmbedUnimplementedTaskDelayQueueServiceServer()
}
// UnimplementedTaskDelayQueueServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTaskDelayQueueServiceServer struct {
}
func (UnimplementedTaskDelayQueueServiceServer) PushTask(context.Context, *PushTaskRequest) (*PushTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushTask not implemented")
}
func (UnimplementedTaskDelayQueueServiceServer) FinishTask(context.Context, *FinishTaskRequest) (*FinishTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method FinishTask not implemented")
}
func (UnimplementedTaskDelayQueueServiceServer) CheckTask(context.Context, *CheckTaskRequest) (*CheckTaskResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckTask not implemented")
}
func (UnimplementedTaskDelayQueueServiceServer) SubscribeTopic(context.Context, *SubscribeTopicRequest) (*SubscribeTopicResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SubscribeTopic not implemented")
}
func (UnimplementedTaskDelayQueueServiceServer) UnsubscribeTopic(context.Context, *UnsubscribeTopicRequest) (*UnsubscribeTopicResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnsubscribeTopic not implemented")
}
func (UnimplementedTaskDelayQueueServiceServer) mustEmbedUnimplementedTaskDelayQueueServiceServer() {}
// UnsafeTaskDelayQueueServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TaskDelayQueueServiceServer will
// result in compilation errors.
type UnsafeTaskDelayQueueServiceServer interface {
mustEmbedUnimplementedTaskDelayQueueServiceServer()
}
func RegisterTaskDelayQueueServiceServer(s grpc.ServiceRegistrar, srv TaskDelayQueueServiceServer) {
s.RegisterService(&_TaskDelayQueueService_serviceDesc, srv)
}
func _TaskDelayQueueService_PushTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskDelayQueueServiceServer).PushTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/PushTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskDelayQueueServiceServer).PushTask(ctx, req.(*PushTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TaskDelayQueueService_FinishTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FinishTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskDelayQueueServiceServer).FinishTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/FinishTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskDelayQueueServiceServer).FinishTask(ctx, req.(*FinishTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TaskDelayQueueService_CheckTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckTaskRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskDelayQueueServiceServer).CheckTask(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/CheckTask",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskDelayQueueServiceServer).CheckTask(ctx, req.(*CheckTaskRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TaskDelayQueueService_SubscribeTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SubscribeTopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskDelayQueueServiceServer).SubscribeTopic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/SubscribeTopic",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskDelayQueueServiceServer).SubscribeTopic(ctx, req.(*SubscribeTopicRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TaskDelayQueueService_UnsubscribeTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnsubscribeTopicRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskDelayQueueServiceServer).UnsubscribeTopic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/amazingchow.photon_dance_delay_queue.TaskDelayQueueService/UnsubscribeTopic",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskDelayQueueServiceServer).UnsubscribeTopic(ctx, req.(*UnsubscribeTopicRequest))
}
return interceptor(ctx, in, info, handler)
}
var _TaskDelayQueueService_serviceDesc = grpc.ServiceDesc{
ServiceName: "amazingchow.photon_dance_delay_queue.TaskDelayQueueService",
HandlerType: (*TaskDelayQueueServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PushTask",
Handler: _TaskDelayQueueService_PushTask_Handler,
},
{
MethodName: "FinishTask",
Handler: _TaskDelayQueueService_FinishTask_Handler,
},
{
MethodName: "CheckTask",
Handler: _TaskDelayQueueService_CheckTask_Handler,
},
{
MethodName: "SubscribeTopic",
Handler: _TaskDelayQueueService_SubscribeTopic_Handler,
},
{
MethodName: "UnsubscribeTopic",
Handler: _TaskDelayQueueService_UnsubscribeTopic_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "github.com/amazingchow/delay-queue/pb/task-delay-queue-service.proto",
}