add event proto for runtiem

This commit is contained in:
Asim Aslam 2019-12-17 18:17:32 +00:00
parent c2d59c1f4d
commit c61e12d5ee
2 changed files with 117 additions and 44 deletions

View File

@ -87,6 +87,69 @@ func (m *Service) GetMetadata() map[string]string {
return nil
}
type Event struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Service string `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"`
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Event) Reset() { *m = Event{} }
func (m *Event) String() string { return proto.CompactTextString(m) }
func (*Event) ProtoMessage() {}
func (*Event) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{1}
}
func (m *Event) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Event.Unmarshal(m, b)
}
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Event.Marshal(b, m, deterministic)
}
func (m *Event) XXX_Merge(src proto.Message) {
xxx_messageInfo_Event.Merge(m, src)
}
func (m *Event) XXX_Size() int {
return xxx_messageInfo_Event.Size(m)
}
func (m *Event) XXX_DiscardUnknown() {
xxx_messageInfo_Event.DiscardUnknown(m)
}
var xxx_messageInfo_Event proto.InternalMessageInfo
func (m *Event) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *Event) GetTimestamp() int64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *Event) GetService() string {
if m != nil {
return m.Service
}
return ""
}
func (m *Event) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
type CreateOptions struct {
// command to pass in
Command []string `protobuf:"bytes,1,rep,name=command,proto3" json:"command,omitempty"`
@ -103,7 +166,7 @@ func (m *CreateOptions) Reset() { *m = CreateOptions{} }
func (m *CreateOptions) String() string { return proto.CompactTextString(m) }
func (*CreateOptions) ProtoMessage() {}
func (*CreateOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{1}
return fileDescriptor_4bc91a8efec81434, []int{2}
}
func (m *CreateOptions) XXX_Unmarshal(b []byte) error {
@ -157,7 +220,7 @@ func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{2}
return fileDescriptor_4bc91a8efec81434, []int{3}
}
func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
@ -202,7 +265,7 @@ func (m *CreateResponse) Reset() { *m = CreateResponse{} }
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
func (*CreateResponse) ProtoMessage() {}
func (*CreateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{3}
return fileDescriptor_4bc91a8efec81434, []int{4}
}
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
@ -239,7 +302,7 @@ func (m *ReadOptions) Reset() { *m = ReadOptions{} }
func (m *ReadOptions) String() string { return proto.CompactTextString(m) }
func (*ReadOptions) ProtoMessage() {}
func (*ReadOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{4}
return fileDescriptor_4bc91a8efec81434, []int{5}
}
func (m *ReadOptions) XXX_Unmarshal(b []byte) error {
@ -292,7 +355,7 @@ func (m *ReadRequest) Reset() { *m = ReadRequest{} }
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
func (*ReadRequest) ProtoMessage() {}
func (*ReadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{5}
return fileDescriptor_4bc91a8efec81434, []int{6}
}
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
@ -331,7 +394,7 @@ func (m *ReadResponse) Reset() { *m = ReadResponse{} }
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResponse) ProtoMessage() {}
func (*ReadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{6}
return fileDescriptor_4bc91a8efec81434, []int{7}
}
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
@ -370,7 +433,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{7}
return fileDescriptor_4bc91a8efec81434, []int{8}
}
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
@ -408,7 +471,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteResponse) ProtoMessage() {}
func (*DeleteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{8}
return fileDescriptor_4bc91a8efec81434, []int{9}
}
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
@ -440,7 +503,7 @@ func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
func (m *UpdateRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateRequest) ProtoMessage() {}
func (*UpdateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{9}
return fileDescriptor_4bc91a8efec81434, []int{10}
}
func (m *UpdateRequest) XXX_Unmarshal(b []byte) error {
@ -478,7 +541,7 @@ func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
func (m *UpdateResponse) String() string { return proto.CompactTextString(m) }
func (*UpdateResponse) ProtoMessage() {}
func (*UpdateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{10}
return fileDescriptor_4bc91a8efec81434, []int{11}
}
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
@ -509,7 +572,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
func (m *ListRequest) String() string { return proto.CompactTextString(m) }
func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{11}
return fileDescriptor_4bc91a8efec81434, []int{12}
}
func (m *ListRequest) XXX_Unmarshal(b []byte) error {
@ -541,7 +604,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{12}
return fileDescriptor_4bc91a8efec81434, []int{13}
}
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
@ -572,6 +635,7 @@ func (m *ListResponse) GetServices() []*Service {
func init() {
proto.RegisterType((*Service)(nil), "go.micro.runtime.Service")
proto.RegisterMapType((map[string]string)(nil), "go.micro.runtime.Service.MetadataEntry")
proto.RegisterType((*Event)(nil), "go.micro.runtime.Event")
proto.RegisterType((*CreateOptions)(nil), "go.micro.runtime.CreateOptions")
proto.RegisterType((*CreateRequest)(nil), "go.micro.runtime.CreateRequest")
proto.RegisterType((*CreateResponse)(nil), "go.micro.runtime.CreateResponse")
@ -591,36 +655,38 @@ func init() {
}
var fileDescriptor_4bc91a8efec81434 = []byte{
// 492 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xae, 0xe3, 0x10, 0xb7, 0x63, 0x8c, 0xa2, 0x15, 0x42, 0xa6, 0x12, 0x10, 0xf9, 0x42, 0x2f,
0x38, 0x92, 0x2b, 0xc4, 0xdf, 0xb1, 0x29, 0x5c, 0x88, 0x90, 0x5c, 0xf5, 0x01, 0x96, 0x64, 0x54,
0x59, 0xd4, 0x5e, 0xb3, 0xbb, 0x8e, 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, 0xc6, 0x2a, 0x27, 0x32, 0x90, 0xab, 0x83, 0x7a, 0x3d, 0x74,
0xbd, 0x03, 0x5a, 0xc2, 0xc4, 0x78, 0xdc, 0xc7, 0xab, 0x93, 0x61, 0x1f, 0xaf, 0x83, 0x78, 0x34,
0x9c, 0xb1, 0xb6, 0x0f, 0xae, 0x13, 0x5d, 0x1f, 0xdc, 0x41, 0x2a, 0x5a, 0xa6, 0x0a, 0xa2, 0x4f,
0x66, 0x2b, 0xaf, 0x3e, 0x99, 0xed, 0xfc, 0x92, 0x93, 0x9f, 0x13, 0xfd, 0x2f, 0xbd, 0xfc, 0x1f,
0x00, 0x00, 0xff, 0xff, 0x14, 0x09, 0x5e, 0x98, 0x81, 0x05, 0x00, 0x00,
// 526 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4b, 0x6b, 0xdb, 0x40,
0x10, 0x8e, 0x2d, 0xc7, 0x4e, 0x46, 0x55, 0x31, 0x4b, 0x29, 0x6a, 0xe8, 0xc3, 0xe8, 0xd2, 0x5c,
0x2a, 0x83, 0x42, 0xe9, 0xeb, 0x18, 0xbb, 0xbd, 0xd4, 0x14, 0x14, 0xf2, 0x03, 0xb6, 0xf6, 0x10,
0x44, 0x23, 0xad, 0xaa, 0x5d, 0x09, 0x7c, 0xea, 0xb5, 0x7f, 0xaf, 0xff, 0xa8, 0xec, 0x4b, 0x0f,
0x47, 0xca, 0xc5, 0xb7, 0x99, 0xd9, 0xd9, 0x4f, 0xdf, 0x63, 0x11, 0x44, 0x69, 0xb2, 0x2d, 0xd8,
0xf2, 0x8e, 0xbd, 0xd3, 0x45, 0x51, 0x66, 0x22, 0x49, 0x71, 0xc9, 0xb1, 0xa8, 0x92, 0x2d, 0x2e,
0xf3, 0x82, 0x89, 0x7a, 0x1a, 0xaa, 0x8e, 0xcc, 0xef, 0x58, 0xa8, 0xb6, 0x43, 0x33, 0x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
0x8f, 0x82, 0xd3, 0xd6, 0xf6, 0xc1, 0x75, 0xa2, 0xeb, 0x83, 0x3b, 0x48, 0x45, 0xc9, 0x94, 0x41,
0xf4, 0xc9, 0x6c, 0xe5, 0xd5, 0x27, 0xb3, 0x9d, 0x5f, 0x70, 0xf2, 0x73, 0xaa, 0x7e, 0xdd, 0x57,
0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x8e, 0xbb, 0xe1, 0xf0, 0x05, 0x00, 0x00,
}

View File

@ -21,6 +21,13 @@ message Service {
map<string,string> metadata = 4;
}
message Event {
string type = 1;
int64 timestamp = 2;
string service = 3;
string version = 4;
}
message CreateOptions {
// command to pass in
repeated string command = 1;