protoc cmd

This commit is contained in:
snoop 2017-05-20 18:44:08 +09:00
parent 54608d4fd5
commit da8256f7a1
5 changed files with 203 additions and 276 deletions

1
commons/cmd Normal file
View File

@ -0,0 +1 @@
protoc -I commons/ commons/commons.proto --go_out=plugins=grpc:commons

150
commons/commons.pb.go Normal file
View File

@ -0,0 +1,150 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: commons.proto
/*
Package commons is a generated protocol buffer package.
It is generated from these files:
commons.proto
It has these top-level messages:
*/
package commons
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import 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.ProtoPackageIsVersion2 // please upgrade the proto package
type DiscoveryEventType int32
const (
DiscoveryEventType_DISCOVERY_START DiscoveryEventType = 0
DiscoveryEventType_DISCOVERY_HOST_START DiscoveryEventType = 1
DiscoveryEventType_DISCOVERY_HOST_FOUND DiscoveryEventType = 2
DiscoveryEventType_DISCOVERY_HOST_DONE DiscoveryEventType = 3
DiscoveryEventType_DISCOVERY_PORT_START DiscoveryEventType = 4
DiscoveryEventType_DISCOVERY_PORT_FOUND DiscoveryEventType = 5
DiscoveryEventType_DISCOVERY_PORT_DONE DiscoveryEventType = 6
DiscoveryEventType_DISCOVERY_SERVICE_START DiscoveryEventType = 7
DiscoveryEventType_DISCOVERY_SERVICE_FOUND DiscoveryEventType = 8
DiscoveryEventType_DISCOVERY_SERVICE_DONE DiscoveryEventType = 9
DiscoveryEventType_DISCOVERY_DONE DiscoveryEventType = 10
)
var DiscoveryEventType_name = map[int32]string{
0: "DISCOVERY_START",
1: "DISCOVERY_HOST_START",
2: "DISCOVERY_HOST_FOUND",
3: "DISCOVERY_HOST_DONE",
4: "DISCOVERY_PORT_START",
5: "DISCOVERY_PORT_FOUND",
6: "DISCOVERY_PORT_DONE",
7: "DISCOVERY_SERVICE_START",
8: "DISCOVERY_SERVICE_FOUND",
9: "DISCOVERY_SERVICE_DONE",
10: "DISCOVERY_DONE",
}
var DiscoveryEventType_value = map[string]int32{
"DISCOVERY_START": 0,
"DISCOVERY_HOST_START": 1,
"DISCOVERY_HOST_FOUND": 2,
"DISCOVERY_HOST_DONE": 3,
"DISCOVERY_PORT_START": 4,
"DISCOVERY_PORT_FOUND": 5,
"DISCOVERY_PORT_DONE": 6,
"DISCOVERY_SERVICE_START": 7,
"DISCOVERY_SERVICE_FOUND": 8,
"DISCOVERY_SERVICE_DONE": 9,
"DISCOVERY_DONE": 10,
}
func (x DiscoveryEventType) String() string {
return proto.EnumName(DiscoveryEventType_name, int32(x))
}
func (DiscoveryEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type TaskEventType int32
const (
TaskEventType_TASK_POL_INTERVAL_UPDATE TaskEventType = 0
TaskEventType_TASK_SENSOR_START TaskEventType = 1
TaskEventType_TASK_SENSOR_STOP TaskEventType = 2
TaskEventType_TASK_SENSOR_ADD TaskEventType = 3
TaskEventType_TASK_SENSOR_REMOVE TaskEventType = 4
TaskEventType_TASK_SENSOR_UPDATE TaskEventType = 5
TaskEventType_TASK_CRAWLER_UPDATE TaskEventType = 6
TaskEventType_TASK_AGENT_UPDATE TaskEventType = 7
TaskEventType_TASK_LOG_SEND TaskEventType = 8
TaskEventType_TASK_DISCOVERY TaskEventType = 9
)
var TaskEventType_name = map[int32]string{
0: "TASK_POL_INTERVAL_UPDATE",
1: "TASK_SENSOR_START",
2: "TASK_SENSOR_STOP",
3: "TASK_SENSOR_ADD",
4: "TASK_SENSOR_REMOVE",
5: "TASK_SENSOR_UPDATE",
6: "TASK_CRAWLER_UPDATE",
7: "TASK_AGENT_UPDATE",
8: "TASK_LOG_SEND",
9: "TASK_DISCOVERY",
}
var TaskEventType_value = map[string]int32{
"TASK_POL_INTERVAL_UPDATE": 0,
"TASK_SENSOR_START": 1,
"TASK_SENSOR_STOP": 2,
"TASK_SENSOR_ADD": 3,
"TASK_SENSOR_REMOVE": 4,
"TASK_SENSOR_UPDATE": 5,
"TASK_CRAWLER_UPDATE": 6,
"TASK_AGENT_UPDATE": 7,
"TASK_LOG_SEND": 8,
"TASK_DISCOVERY": 9,
}
func (x TaskEventType) String() string {
return proto.EnumName(TaskEventType_name, int32(x))
}
func (TaskEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterEnum("DiscoveryEventType", DiscoveryEventType_name, DiscoveryEventType_value)
proto.RegisterEnum("TaskEventType", TaskEventType_name, TaskEventType_value)
}
func init() { proto.RegisterFile("commons.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 302 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x4e, 0xfa, 0x40,
0x14, 0x47, 0xf9, 0xfa, 0xc3, 0x9f, 0x9b, 0x80, 0xc3, 0x05, 0x81, 0xa8, 0x4f, 0xc0, 0xc2, 0x8d,
0x4f, 0x30, 0x61, 0xae, 0x48, 0xac, 0x9d, 0x66, 0x66, 0xa8, 0x71, 0xd5, 0x28, 0x61, 0x61, 0x0c,
0x94, 0x50, 0x42, 0xc2, 0x43, 0xf9, 0x7a, 0xae, 0x4d, 0x87, 0xd2, 0x0f, 0xec, 0xf6, 0x9c, 0xf4,
0xf4, 0xf6, 0x97, 0x42, 0x67, 0x19, 0xae, 0xd7, 0xe1, 0x26, 0xba, 0xdf, 0xee, 0xc2, 0x7d, 0x38,
0xf9, 0xae, 0x01, 0x8a, 0xcf, 0x68, 0x19, 0x1e, 0x56, 0xbb, 0x23, 0x1d, 0x56, 0x9b, 0xbd, 0x39,
0x6e, 0x57, 0xd8, 0x87, 0x2b, 0x31, 0xd7, 0x53, 0xe9, 0x93, 0x7a, 0x0b, 0xb4, 0xe1, 0xca, 0x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x7e, 0x5f, 0x8f, 0x24, 0x40, 0x02, 0x00, 0x00,
}

1
event/cmd Normal file
View File

@ -0,0 +1 @@
protoc -I$GOPATH/src/ -I event/ event/event.proto --go_out=plugins=grpc:event

View File

@ -9,7 +9,6 @@ It is generated from these files:
It has these top-level messages:
Empty
DiscoveryEvent
TaskResultEvent
AgentEvent
*/
@ -18,6 +17,7 @@ package event
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import commons "loafle.com/overflow/central_api_gateway/commons"
import (
context "golang.org/x/net/context"
@ -59,100 +59,6 @@ func (x TaskResultState) String() string {
}
func (TaskResultState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type DiscoveryEvent_DiscoveryEventType int32
const (
DiscoveryEvent_DISCOVERY_START DiscoveryEvent_DiscoveryEventType = 0
DiscoveryEvent_DISCOVERY_HOST_START DiscoveryEvent_DiscoveryEventType = 1
DiscoveryEvent_DISCOVERY_HOST_FOUND DiscoveryEvent_DiscoveryEventType = 2
DiscoveryEvent_DISCOVERY_HOST_DONE DiscoveryEvent_DiscoveryEventType = 3
DiscoveryEvent_DISCOVERY_PORT_START DiscoveryEvent_DiscoveryEventType = 4
DiscoveryEvent_DISCOVERY_PORT_FOUND DiscoveryEvent_DiscoveryEventType = 5
DiscoveryEvent_DISCOVERY_PORT_DONE DiscoveryEvent_DiscoveryEventType = 6
DiscoveryEvent_DISCOVERY_SERVICE_START DiscoveryEvent_DiscoveryEventType = 7
DiscoveryEvent_DISCOVERY_SERVICE_FOUND DiscoveryEvent_DiscoveryEventType = 8
DiscoveryEvent_DISCOVERY_SERVICE_DONE DiscoveryEvent_DiscoveryEventType = 9
DiscoveryEvent_DISCOVERY_DONE DiscoveryEvent_DiscoveryEventType = 10
)
var DiscoveryEvent_DiscoveryEventType_name = map[int32]string{
0: "DISCOVERY_START",
1: "DISCOVERY_HOST_START",
2: "DISCOVERY_HOST_FOUND",
3: "DISCOVERY_HOST_DONE",
4: "DISCOVERY_PORT_START",
5: "DISCOVERY_PORT_FOUND",
6: "DISCOVERY_PORT_DONE",
7: "DISCOVERY_SERVICE_START",
8: "DISCOVERY_SERVICE_FOUND",
9: "DISCOVERY_SERVICE_DONE",
10: "DISCOVERY_DONE",
}
var DiscoveryEvent_DiscoveryEventType_value = map[string]int32{
"DISCOVERY_START": 0,
"DISCOVERY_HOST_START": 1,
"DISCOVERY_HOST_FOUND": 2,
"DISCOVERY_HOST_DONE": 3,
"DISCOVERY_PORT_START": 4,
"DISCOVERY_PORT_FOUND": 5,
"DISCOVERY_PORT_DONE": 6,
"DISCOVERY_SERVICE_START": 7,
"DISCOVERY_SERVICE_FOUND": 8,
"DISCOVERY_SERVICE_DONE": 9,
"DISCOVERY_DONE": 10,
}
func (x DiscoveryEvent_DiscoveryEventType) String() string {
return proto.EnumName(DiscoveryEvent_DiscoveryEventType_name, int32(x))
}
func (DiscoveryEvent_DiscoveryEventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{1, 0}
}
type TaskResultEvent_TaskResultEventType int32
const (
TaskResultEvent_TASK_POL_INTERVAL_UPDATE TaskResultEvent_TaskResultEventType = 0
TaskResultEvent_TASK_SENSOR_START TaskResultEvent_TaskResultEventType = 1
TaskResultEvent_TASK_SENSOR_STOP TaskResultEvent_TaskResultEventType = 2
TaskResultEvent_TASK_SENSOR_ADD TaskResultEvent_TaskResultEventType = 3
TaskResultEvent_TASK_SENSOR_REMOVE TaskResultEvent_TaskResultEventType = 4
TaskResultEvent_TASK_SENSOR_UPDATE TaskResultEvent_TaskResultEventType = 5
TaskResultEvent_TASK_CRAWLER_UPDATE TaskResultEvent_TaskResultEventType = 6
TaskResultEvent_TASK_AGENT_UPDATE TaskResultEvent_TaskResultEventType = 7
TaskResultEvent_TASK_LOG_SEND TaskResultEvent_TaskResultEventType = 8
)
var TaskResultEvent_TaskResultEventType_name = map[int32]string{
0: "TASK_POL_INTERVAL_UPDATE",
1: "TASK_SENSOR_START",
2: "TASK_SENSOR_STOP",
3: "TASK_SENSOR_ADD",
4: "TASK_SENSOR_REMOVE",
5: "TASK_SENSOR_UPDATE",
6: "TASK_CRAWLER_UPDATE",
7: "TASK_AGENT_UPDATE",
8: "TASK_LOG_SEND",
}
var TaskResultEvent_TaskResultEventType_value = map[string]int32{
"TASK_POL_INTERVAL_UPDATE": 0,
"TASK_SENSOR_START": 1,
"TASK_SENSOR_STOP": 2,
"TASK_SENSOR_ADD": 3,
"TASK_SENSOR_REMOVE": 4,
"TASK_SENSOR_UPDATE": 5,
"TASK_CRAWLER_UPDATE": 6,
"TASK_AGENT_UPDATE": 7,
"TASK_LOG_SEND": 8,
}
func (x TaskResultEvent_TaskResultEventType) String() string {
return proto.EnumName(TaskResultEvent_TaskResultEventType_name, int32(x))
}
func (TaskResultEvent_TaskResultEventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{2, 0}
}
type AgentEvent_AgentEventType int32
const (
@ -175,7 +81,7 @@ var AgentEvent_AgentEventType_value = map[string]int32{
func (x AgentEvent_AgentEventType) String() string {
return proto.EnumName(AgentEvent_AgentEventType_name, int32(x))
}
func (AgentEvent_AgentEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
func (AgentEvent_AgentEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
type Empty struct {
}
@ -185,68 +91,19 @@ func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Event-relative area
type DiscoveryEvent struct {
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,omitempty"`
EvtType DiscoveryEvent_DiscoveryEventType `protobuf:"varint,3,opt,name=evtType,enum=DiscoveryEvent_DiscoveryEventType" json:"evtType,omitempty"`
OccurredDate int64 `protobuf:"varint,4,opt,name=occurredDate" json:"occurredDate,omitempty"`
Data map[string]string `protobuf:"bytes,5,rep,name=data" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *DiscoveryEvent) Reset() { *m = DiscoveryEvent{} }
func (m *DiscoveryEvent) String() string { return proto.CompactTextString(m) }
func (*DiscoveryEvent) ProtoMessage() {}
func (*DiscoveryEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *DiscoveryEvent) GetAgentId() string {
if m != nil {
return m.AgentId
}
return ""
}
func (m *DiscoveryEvent) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
func (m *DiscoveryEvent) GetEvtType() DiscoveryEvent_DiscoveryEventType {
if m != nil {
return m.EvtType
}
return DiscoveryEvent_DISCOVERY_START
}
func (m *DiscoveryEvent) GetOccurredDate() int64 {
if m != nil {
return m.OccurredDate
}
return 0
}
func (m *DiscoveryEvent) GetData() map[string]string {
if m != nil {
return m.Data
}
return nil
}
type TaskResultEvent struct {
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,omitempty"`
EvtType TaskResultEvent_TaskResultEventType `protobuf:"varint,3,opt,name=evtType,enum=TaskResultEvent_TaskResultEventType" json:"evtType,omitempty"`
OccurredDate int64 `protobuf:"varint,4,opt,name=occurredDate" json:"occurredDate,omitempty"`
Result TaskResultState `protobuf:"varint,5,opt,name=result,enum=TaskResultState" json:"result,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"`
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,omitempty"`
EvtType commons.TaskEventType `protobuf:"varint,3,opt,name=evtType,enum=TaskEventType" json:"evtType,omitempty"`
OccurredDate int64 `protobuf:"varint,4,opt,name=occurredDate" json:"occurredDate,omitempty"`
Result TaskResultState `protobuf:"varint,5,opt,name=result,enum=TaskResultState" json:"result,omitempty"`
Data map[string]string `protobuf:"bytes,6,rep,name=data" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *TaskResultEvent) Reset() { *m = TaskResultEvent{} }
func (m *TaskResultEvent) String() string { return proto.CompactTextString(m) }
func (*TaskResultEvent) ProtoMessage() {}
func (*TaskResultEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (*TaskResultEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *TaskResultEvent) GetAgentId() string {
if m != nil {
@ -262,11 +119,11 @@ func (m *TaskResultEvent) GetTaskId() string {
return ""
}
func (m *TaskResultEvent) GetEvtType() TaskResultEvent_TaskResultEventType {
func (m *TaskResultEvent) GetEvtType() commons.TaskEventType {
if m != nil {
return m.EvtType
}
return TaskResultEvent_TASK_POL_INTERVAL_UPDATE
return commons.TaskEventType_TASK_POL_INTERVAL_UPDATE
}
func (m *TaskResultEvent) GetOccurredDate() int64 {
@ -283,11 +140,11 @@ func (m *TaskResultEvent) GetResult() TaskResultState {
return TaskResultState_FAILED
}
func (m *TaskResultEvent) GetDescription() string {
func (m *TaskResultEvent) GetData() map[string]string {
if m != nil {
return m.Description
return m.Data
}
return ""
return nil
}
type AgentEvent struct {
@ -301,7 +158,7 @@ type AgentEvent struct {
func (m *AgentEvent) Reset() { *m = AgentEvent{} }
func (m *AgentEvent) String() string { return proto.CompactTextString(m) }
func (*AgentEvent) ProtoMessage() {}
func (*AgentEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (*AgentEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *AgentEvent) GetAgentId() string {
if m != nil {
@ -347,7 +204,7 @@ type AgentEvent_ErrorInfo struct {
func (m *AgentEvent_ErrorInfo) Reset() { *m = AgentEvent_ErrorInfo{} }
func (m *AgentEvent_ErrorInfo) String() string { return proto.CompactTextString(m) }
func (*AgentEvent_ErrorInfo) ProtoMessage() {}
func (*AgentEvent_ErrorInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
func (*AgentEvent_ErrorInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
func (m *AgentEvent_ErrorInfo) GetErrorNum() int32 {
if m != nil {
@ -372,13 +229,10 @@ func (m *AgentEvent_ErrorInfo) GetErrorMessage() string {
func init() {
proto.RegisterType((*Empty)(nil), "Empty")
proto.RegisterType((*DiscoveryEvent)(nil), "DiscoveryEvent")
proto.RegisterType((*TaskResultEvent)(nil), "TaskResultEvent")
proto.RegisterType((*AgentEvent)(nil), "AgentEvent")
proto.RegisterType((*AgentEvent_ErrorInfo)(nil), "AgentEvent.ErrorInfo")
proto.RegisterEnum("TaskResultState", TaskResultState_name, TaskResultState_value)
proto.RegisterEnum("DiscoveryEvent_DiscoveryEventType", DiscoveryEvent_DiscoveryEventType_name, DiscoveryEvent_DiscoveryEventType_value)
proto.RegisterEnum("TaskResultEvent_TaskResultEventType", TaskResultEvent_TaskResultEventType_name, TaskResultEvent_TaskResultEventType_value)
proto.RegisterEnum("AgentEvent_AgentEventType", AgentEvent_AgentEventType_name, AgentEvent_AgentEventType_value)
}
@ -390,70 +244,6 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Discovery service
type DiscoveryClient interface {
Event(ctx context.Context, in *DiscoveryEvent, opts ...grpc.CallOption) (*Empty, error)
}
type discoveryClient struct {
cc *grpc.ClientConn
}
func NewDiscoveryClient(cc *grpc.ClientConn) DiscoveryClient {
return &discoveryClient{cc}
}
func (c *discoveryClient) Event(ctx context.Context, in *DiscoveryEvent, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/Discovery/event", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Discovery service
type DiscoveryServer interface {
Event(context.Context, *DiscoveryEvent) (*Empty, error)
}
func RegisterDiscoveryServer(s *grpc.Server, srv DiscoveryServer) {
s.RegisterService(&_Discovery_serviceDesc, srv)
}
func _Discovery_Event_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DiscoveryEvent)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DiscoveryServer).Event(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Discovery/Event",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DiscoveryServer).Event(ctx, req.(*DiscoveryEvent))
}
return interceptor(ctx, in, info, handler)
}
var _Discovery_serviceDesc = grpc.ServiceDesc{
ServiceName: "Discovery",
HandlerType: (*DiscoveryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "event",
Handler: _Discovery_Event_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "event.proto",
}
// Client API for TaskResult service
type TaskResultClient interface {
@ -585,50 +375,37 @@ var _Event_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("event.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 719 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x6e, 0xda, 0x4a,
0x10, 0xc6, 0x36, 0x36, 0x61, 0x38, 0x07, 0x9c, 0xc9, 0x9f, 0x0f, 0xe7, 0xe8, 0x08, 0xb9, 0x95,
0x8a, 0x2a, 0x95, 0xa8, 0xb4, 0x52, 0xab, 0xa8, 0xaa, 0x64, 0xe1, 0x4d, 0x6a, 0x95, 0x60, 0xb4,
0x76, 0xa8, 0x7a, 0x85, 0x5c, 0xd8, 0x44, 0x51, 0x12, 0x8c, 0x8c, 0x41, 0xe2, 0xa1, 0xfa, 0x06,
0x7d, 0x96, 0x5e, 0xf7, 0x19, 0x7a, 0x55, 0x79, 0x6d, 0x83, 0x31, 0xa8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0, 0x9c, 0x1b, 0x56, 0x97, 0xd7, 0x57, 0xa0, 0xe4, 0x5c, 0x75,
0x3a, 0x84, 0x98, 0x71, 0x6d, 0x9f, 0xda, 0x51, 0x60, 0xf5, 0x2e, 0x54, 0xb1, 0x7d, 0x0a, 0xe5,
0xd5, 0x43, 0x86, 0x3a, 0xc8, 0xfc, 0xf5, 0xc7, 0x5a, 0xee, 0xe5, 0xac, 0x2b, 0xad, 0xf8, 0x3f,
0x50, 0x68, 0x3f, 0x07, 0x58, 0x6f, 0x86, 0x8f, 0xd2, 0x0a, 0x35, 0xff, 0xe9, 0x65, 0x4a, 0x9e,
0x80, 0x1c, 0xdb, 0xe2, 0xff, 0x34, 0xbb, 0x92, 0xb9, 0xf8, 0x75, 0xe2, 0x27, 0x85, 0xff, 0x75,
0x5e, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xb0, 0x7e, 0x78, 0x84, 0x06, 0x00, 0x00,
// 505 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xcf, 0x8f, 0x93, 0x40,
0x14, 0x5e, 0x68, 0xa1, 0xf6, 0xa1, 0x5d, 0x9c, 0xa8, 0x21, 0x1c, 0x4c, 0x53, 0x0f, 0x12, 0x0f,
0x34, 0x56, 0x13, 0xcd, 0x26, 0x1e, 0x9a, 0x2d, 0x6e, 0x48, 0xb4, 0xdd, 0x4c, 0xf1, 0xdc, 0x8c,
0x30, 0x6d, 0x9a, 0x02, 0x43, 0x86, 0x69, 0x37, 0xfc, 0x3f, 0xfe, 0x95, 0x9e, 0x0c, 0x03, 0x14,
0xba, 0x31, 0x7a, 0xe2, 0x7d, 0xdf, 0xfb, 0x31, 0xef, 0x7d, 0xbc, 0x07, 0x06, 0x3d, 0xd1, 0x54,
0xb8, 0x19, 0x67, 0x82, 0xd9, 0x5f, 0x62, 0x46, 0xb6, 0x31, 0x75, 0x43, 0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 0x23, 0x42,
0xe6, 0xe3, 0x55, 0xb1, 0x75, 0xb7, 0x3a, 0x88, 0xab, 0xd9, 0x5b, 0xd0, 0xaa, 0xbf, 0xfc, 0xba,
0x89, 0x36, 0x3a, 0x3a, 0xb6, 0x81, 0x3f, 0x75, 0x79, 0x4b, 0x1f, 0xfe, 0x04, 0x00, 0x00, 0xff,
0xff, 0xbc, 0xba, 0xfc, 0x41, 0x99, 0x03, 0x00, 0x00,
}

View File

@ -1,10 +1,8 @@
syntax = "proto3";
message Empty {}
import "loafle.com/overflow/central_api_gateway/commons/commons.proto";
service Discovery {
rpc event(DiscoveryEvent) returns (Empty){}
}
message Empty {}
enum TaskResultState {
FAILED = 0;