regenerate all proto (#1440)
* regenerate all proto Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * regenerate from proto Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * regenerate from proto Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: micro/go-micro/router/service/proto/router.proto
|
||||
// source: router/service/proto/router.proto
|
||||
|
||||
package go_micro_router
|
||||
package router
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
math "math"
|
||||
)
|
||||
|
||||
@@ -43,7 +47,7 @@ func (x AdvertType) String() string {
|
||||
}
|
||||
|
||||
func (AdvertType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{0}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{0}
|
||||
}
|
||||
|
||||
// EventType defines the type of event
|
||||
@@ -72,7 +76,7 @@ func (x EventType) String() string {
|
||||
}
|
||||
|
||||
func (EventType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{1}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{1}
|
||||
}
|
||||
|
||||
// Empty request
|
||||
@@ -86,7 +90,7 @@ func (m *Request) Reset() { *m = Request{} }
|
||||
func (m *Request) String() string { return proto.CompactTextString(m) }
|
||||
func (*Request) ProtoMessage() {}
|
||||
func (*Request) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{0}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{0}
|
||||
}
|
||||
|
||||
func (m *Request) XXX_Unmarshal(b []byte) error {
|
||||
@@ -118,7 +122,7 @@ func (m *Response) Reset() { *m = Response{} }
|
||||
func (m *Response) String() string { return proto.CompactTextString(m) }
|
||||
func (*Response) ProtoMessage() {}
|
||||
func (*Response) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{1}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{1}
|
||||
}
|
||||
|
||||
func (m *Response) XXX_Unmarshal(b []byte) error {
|
||||
@@ -151,7 +155,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_c2b04f200fb3e806, []int{2}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{2}
|
||||
}
|
||||
|
||||
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -191,7 +195,7 @@ func (m *LookupRequest) Reset() { *m = LookupRequest{} }
|
||||
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupRequest) ProtoMessage() {}
|
||||
func (*LookupRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{3}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{3}
|
||||
}
|
||||
|
||||
func (m *LookupRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -231,7 +235,7 @@ func (m *LookupResponse) Reset() { *m = LookupResponse{} }
|
||||
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LookupResponse) ProtoMessage() {}
|
||||
func (*LookupResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{4}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{4}
|
||||
}
|
||||
|
||||
func (m *LookupResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -271,7 +275,7 @@ func (m *QueryRequest) Reset() { *m = QueryRequest{} }
|
||||
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryRequest) ProtoMessage() {}
|
||||
func (*QueryRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{5}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{5}
|
||||
}
|
||||
|
||||
func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -311,7 +315,7 @@ func (m *QueryResponse) Reset() { *m = QueryResponse{} }
|
||||
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResponse) ProtoMessage() {}
|
||||
func (*QueryResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{6}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{6}
|
||||
}
|
||||
|
||||
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -350,7 +354,7 @@ func (m *WatchRequest) Reset() { *m = WatchRequest{} }
|
||||
func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*WatchRequest) ProtoMessage() {}
|
||||
func (*WatchRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{7}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{7}
|
||||
}
|
||||
|
||||
func (m *WatchRequest) XXX_Unmarshal(b []byte) error {
|
||||
@@ -392,7 +396,7 @@ func (m *Advert) Reset() { *m = Advert{} }
|
||||
func (m *Advert) String() string { return proto.CompactTextString(m) }
|
||||
func (*Advert) ProtoMessage() {}
|
||||
func (*Advert) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{8}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{8}
|
||||
}
|
||||
|
||||
func (m *Advert) XXX_Unmarshal(b []byte) error {
|
||||
@@ -459,7 +463,7 @@ func (m *ProcessResponse) Reset() { *m = ProcessResponse{} }
|
||||
func (m *ProcessResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProcessResponse) ProtoMessage() {}
|
||||
func (*ProcessResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{9}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{9}
|
||||
}
|
||||
|
||||
func (m *ProcessResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -491,7 +495,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_c2b04f200fb3e806, []int{10}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{10}
|
||||
}
|
||||
|
||||
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -523,7 +527,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_c2b04f200fb3e806, []int{11}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{11}
|
||||
}
|
||||
|
||||
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -555,7 +559,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_c2b04f200fb3e806, []int{12}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{12}
|
||||
}
|
||||
|
||||
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
|
||||
@@ -595,7 +599,7 @@ 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_c2b04f200fb3e806, []int{13}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{13}
|
||||
}
|
||||
|
||||
func (m *Event) XXX_Unmarshal(b []byte) error {
|
||||
@@ -661,7 +665,7 @@ func (m *Query) Reset() { *m = Query{} }
|
||||
func (m *Query) String() string { return proto.CompactTextString(m) }
|
||||
func (*Query) ProtoMessage() {}
|
||||
func (*Query) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{14}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{14}
|
||||
}
|
||||
|
||||
func (m *Query) XXX_Unmarshal(b []byte) error {
|
||||
@@ -728,7 +732,7 @@ func (m *Route) Reset() { *m = Route{} }
|
||||
func (m *Route) String() string { return proto.CompactTextString(m) }
|
||||
func (*Route) ProtoMessage() {}
|
||||
func (*Route) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c2b04f200fb3e806, []int{15}
|
||||
return fileDescriptor_3123ad01af3cc940, []int{15}
|
||||
}
|
||||
|
||||
func (m *Route) XXX_Unmarshal(b []byte) error {
|
||||
@@ -819,51 +823,510 @@ func init() {
|
||||
proto.RegisterType((*Route)(nil), "go.micro.router.Route")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("micro/go-micro/router/service/proto/router.proto", fileDescriptor_c2b04f200fb3e806)
|
||||
func init() { proto.RegisterFile("router/service/proto/router.proto", fileDescriptor_3123ad01af3cc940) }
|
||||
|
||||
var fileDescriptor_3123ad01af3cc940 = []byte{
|
||||
// 673 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x6e, 0xdb, 0x38,
|
||||
0x10, 0x96, 0x6c, 0x4b, 0x5e, 0xcd, 0x3a, 0x8e, 0x96, 0x87, 0xac, 0xe0, 0xdd, 0xa4, 0xae, 0x4e,
|
||||
0x41, 0x90, 0x4a, 0x85, 0x7b, 0x29, 0xfa, 0x9f, 0xa4, 0x2d, 0x0a, 0x34, 0x87, 0x56, 0x48, 0x50,
|
||||
0xa0, 0x37, 0x45, 0x1e, 0x38, 0x42, 0x6c, 0x51, 0x21, 0x69, 0x07, 0x7e, 0x8e, 0x3e, 0x43, 0x0f,
|
||||
0x3d, 0xf7, 0x91, 0xfa, 0x22, 0x85, 0x48, 0x2a, 0xb1, 0x2d, 0x2b, 0x68, 0x72, 0x12, 0xe7, 0xef,
|
||||
0x9b, 0xe1, 0xcc, 0x7c, 0x22, 0x3c, 0x64, 0x74, 0x2a, 0x90, 0x85, 0x1c, 0xd9, 0x2c, 0x4d, 0x30,
|
||||
0xcc, 0x19, 0x15, 0x34, 0x54, 0xca, 0x40, 0x0a, 0x64, 0x73, 0x44, 0x83, 0x49, 0x9a, 0x30, 0x1a,
|
||||
0x28, 0xb5, 0xef, 0x40, 0x3b, 0xc2, 0xcb, 0x29, 0x72, 0xe1, 0x03, 0xfc, 0x15, 0x21, 0xcf, 0x69,
|
||||
0xc6, 0xd1, 0x7f, 0x05, 0x9d, 0xe3, 0x94, 0x8b, 0x52, 0x26, 0x01, 0xd8, 0x32, 0x80, 0x7b, 0x66,
|
||||
0xbf, 0xb9, 0xfb, 0xf7, 0x60, 0x2b, 0x58, 0x01, 0x0a, 0xa2, 0xe2, 0x13, 0x69, 0x2f, 0xff, 0x25,
|
||||
0x6c, 0x1c, 0x53, 0x7a, 0x31, 0xcd, 0x35, 0x38, 0xd9, 0x07, 0xeb, 0x72, 0x8a, 0x6c, 0xee, 0x99,
|
||||
0x7d, 0x73, 0x6d, 0xfc, 0xe7, 0xc2, 0x1a, 0x29, 0x27, 0xff, 0x0d, 0x74, 0xcb, 0xf0, 0x7b, 0x16,
|
||||
0xf0, 0x02, 0x3a, 0x0a, 0xf1, 0x5e, 0xf9, 0x5f, 0xc3, 0x86, 0x8e, 0xbe, 0x67, 0xfa, 0x2e, 0x74,
|
||||
0xbe, 0xc4, 0x22, 0x39, 0x2f, 0x7b, 0xfb, 0xc3, 0x04, 0xfb, 0x60, 0x38, 0x43, 0x26, 0x48, 0x17,
|
||||
0x1a, 0xe9, 0x50, 0x96, 0xe1, 0x44, 0x8d, 0x74, 0x48, 0x42, 0x68, 0x89, 0x79, 0x8e, 0x5e, 0xa3,
|
||||
0x6f, 0xee, 0x76, 0x07, 0xff, 0x55, 0x80, 0x55, 0xd8, 0xc9, 0x3c, 0xc7, 0x48, 0x3a, 0x92, 0xff,
|
||||
0xc1, 0x11, 0xe9, 0x04, 0xb9, 0x88, 0x27, 0xb9, 0xd7, 0xec, 0x9b, 0xbb, 0xcd, 0xe8, 0x46, 0x41,
|
||||
0x5c, 0x68, 0x0a, 0x31, 0xf6, 0x5a, 0x52, 0x5f, 0x1c, 0x8b, 0xda, 0x71, 0x86, 0x99, 0xe0, 0x9e,
|
||||
0x55, 0x53, 0xfb, 0xbb, 0xc2, 0x1c, 0x69, 0x2f, 0xff, 0x1f, 0xd8, 0xfc, 0xc4, 0x68, 0x82, 0x9c,
|
||||
0x5f, 0xaf, 0x83, 0x0b, 0xdd, 0x23, 0x86, 0xb1, 0xc0, 0x45, 0xcd, 0x5b, 0x1c, 0xe3, 0xb2, 0xe6,
|
||||
0x34, 0x1f, 0x2e, 0xfa, 0x7c, 0x33, 0xc1, 0x92, 0xd0, 0x95, 0x3b, 0x07, 0x4b, 0x77, 0xee, 0xad,
|
||||
0x2f, 0xe8, 0x8f, 0xaf, 0xbc, 0x0f, 0x96, 0x8c, 0x93, 0x97, 0xae, 0x9f, 0x8d, 0x72, 0xf2, 0x4f,
|
||||
0xc1, 0x92, 0xb3, 0x25, 0x1e, 0xb4, 0x35, 0x53, 0x74, 0x65, 0xa5, 0x58, 0x58, 0x46, 0xb1, 0xc0,
|
||||
0xab, 0x78, 0x2e, 0x2b, 0x74, 0xa2, 0x52, 0x2c, 0x2c, 0x19, 0x8a, 0x2b, 0xca, 0x2e, 0x64, 0x19,
|
||||
0x4e, 0x54, 0x8a, 0xfe, 0x4f, 0x13, 0x2c, 0x99, 0xe7, 0x76, 0xdc, 0x78, 0x38, 0x64, 0xc8, 0x79,
|
||||
0x89, 0xab, 0xc5, 0xc5, 0x8c, 0xcd, 0xda, 0x8c, 0xad, 0xa5, 0x8c, 0x64, 0x4b, 0xef, 0x24, 0xf3,
|
||||
0x2c, 0x69, 0xd0, 0x12, 0x21, 0xd0, 0x1a, 0xa7, 0xd9, 0x85, 0x67, 0x4b, 0xad, 0x3c, 0x17, 0xbe,
|
||||
0x13, 0x14, 0x2c, 0x4d, 0xbc, 0xb6, 0xec, 0x9e, 0x96, 0xf6, 0x06, 0x00, 0x37, 0xfb, 0x45, 0x08,
|
||||
0x74, 0x95, 0x74, 0x90, 0x65, 0x74, 0x9a, 0x25, 0xe8, 0x1a, 0xc4, 0x85, 0x8e, 0xd2, 0xa9, 0xe1,
|
||||
0xba, 0xe6, 0x5e, 0x08, 0xce, 0xf5, 0x7c, 0x08, 0x80, 0xad, 0x36, 0xc3, 0x35, 0x8a, 0xb3, 0xda,
|
||||
0x09, 0xd7, 0x2c, 0xce, 0x3a, 0xa0, 0x31, 0xf8, 0xde, 0x00, 0x3b, 0x52, 0xb5, 0x7d, 0x04, 0x5b,
|
||||
0x11, 0x9b, 0xec, 0x54, 0xa6, 0xb4, 0xf4, 0xc3, 0xe8, 0x3d, 0xa8, 0xb5, 0xeb, 0xed, 0x32, 0xc8,
|
||||
0x21, 0x58, 0x92, 0x64, 0x64, 0xbb, 0xe2, 0xbb, 0x48, 0xbe, 0x5e, 0xcd, 0xc2, 0xfb, 0xc6, 0x63,
|
||||
0x93, 0x1c, 0x82, 0xa3, 0xae, 0x97, 0x72, 0x24, 0x5e, 0x75, 0x73, 0x34, 0xc4, 0xbf, 0x35, 0xb4,
|
||||
0x94, 0x18, 0xef, 0xa1, 0xad, 0x09, 0x43, 0xea, 0xfc, 0x7a, 0xfd, 0x8a, 0x61, 0x95, 0x63, 0xc6,
|
||||
0xe0, 0x57, 0x03, 0xac, 0x93, 0xf8, 0x6c, 0x8c, 0xe4, 0xa8, 0xec, 0x2a, 0xa9, 0x59, 0xe6, 0x35,
|
||||
0xed, 0x59, 0x21, 0xa8, 0x51, 0x80, 0xa8, 0x71, 0xdc, 0x01, 0x64, 0x85, 0xd3, 0x12, 0x44, 0xcd,
|
||||
0xf1, 0x0e, 0x20, 0x2b, 0xbf, 0x01, 0x83, 0x1c, 0x40, 0xab, 0x78, 0x4d, 0x6e, 0xe9, 0x6f, 0x75,
|
||||
0x82, 0x8b, 0xcf, 0x8f, 0x6f, 0x90, 0x0f, 0x25, 0x6b, 0xb7, 0x6b, 0xfe, 0xdc, 0x1a, 0x68, 0xa7,
|
||||
0xce, 0x5c, 0x22, 0x1d, 0x3e, 0xfb, 0xfa, 0x74, 0x94, 0x8a, 0xf3, 0xe9, 0x59, 0x90, 0xd0, 0x49,
|
||||
0x28, 0x5d, 0xc3, 0x11, 0x7d, 0xa4, 0x0e, 0xb3, 0x41, 0xb8, 0xee, 0x11, 0x7d, 0xae, 0x94, 0x67,
|
||||
0xb6, 0x94, 0x9e, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x14, 0x01, 0x1d, 0x6a, 0x07, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
var fileDescriptor_c2b04f200fb3e806 = []byte{
|
||||
// 645 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x4e, 0xdb, 0x40,
|
||||
0x10, 0xb6, 0x93, 0xd8, 0xa9, 0xa7, 0x21, 0xb8, 0x73, 0xa0, 0x56, 0x5a, 0x68, 0xe4, 0x13, 0x42,
|
||||
0xd4, 0x41, 0xe9, 0xb5, 0x7f, 0x40, 0x5b, 0x55, 0x2a, 0x87, 0xd6, 0x02, 0xf5, 0x6c, 0x92, 0x11,
|
||||
0xb5, 0x48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d6, 0x2c, 0xf3, 0x2d, 0xed,
|
||||
0x59, 0x21, 0xa8, 0x25, 0x41, 0xf4, 0x38, 0xee, 0x01, 0xb2, 0xc2, 0x69, 0x05, 0xa2, 0xe7, 0x78,
|
||||
0x0f, 0x90, 0x95, 0xdf, 0x80, 0x85, 0xfb, 0xd0, 0x92, 0xaf, 0xc9, 0x1d, 0xfd, 0xad, 0x4e, 0x70,
|
||||
0xf1, 0xf9, 0x09, 0x2d, 0xfc, 0x5c, 0xb2, 0x76, 0xb3, 0xe6, 0xcf, 0x6d, 0x80, 0xb6, 0xea, 0xcc,
|
||||
0x25, 0xd2, 0xa9, 0xab, 0x5e, 0xc2, 0x57, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x5a, 0x08, 0x7e,
|
||||
0xf4, 0x3d, 0x07, 0x00, 0x00,
|
||||
// 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
|
||||
|
||||
// RouterClient is the client API for Router service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RouterClient interface {
|
||||
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
|
||||
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error)
|
||||
Advertise(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error)
|
||||
Process(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error)
|
||||
}
|
||||
|
||||
type routerClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewRouterClient(cc *grpc.ClientConn) RouterClient {
|
||||
return &routerClient{cc}
|
||||
}
|
||||
|
||||
func (c *routerClient) Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) {
|
||||
out := new(LookupResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Router/Lookup", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[0], "/go.micro.router.Router/Watch", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerWatchClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_WatchClient interface {
|
||||
Recv() (*Event, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerWatchClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerWatchClient) Recv() (*Event, error) {
|
||||
m := new(Event)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) Advertise(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[1], "/go.micro.router.Router/Advertise", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &routerAdvertiseClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Router_AdvertiseClient interface {
|
||||
Recv() (*Advert, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type routerAdvertiseClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *routerAdvertiseClient) Recv() (*Advert, error) {
|
||||
m := new(Advert)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *routerClient) Process(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error) {
|
||||
out := new(ProcessResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Router/Process", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RouterServer is the server API for Router service.
|
||||
type RouterServer interface {
|
||||
Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
|
||||
Watch(*WatchRequest, Router_WatchServer) error
|
||||
Advertise(*Request, Router_AdvertiseServer) error
|
||||
Process(context.Context, *Advert) (*ProcessResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRouterServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRouterServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRouterServer) Lookup(ctx context.Context, req *LookupRequest) (*LookupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Lookup not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) Watch(req *WatchRequest, srv Router_WatchServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Watch not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) Advertise(req *Request, srv Router_AdvertiseServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Advertise not implemented")
|
||||
}
|
||||
func (*UnimplementedRouterServer) Process(ctx context.Context, req *Advert) (*ProcessResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Process not implemented")
|
||||
}
|
||||
|
||||
func RegisterRouterServer(s *grpc.Server, srv RouterServer) {
|
||||
s.RegisterService(&_Router_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Router_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LookupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).Lookup(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Router/Lookup",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).Lookup(ctx, req.(*LookupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Router_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(WatchRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).Watch(m, &routerWatchServer{stream})
|
||||
}
|
||||
|
||||
type Router_WatchServer interface {
|
||||
Send(*Event) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerWatchServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerWatchServer) Send(m *Event) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_Advertise_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(Request)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RouterServer).Advertise(m, &routerAdvertiseServer{stream})
|
||||
}
|
||||
|
||||
type Router_AdvertiseServer interface {
|
||||
Send(*Advert) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type routerAdvertiseServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *routerAdvertiseServer) Send(m *Advert) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Router_Process_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Advert)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RouterServer).Process(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Router/Process",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RouterServer).Process(ctx, req.(*Advert))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Router_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "go.micro.router.Router",
|
||||
HandlerType: (*RouterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Lookup",
|
||||
Handler: _Router_Lookup_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Process",
|
||||
Handler: _Router_Process_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Watch",
|
||||
Handler: _Router_Watch_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "Advertise",
|
||||
Handler: _Router_Advertise_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "router/service/proto/router.proto",
|
||||
}
|
||||
|
||||
// TableClient is the client API for Table service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type TableClient interface {
|
||||
Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error)
|
||||
Delete(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error)
|
||||
Update(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error)
|
||||
List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error)
|
||||
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
||||
}
|
||||
|
||||
type tableClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewTableClient(cc *grpc.ClientConn) TableClient {
|
||||
return &tableClient{cc}
|
||||
}
|
||||
|
||||
func (c *tableClient) Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error) {
|
||||
out := new(CreateResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Create", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tableClient) Delete(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
||||
out := new(DeleteResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Delete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tableClient) Update(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error) {
|
||||
out := new(UpdateResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Update", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tableClient) List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error) {
|
||||
out := new(ListResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Table/List", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *tableClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
||||
out := new(QueryResponse)
|
||||
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Query", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// TableServer is the server API for Table service.
|
||||
type TableServer interface {
|
||||
Create(context.Context, *Route) (*CreateResponse, error)
|
||||
Delete(context.Context, *Route) (*DeleteResponse, error)
|
||||
Update(context.Context, *Route) (*UpdateResponse, error)
|
||||
List(context.Context, *Request) (*ListResponse, error)
|
||||
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedTableServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedTableServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedTableServer) Create(ctx context.Context, req *Route) (*CreateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||
}
|
||||
func (*UnimplementedTableServer) Delete(ctx context.Context, req *Route) (*DeleteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
func (*UnimplementedTableServer) Update(ctx context.Context, req *Route) (*UpdateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||
}
|
||||
func (*UnimplementedTableServer) List(ctx context.Context, req *Request) (*ListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||
}
|
||||
func (*UnimplementedTableServer) Query(ctx context.Context, req *QueryRequest) (*QueryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
|
||||
}
|
||||
|
||||
func RegisterTableServer(s *grpc.Server, srv TableServer) {
|
||||
s.RegisterService(&_Table_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Table_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Route)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TableServer).Create(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Table/Create",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TableServer).Create(ctx, req.(*Route))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Table_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Route)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TableServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Table/Delete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TableServer).Delete(ctx, req.(*Route))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Table_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Route)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TableServer).Update(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Table/Update",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TableServer).Update(ctx, req.(*Route))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Table_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Request)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TableServer).List(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Table/List",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TableServer).List(ctx, req.(*Request))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Table_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(TableServer).Query(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/go.micro.router.Table/Query",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(TableServer).Query(ctx, req.(*QueryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Table_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "go.micro.router.Table",
|
||||
HandlerType: (*TableServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Create",
|
||||
Handler: _Table_Create_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _Table_Delete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Update",
|
||||
Handler: _Table_Update_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "List",
|
||||
Handler: _Table_List_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Query",
|
||||
Handler: _Table_Query_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "router/service/proto/router.proto",
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: micro/go-micro/router/service/proto/router.proto
|
||||
// source: router/service/proto/router.proto
|
||||
|
||||
package go_micro_router
|
||||
package router
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
@@ -46,12 +46,6 @@ type routerService struct {
|
||||
}
|
||||
|
||||
func NewRouterService(name string, c client.Client) RouterService {
|
||||
if c == nil {
|
||||
c = client.NewClient()
|
||||
}
|
||||
if len(name) == 0 {
|
||||
name = "go.micro.router"
|
||||
}
|
||||
return &routerService{
|
||||
c: c,
|
||||
name: name,
|
||||
@@ -81,6 +75,7 @@ func (c *routerService) Watch(ctx context.Context, in *WatchRequest, opts ...cli
|
||||
}
|
||||
|
||||
type Router_WatchService interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
Close() error
|
||||
@@ -95,6 +90,10 @@ func (x *routerServiceWatch) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *routerServiceWatch) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *routerServiceWatch) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
@@ -125,6 +124,7 @@ func (c *routerService) Advertise(ctx context.Context, in *Request, opts ...clie
|
||||
}
|
||||
|
||||
type Router_AdvertiseService interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
Close() error
|
||||
@@ -139,6 +139,10 @@ func (x *routerServiceAdvertise) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *routerServiceAdvertise) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *routerServiceAdvertise) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
@@ -206,6 +210,7 @@ func (h *routerHandler) Watch(ctx context.Context, stream server.Stream) error {
|
||||
}
|
||||
|
||||
type Router_WatchStream interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
Close() error
|
||||
@@ -220,6 +225,10 @@ func (x *routerWatchStream) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *routerWatchStream) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *routerWatchStream) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
@@ -241,6 +250,7 @@ func (h *routerHandler) Advertise(ctx context.Context, stream server.Stream) err
|
||||
}
|
||||
|
||||
type Router_AdvertiseStream interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
Close() error
|
||||
@@ -255,6 +265,10 @@ func (x *routerAdvertiseStream) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *routerAdvertiseStream) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *routerAdvertiseStream) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
@@ -287,12 +301,6 @@ type tableService struct {
|
||||
}
|
||||
|
||||
func NewTableService(name string, c client.Client) TableService {
|
||||
if c == nil {
|
||||
c = client.NewClient()
|
||||
}
|
||||
if len(name) == 0 {
|
||||
name = "go.micro.router"
|
||||
}
|
||||
return &tableService{
|
||||
c: c,
|
||||
name: name,
|
||||
|
@@ -2,20 +2,21 @@ syntax = "proto3";
|
||||
|
||||
package go.micro.router;
|
||||
|
||||
option go_package = "github.com/micro/go-micro/v2/router/service/proto;router";
|
||||
// Router service is used by the proxy to lookup routes
|
||||
service Router {
|
||||
rpc Lookup(LookupRequest) returns (LookupResponse) {};
|
||||
rpc Watch(WatchRequest) returns (stream Event) {};
|
||||
rpc Advertise(Request) returns (stream Advert) {};
|
||||
rpc Process(Advert) returns (ProcessResponse) {};
|
||||
rpc Lookup(LookupRequest) returns (LookupResponse) {};
|
||||
rpc Watch(WatchRequest) returns (stream Event) {};
|
||||
rpc Advertise(Request) returns (stream Advert) {};
|
||||
rpc Process(Advert) returns (ProcessResponse) {};
|
||||
}
|
||||
|
||||
service Table {
|
||||
rpc Create(Route) returns (CreateResponse) {};
|
||||
rpc Delete(Route) returns (DeleteResponse) {};
|
||||
rpc Update(Route) returns (UpdateResponse) {};
|
||||
rpc List(Request) returns (ListResponse) {};
|
||||
rpc Query(QueryRequest) returns (QueryResponse) {};
|
||||
rpc Create(Route) returns (CreateResponse) {};
|
||||
rpc Delete(Route) returns (DeleteResponse) {};
|
||||
rpc Update(Route) returns (UpdateResponse) {};
|
||||
rpc List(Request) returns (ListResponse) {};
|
||||
rpc Query(QueryRequest) returns (QueryResponse) {};
|
||||
}
|
||||
|
||||
// Empty request
|
||||
@@ -26,27 +27,27 @@ message Response {}
|
||||
|
||||
// ListResponse is returned by List
|
||||
message ListResponse {
|
||||
repeated Route routes = 1;
|
||||
repeated Route routes = 1;
|
||||
}
|
||||
|
||||
// LookupRequest is made to Lookup
|
||||
message LookupRequest {
|
||||
Query query = 1;
|
||||
Query query = 1;
|
||||
}
|
||||
|
||||
// LookupResponse is returned by Lookup
|
||||
message LookupResponse {
|
||||
repeated Route routes = 1;
|
||||
repeated Route routes = 1;
|
||||
}
|
||||
|
||||
// QueryRequest queries Table for Routes
|
||||
message QueryRequest{
|
||||
Query query = 1;
|
||||
Query query = 1;
|
||||
}
|
||||
|
||||
// QueryResponse is returned by Query
|
||||
message QueryResponse {
|
||||
repeated Route routes = 1;
|
||||
repeated Route routes = 1;
|
||||
}
|
||||
|
||||
// WatchRequest is made to Watch Router
|
||||
@@ -54,22 +55,22 @@ message WatchRequest {}
|
||||
|
||||
// AdvertType defines the type of advert
|
||||
enum AdvertType {
|
||||
AdvertAnnounce = 0;
|
||||
AdvertUpdate = 1;
|
||||
AdvertAnnounce = 0;
|
||||
AdvertUpdate = 1;
|
||||
}
|
||||
|
||||
// Advert is router advertsement streamed by Watch
|
||||
message Advert {
|
||||
// id of the advertising router
|
||||
string id = 1;
|
||||
// type of advertisement
|
||||
AdvertType type = 2;
|
||||
// unix timestamp of the advertisement
|
||||
int64 timestamp = 3;
|
||||
// TTL of the Advert
|
||||
int64 ttl = 4;
|
||||
// events is a list of advertised events
|
||||
repeated Event events = 5;
|
||||
// id of the advertising router
|
||||
string id = 1;
|
||||
// type of advertisement
|
||||
AdvertType type = 2;
|
||||
// unix timestamp of the advertisement
|
||||
int64 timestamp = 3;
|
||||
// TTL of the Advert
|
||||
int64 ttl = 4;
|
||||
// events is a list of advertised events
|
||||
repeated Event events = 5;
|
||||
}
|
||||
|
||||
// ProcessResponse is returned by Process
|
||||
@@ -86,47 +87,47 @@ message UpdateResponse {}
|
||||
|
||||
// EventType defines the type of event
|
||||
enum EventType {
|
||||
Create = 0;
|
||||
Delete = 1;
|
||||
Update = 2;
|
||||
Create = 0;
|
||||
Delete = 1;
|
||||
Update = 2;
|
||||
}
|
||||
|
||||
// Event is routing table event
|
||||
message Event {
|
||||
// the unique event id
|
||||
string id = 1;
|
||||
// type of event
|
||||
EventType type = 2;
|
||||
// unix timestamp of event
|
||||
int64 timestamp = 3;
|
||||
// service route
|
||||
Route route = 4;
|
||||
// the unique event id
|
||||
string id = 1;
|
||||
// type of event
|
||||
EventType type = 2;
|
||||
// unix timestamp of event
|
||||
int64 timestamp = 3;
|
||||
// service route
|
||||
Route route = 4;
|
||||
}
|
||||
|
||||
// Query is passed in a LookupRequest
|
||||
message Query {
|
||||
// service to lookup
|
||||
string service = 1;
|
||||
// gateway to lookup
|
||||
string gateway = 2;
|
||||
// network to lookup
|
||||
string network = 3;
|
||||
// service to lookup
|
||||
string service = 1;
|
||||
// gateway to lookup
|
||||
string gateway = 2;
|
||||
// network to lookup
|
||||
string network = 3;
|
||||
}
|
||||
|
||||
// Route is a service route
|
||||
message Route {
|
||||
// service for the route
|
||||
string service = 1;
|
||||
// the address that advertise this route
|
||||
string address = 2;
|
||||
// gateway as the next hop
|
||||
string gateway = 3;
|
||||
// the network for this destination
|
||||
string network = 4;
|
||||
// router if the router id
|
||||
string router = 5;
|
||||
// the network link
|
||||
string link = 6;
|
||||
// the metric / score of this route
|
||||
int64 metric = 7;
|
||||
// service for the route
|
||||
string service = 1;
|
||||
// the address that advertise this route
|
||||
string address = 2;
|
||||
// gateway as the next hop
|
||||
string gateway = 3;
|
||||
// the network for this destination
|
||||
string network = 4;
|
||||
// router if the router id
|
||||
string router = 5;
|
||||
// the network link
|
||||
string link = 6;
|
||||
// the metric / score of this route
|
||||
int64 metric = 7;
|
||||
}
|
||||
|
Reference in New Issue
Block a user