central_api_gateway/event/event.pb.go

412 lines
14 KiB
Go
Raw Normal View History

2017-05-20 08:17:34 +00:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: event.proto
/*
Package event is a generated protocol buffer package.
It is generated from these files:
event.proto
It has these top-level messages:
Empty
TaskResultEvent
AgentEvent
*/
package event
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
2017-05-20 09:44:08 +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 TaskResultState int32
const (
TaskResultState_FAILED TaskResultState = 0
TaskResultState_SUCCEED TaskResultState = 1
TaskResultState_PROCEEDING TaskResultState = 2
)
var TaskResultState_name = map[int32]string{
0: "FAILED",
1: "SUCCEED",
2: "PROCEEDING",
}
var TaskResultState_value = map[string]int32{
"FAILED": 0,
"SUCCEED": 1,
"PROCEEDING": 2,
}
func (x TaskResultState) String() string {
return proto.EnumName(TaskResultState_name, int32(x))
}
func (TaskResultState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type AgentEvent_AgentEventType int32
const (
AgentEvent_AGENT_STARTED AgentEvent_AgentEventType = 0
AgentEvent_AGENT_ERROR AgentEvent_AgentEventType = 1
AgentEvent_AGENT_STOP AgentEvent_AgentEventType = 2
)
var AgentEvent_AgentEventType_name = map[int32]string{
0: "AGENT_STARTED",
1: "AGENT_ERROR",
2: "AGENT_STOP",
}
var AgentEvent_AgentEventType_value = map[string]int32{
"AGENT_STARTED": 0,
"AGENT_ERROR": 1,
"AGENT_STOP": 2,
}
func (x AgentEvent_AgentEventType) String() string {
return proto.EnumName(AgentEvent_AgentEventType_name, int32(x))
}
2017-05-20 09:44:08 +00:00
func (AgentEvent_AgentEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
2017-05-20 08:17:34 +00:00
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 TaskResultEvent struct {
2017-05-20 09:44:08 +00:00
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"`
2017-05-20 08:17:34 +00:00
}
func (m *TaskResultEvent) Reset() { *m = TaskResultEvent{} }
func (m *TaskResultEvent) String() string { return proto.CompactTextString(m) }
func (*TaskResultEvent) ProtoMessage() {}
2017-05-20 09:44:08 +00:00
func (*TaskResultEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
2017-05-20 08:17:34 +00:00
func (m *TaskResultEvent) GetAgentId() string {
if m != nil {
return m.AgentId
}
return ""
}
func (m *TaskResultEvent) GetTaskId() string {
if m != nil {
return m.TaskId
}
return ""
}
2017-05-20 09:44:08 +00:00
func (m *TaskResultEvent) GetEvtType() commons.TaskEventType {
2017-05-20 08:17:34 +00:00
if m != nil {
return m.EvtType
}
2017-05-20 09:44:08 +00:00
return commons.TaskEventType_TASK_POL_INTERVAL_UPDATE
2017-05-20 08:17:34 +00:00
}
func (m *TaskResultEvent) GetOccurredDate() int64 {
if m != nil {
return m.OccurredDate
}
return 0
}
func (m *TaskResultEvent) GetResult() TaskResultState {
if m != nil {
return m.Result
}
return TaskResultState_FAILED
}
2017-05-20 09:44:08 +00:00
func (m *TaskResultEvent) GetData() map[string]string {
2017-05-20 08:17:34 +00:00
if m != nil {
2017-05-20 09:44:08 +00:00
return m.Data
2017-05-20 08:17:34 +00:00
}
2017-05-20 09:44:08 +00:00
return nil
2017-05-20 08:17:34 +00:00
}
type AgentEvent struct {
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
EvtType AgentEvent_AgentEventType `protobuf:"varint,2,opt,name=evtType,enum=AgentEvent_AgentEventType" json:"evtType,omitempty"`
OccurredDate int64 `protobuf:"varint,3,opt,name=occurredDate" json:"occurredDate,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
ErrInfo *AgentEvent_ErrorInfo `protobuf:"bytes,5,opt,name=errInfo" json:"errInfo,omitempty"`
}
func (m *AgentEvent) Reset() { *m = AgentEvent{} }
func (m *AgentEvent) String() string { return proto.CompactTextString(m) }
func (*AgentEvent) ProtoMessage() {}
2017-05-20 09:44:08 +00:00
func (*AgentEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
2017-05-20 08:17:34 +00:00
func (m *AgentEvent) GetAgentId() string {
if m != nil {
return m.AgentId
}
return ""
}
func (m *AgentEvent) GetEvtType() AgentEvent_AgentEventType {
if m != nil {
return m.EvtType
}
return AgentEvent_AGENT_STARTED
}
func (m *AgentEvent) GetOccurredDate() int64 {
if m != nil {
return m.OccurredDate
}
return 0
}
func (m *AgentEvent) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
func (m *AgentEvent) GetErrInfo() *AgentEvent_ErrorInfo {
if m != nil {
return m.ErrInfo
}
return nil
}
type AgentEvent_ErrorInfo struct {
ErrorNum int32 `protobuf:"varint,1,opt,name=errorNum" json:"errorNum,omitempty"`
From string `protobuf:"bytes,2,opt,name=from" json:"from,omitempty"`
ErrorMessage string `protobuf:"bytes,3,opt,name=errorMessage" json:"errorMessage,omitempty"`
}
func (m *AgentEvent_ErrorInfo) Reset() { *m = AgentEvent_ErrorInfo{} }
func (m *AgentEvent_ErrorInfo) String() string { return proto.CompactTextString(m) }
func (*AgentEvent_ErrorInfo) ProtoMessage() {}
2017-05-20 09:44:08 +00:00
func (*AgentEvent_ErrorInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
2017-05-20 08:17:34 +00:00
func (m *AgentEvent_ErrorInfo) GetErrorNum() int32 {
if m != nil {
return m.ErrorNum
}
return 0
}
func (m *AgentEvent_ErrorInfo) GetFrom() string {
if m != nil {
return m.From
}
return ""
}
func (m *AgentEvent_ErrorInfo) GetErrorMessage() string {
if m != nil {
return m.ErrorMessage
}
return ""
}
func init() {
proto.RegisterType((*Empty)(nil), "Empty")
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("AgentEvent_AgentEventType", AgentEvent_AgentEventType_name, AgentEvent_AgentEventType_value)
}
// 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 TaskResult service
type TaskResultClient interface {
Event(ctx context.Context, in *TaskResultEvent, opts ...grpc.CallOption) (*Empty, error)
}
type taskResultClient struct {
cc *grpc.ClientConn
}
func NewTaskResultClient(cc *grpc.ClientConn) TaskResultClient {
return &taskResultClient{cc}
}
func (c *taskResultClient) Event(ctx context.Context, in *TaskResultEvent, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/TaskResult/event", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for TaskResult service
type TaskResultServer interface {
Event(context.Context, *TaskResultEvent) (*Empty, error)
}
func RegisterTaskResultServer(s *grpc.Server, srv TaskResultServer) {
s.RegisterService(&_TaskResult_serviceDesc, srv)
}
func _TaskResult_Event_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TaskResultEvent)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TaskResultServer).Event(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/TaskResult/Event",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TaskResultServer).Event(ctx, req.(*TaskResultEvent))
}
return interceptor(ctx, in, info, handler)
}
var _TaskResult_serviceDesc = grpc.ServiceDesc{
ServiceName: "TaskResult",
HandlerType: (*TaskResultServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "event",
Handler: _TaskResult_Event_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "event.proto",
}
// Client API for Event service
type EventClient interface {
Event(ctx context.Context, in *AgentEvent, opts ...grpc.CallOption) (*Empty, error)
}
type eventClient struct {
cc *grpc.ClientConn
}
func NewEventClient(cc *grpc.ClientConn) EventClient {
return &eventClient{cc}
}
func (c *eventClient) Event(ctx context.Context, in *AgentEvent, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/Event/event", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Event service
type EventServer interface {
Event(context.Context, *AgentEvent) (*Empty, error)
}
func RegisterEventServer(s *grpc.Server, srv EventServer) {
s.RegisterService(&_Event_serviceDesc, srv)
}
func _Event_Event_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AgentEvent)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EventServer).Event(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/Event/Event",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EventServer).Event(ctx, req.(*AgentEvent))
}
return interceptor(ctx, in, info, handler)
}
var _Event_serviceDesc = grpc.ServiceDesc{
ServiceName: "Event",
HandlerType: (*EventServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "event",
Handler: _Event_Event_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "event.proto",
}
func init() { proto.RegisterFile("event.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
2017-05-20 09:44:08 +00:00
// 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, 0x96, 0x4c, 0xd9, 0x89,
0xf2, 0x6d, 0xcc, 0x1e, 0xa6, 0x21, 0x4d, 0x05, 0x27, 0xf1, 0x86, 0x64, 0xfb, 0xcd, 0x8e, 0x08,
0xfa, 0x40, 0x8a, 0x69, 0xc8, 0x92, 0x84, 0xa5, 0x79, 0xf3, 0x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