2017-05-20 08:17:34 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: task.proto
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package task is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
task.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
|
|
|
Empty
|
|
|
|
TaskInfo
|
|
|
|
TaskList
|
|
|
|
*/
|
|
|
|
package task
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2017-05-20 09:47:21 +00:00
|
|
|
import commons "loafle.com/overflow/central_api_gateway/commons"
|
2017-05-20 08:17:34 +00:00
|
|
|
|
|
|
|
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 Empty struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Empty) Reset() { *m = Empty{} }
|
|
|
|
func (m *Empty) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Empty) ProtoMessage() {}
|
|
|
|
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
|
|
|
|
type TaskInfo struct {
|
2017-05-20 09:47:21 +00:00
|
|
|
Command commons.TaskEventType `protobuf:"varint,1,opt,name=command,enum=TaskEventType" json:"command,omitempty"`
|
|
|
|
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,omitempty"`
|
|
|
|
Data map[string]string `protobuf:"bytes,3,rep,name=data" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
2017-05-20 08:17:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TaskInfo) Reset() { *m = TaskInfo{} }
|
|
|
|
func (m *TaskInfo) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TaskInfo) ProtoMessage() {}
|
|
|
|
func (*TaskInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
|
2017-05-20 09:47:21 +00:00
|
|
|
func (m *TaskInfo) GetCommand() commons.TaskEventType {
|
2017-05-20 08:17:34 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.Command
|
|
|
|
}
|
2017-05-20 09:47:21 +00:00
|
|
|
return commons.TaskEventType_TASK_POL_INTERVAL_UPDATE
|
2017-05-20 08:17:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TaskInfo) GetTaskId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.TaskId
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TaskInfo) GetData() map[string]string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type TaskList struct {
|
|
|
|
TaskList []*TaskInfo `protobuf:"bytes,1,rep,name=taskList" json:"taskList,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *TaskList) Reset() { *m = TaskList{} }
|
|
|
|
func (m *TaskList) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*TaskList) ProtoMessage() {}
|
|
|
|
func (*TaskList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
|
|
|
|
|
|
|
func (m *TaskList) GetTaskList() []*TaskInfo {
|
|
|
|
if m != nil {
|
|
|
|
return m.TaskList
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*Empty)(nil), "Empty")
|
|
|
|
proto.RegisterType((*TaskInfo)(nil), "TaskInfo")
|
|
|
|
proto.RegisterType((*TaskList)(nil), "TaskList")
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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 Task service
|
|
|
|
|
|
|
|
type TaskClient interface {
|
|
|
|
RequestTask(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaskList, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type taskClient struct {
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewTaskClient(cc *grpc.ClientConn) TaskClient {
|
|
|
|
return &taskClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *taskClient) RequestTask(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaskList, error) {
|
|
|
|
out := new(TaskList)
|
|
|
|
err := grpc.Invoke(ctx, "/Task/requestTask", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server API for Task service
|
|
|
|
|
|
|
|
type TaskServer interface {
|
|
|
|
RequestTask(context.Context, *Empty) (*TaskList, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterTaskServer(s *grpc.Server, srv TaskServer) {
|
|
|
|
s.RegisterService(&_Task_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Task_RequestTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Empty)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(TaskServer).RequestTask(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Task/RequestTask",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(TaskServer).RequestTask(ctx, req.(*Empty))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Task_serviceDesc = grpc.ServiceDesc{
|
|
|
|
ServiceName: "Task",
|
|
|
|
HandlerType: (*TaskServer)(nil),
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "requestTask",
|
|
|
|
Handler: _Task_RequestTask_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
Metadata: "task.proto",
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("task.proto", fileDescriptor0) }
|
|
|
|
|
|
|
|
var fileDescriptor0 = []byte{
|
2017-05-20 09:47:21 +00:00
|
|
|
// 276 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x50, 0xcd, 0x6a, 0xf3, 0x40,
|
|
|
|
0x0c, 0xfc, 0x36, 0xff, 0x56, 0x20, 0x7c, 0x6c, 0x4b, 0x31, 0x39, 0x05, 0x43, 0xa9, 0xe9, 0x61,
|
|
|
|
0x43, 0xdd, 0x43, 0x4b, 0xa1, 0xb7, 0xfa, 0x10, 0xe8, 0xc9, 0xe4, 0x1e, 0x54, 0x7b, 0x5d, 0x82,
|
|
|
|
0xed, 0x5d, 0xd7, 0x56, 0x1c, 0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