635 lines
22 KiB
Go
635 lines
22 KiB
Go
// 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
|
|
DiscoveryEvent
|
|
TaskResultEvent
|
|
AgentEvent
|
|
*/
|
|
package event
|
|
|
|
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 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 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 (
|
|
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))
|
|
}
|
|
func (AgentEvent_AgentEventType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
|
|
|
|
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} }
|
|
|
|
// 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"`
|
|
}
|
|
|
|
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 (m *TaskResultEvent) GetAgentId() string {
|
|
if m != nil {
|
|
return m.AgentId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TaskResultEvent) GetTaskId() string {
|
|
if m != nil {
|
|
return m.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TaskResultEvent) GetEvtType() TaskResultEvent_TaskResultEventType {
|
|
if m != nil {
|
|
return m.EvtType
|
|
}
|
|
return TaskResultEvent_TASK_POL_INTERVAL_UPDATE
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
func (m *TaskResultEvent) GetDescription() string {
|
|
if m != nil {
|
|
return m.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
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() {}
|
|
func (*AgentEvent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
|
|
|
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() {}
|
|
func (*AgentEvent_ErrorInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} }
|
|
|
|
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((*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)
|
|
}
|
|
|
|
// 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 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 {
|
|
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{
|
|
// 719 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x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