frontlas: add basic frontlas logic

This commit is contained in:
singchia
2024-03-28 22:59:05 +08:00
parent 07903dec23
commit f0900c43e9
16 changed files with 711 additions and 132 deletions

View File

@@ -454,9 +454,9 @@ type ListEdgesRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Cursor *uint32 `protobuf:"varint,1,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"`
Count *uint32 `protobuf:"varint,2,opt,name=count,proto3,oneof" json:"count,omitempty"`
EdgeIds *uint64 `protobuf:"varint,3,opt,name=edge_ids,json=edgeIds,proto3,oneof" json:"edge_ids,omitempty"`
Cursor *uint32 `protobuf:"varint,1,opt,name=cursor,proto3,oneof" json:"cursor,omitempty"`
Count *uint32 `protobuf:"varint,2,opt,name=count,proto3,oneof" json:"count,omitempty"`
EdgeIds []uint64 `protobuf:"varint,3,rep,packed,name=edge_ids,json=edgeIds,proto3" json:"edge_ids,omitempty"`
}
func (x *ListEdgesRequest) Reset() {
@@ -505,11 +505,11 @@ func (x *ListEdgesRequest) GetCount() uint32 {
return 0
}
func (x *ListEdgesRequest) GetEdgeIds() uint64 {
if x != nil && x.EdgeIds != nil {
return *x.EdgeIds
func (x *ListEdgesRequest) GetEdgeIds() []uint64 {
if x != nil {
return x.EdgeIds
}
return 0
return nil
}
type ListEdgesResponse struct {
@@ -1104,129 +1104,128 @@ var file_cluster_proto_rawDesc = []byte{
0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6e,
0x74, 0x69, 0x65, 0x72, 0x52, 0x09, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x42,
0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4c,
0x69, 0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x1b, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48,
0x00, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1e, 0x0a, 0x08, 0x65, 0x64, 0x67, 0x65, 0x5f,
0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x02, 0x52, 0x07, 0x65, 0x64, 0x67,
0x65, 0x49, 0x64, 0x73, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73,
0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x0a, 0x09,
0x5f, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73,
0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b,
0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x7a, 0x0a, 0x10, 0x4c, 0x69,
0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00,
0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x05, 0x65,
0x64, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05,
0x65, 0x64, 0x67, 0x65, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72,
0x22, 0x2d, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x22,
0x3d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x65, 0x64, 0x67, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c,
0x61, 0x6e, 0x65, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x04, 0x65, 0x64, 0x67, 0x65, 0x22, 0x16,
0x0a, 0x14, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67,
0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a,
0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52,
0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x49, 0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f,
0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x14, 0x4c,
0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01,
0x12, 0x31, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x36,
0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x2f, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x18,
0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xdb,
0x07, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65,
0x72, 0x42, 0x79, 0x45, 0x64, 0x67, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69,
0x65, 0x72, 0x42, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x42, 0x79, 0x45, 0x64,
0x67, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76,
0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x12, 0x77, 0x0a, 0x0d, 0x4c, 0x69,
0x73, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46,
0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69,
0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73,
0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x63, 0x6c, 0x75, 0x73,
0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x0b,
0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x20, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64,
0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74,
0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x12, 0x79, 0x0a, 0x0d, 0x47, 0x65,
0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64,
0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47,
0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x2f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x73, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70,
0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69,
0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64,
0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x42, 0x08, 0x0a, 0x06,
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x64,
0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x63,
0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x63,
0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67,
0x65, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x2d, 0x0a,
0x12, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x65, 0x64, 0x67, 0x65, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x13,
0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x65, 0x64, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x2e, 0x45, 0x64, 0x67, 0x65, 0x52, 0x04, 0x65, 0x64, 0x67, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x47,
0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x2d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x43,
0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75,
0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75,
0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x88,
0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x49, 0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x42, 0x08,
0x0a, 0x06, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x1b, 0x0a, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x31, 0x0a,
0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x42, 0x09, 0x0a, 0x07, 0x5f, 0x63, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x22, 0x36, 0x0a, 0x15, 0x47,
0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a,
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x19,
0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x30, 0x0a, 0x18, 0x47, 0x65, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xdb, 0x07, 0x0a, 0x0e,
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86,
0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x42, 0x79,
0x45, 0x64, 0x67, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c,
0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x42,
0x79, 0x45, 0x64, 0x67, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65,
0x74, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x42, 0x79, 0x45, 0x64, 0x67, 0x65, 0x49,
0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x16, 0x12, 0x14, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x66,
0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x12, 0x77, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x46,
0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x72, 0x6f, 0x6e,
0x74, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x46, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x63, 0x6c, 0x75, 0x73,
0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x73,
0x12, 0x67, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73,
0x74, 0x45, 0x64, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
0x2f, 0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x12, 0x6c, 0x0a, 0x0b, 0x47, 0x65, 0x74,
0x45, 0x64, 0x67, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x42,
0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f, 0x6e,
0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67,
0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f,
0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x12, 0x79, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x45, 0x64,
0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x64, 0x67, 0x65, 0x73,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x45,
0x64, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x63, 0x6c, 0x75, 0x73,
0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x73, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e,
0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70,
0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76,
0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x78, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x63,
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65,
0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12,
0x13, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x16, 0x12, 0x14, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x78, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e,
0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c,
0x12, 0x1a, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x3e, 0x5a, 0x3c,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x63,
0x68, 0x69, 0x61, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x66, 0x72,
0x6f, 0x6e, 0x74, 0x6c, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24,
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x63,
0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x47, 0x65, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f,
0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x6e, 0x67, 0x63, 0x68, 0x69, 0x61,
0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x69, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f,
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74,
0x6c, 0x61, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (

View File

@@ -52,7 +52,7 @@ message ListFrontiersResponse {
message ListEdgesRequest {
optional uint32 cursor = 1;
optional uint32 count = 2;
optional uint64 edge_ids = 3;
repeated uint64 edge_ids = 3;
}
message ListEdgesResponse {

View File

@@ -0,0 +1,63 @@
package cluster
import (
"github.com/go-kratos/kratos/v2"
"github.com/singchia/frontier/pkg/frontlas/cluster/server"
"github.com/singchia/frontier/pkg/frontlas/cluster/service"
"github.com/singchia/frontier/pkg/frontlas/config"
"github.com/singchia/frontier/pkg/frontlas/repo"
"github.com/singchia/frontier/pkg/utils"
"github.com/soheilhy/cmux"
"k8s.io/klog/v2"
)
type Cluster struct {
cm cmux.CMux
app *kratos.App
}
func NewCluster(conf *config.Configuration, dao *repo.Dao) (*Cluster, error) {
listen := &conf.ControlPlane.Listen
ln, err := utils.Listen(listen)
if err != nil {
klog.Errorf("control plane listen err: %s", err)
return nil, err
}
// service
svc := service.NewClusterService(dao)
// http and grpc server
cm := cmux.New(ln)
grpcLn := cm.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"))
httpLn := cm.Match(cmux.Any())
gs := server.NewGRPCServer(grpcLn, svc)
hs := server.NewHTTPServer(httpLn, svc)
app := kratos.New(kratos.Server(gs, hs))
return &Cluster{
cm: cm,
app: app,
}, nil
}
func (cluster *Cluster) Serve() error {
go func() {
err := cluster.cm.Serve()
if err != nil {
klog.Errorf("cluster cmux serve err: %s", err)
}
}()
err := cluster.app.Run()
if err != nil {
klog.Errorf("cluster app run err: %s", err)
return err
}
return nil
}
func (cluster *Cluster) Close() error {
cluster.cm.Close()
return cluster.app.Stop()
}

View File

@@ -0,0 +1,20 @@
package server
import (
"net"
"github.com/go-kratos/kratos/v2/middleware/recovery"
"github.com/go-kratos/kratos/v2/transport/grpc"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
)
func NewGRPCServer(ln net.Listener, svc v1.ClusterServiceServer) *grpc.Server {
// new server
opts := []grpc.ServerOption{
grpc.Middleware(recovery.Recovery()),
grpc.Listener(ln),
}
srv := grpc.NewServer(opts...)
v1.RegisterClusterServiceServer(srv, svc)
return srv
}

View File

@@ -0,0 +1,21 @@
package server
import (
"net"
"github.com/go-kratos/kratos/v2/middleware/recovery"
"github.com/go-kratos/kratos/v2/transport/http"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
)
func NewHTTPServer(ln net.Listener, svc v1.ClusterServiceHTTPServer) *http.Server {
// new server
opts := []http.ServerOption{
http.Middleware(recovery.Recovery()),
http.Listener(ln),
}
srv := http.NewServer(opts...)
v1.RegisterClusterServiceHTTPServer(srv, svc)
return srv
}

View File

@@ -0,0 +1,53 @@
package service
import (
"context"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
"github.com/singchia/frontier/pkg/frontlas/repo"
)
type ClusterService struct {
v1.UnimplementedClusterServiceServer
// repo
repo *repo.Dao
}
func NewClusterService(repo *repo.Dao) *ClusterService {
cs := &ClusterService{
repo: repo,
}
return cs
}
func (cs *ClusterService) GetEdgeByID(ctx context.Context, req *v1.GetEdgeByIDRequest) (*v1.GetEdgeByIDResponse, error) {
return cs.getEdgeByID(ctx, req)
}
func (cs *ClusterService) GetEdgesCount(ctx context.Context, req *v1.GetEdgesCountRequest) (*v1.GetEdgesCountResponse, error) {
return cs.getEdgesCount(ctx, req)
}
func (cs *ClusterService) GetFrontierByEdge(ctx context.Context, req *v1.GetFrontierByEdgeIDRequest) (*v1.GetFrontierByEdgeIDResponse, error) {
return cs.getFrontierByEdge(ctx, req)
}
func (cs *ClusterService) GetServiceByID(ctx context.Context, req *v1.GetServiceByIDRequest) (*v1.GetServiceByIDResponse, error) {
return cs.getServiceByID(ctx, req)
}
func (cs *ClusterService) GetServicesCount(ctx context.Context, req *v1.GetServicesCountRequest) (*v1.GetServicesCountResponse, error) {
return cs.getServicesCount(ctx, req)
}
func (cs *ClusterService) ListEdges(ctx context.Context, req *v1.ListEdgesRequest) (*v1.ListEdgesResponse, error) {
return cs.listEdges(ctx, req)
}
func (cs *ClusterService) ListFrontiers(ctx context.Context, req *v1.ListFrontiersRequest) (*v1.ListFrontiersResponse, error) {
return cs.listFrontiers(ctx, req)
}
func (cs *ClusterService) ListServices(ctx context.Context, req *v1.ListServicesRequest) (*v1.ListServicesResponse, error) {
return cs.listServices(ctx, req)
}

View File

@@ -0,0 +1,90 @@
package service
import (
"context"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
"github.com/singchia/frontier/pkg/frontlas/apis"
"github.com/singchia/frontier/pkg/frontlas/repo"
"k8s.io/klog/v2"
)
func (cs *ClusterService) getEdgeByID(_ context.Context, req *v1.GetEdgeByIDRequest) (*v1.GetEdgeByIDResponse, error) {
edge, err := cs.repo.GetEdge(req.EdgeId)
if err != nil {
klog.Errorf("cluster service get edge by ID err: %s", err)
return nil, err
}
return &v1.GetEdgeByIDResponse{
Edge: &v1.Edge{
EdgeId: req.EdgeId,
Addr: edge.Addr,
FrontierId: edge.FrontierID,
UpdateTime: uint64(edge.UpdateTime),
},
}, nil
}
func (cs *ClusterService) getEdgesCount(_ context.Context, _ *v1.GetEdgesCountRequest) (*v1.GetEdgesCountResponse, error) {
count, err := cs.repo.CountEdges()
if err != nil {
klog.Errorf("cluster service count edges err: %s", err)
return nil, err
}
return &v1.GetEdgesCountResponse{
Count: uint64(count),
}, nil
}
func (cs *ClusterService) listEdges(_ context.Context, req *v1.ListEdgesRequest) (*v1.ListEdgesResponse, error) {
// list edges by count and cursor
if req.Count != nil && req.Cursor != nil {
edges, cursor, err := cs.repo.GetEdgesByCursor(&repo.EdgeQuery{
Cursor: uint64(*req.Cursor),
Count: int64(*req.Count),
})
if err != nil {
klog.Errorf("cluster service get edges by cursor err: %s", err)
return nil, err
}
cursorUint32 := uint32(cursor)
return &v1.ListEdgesResponse{
Cursor: &cursorUint32,
Edges: transferEdges(edges),
}, nil
}
// list edges by ids
if req.EdgeIds != nil {
edges, err := cs.repo.GetEdges(req.EdgeIds)
if err != nil {
klog.Errorf("cluster service get edges err: %s", err)
return nil, err
}
return &v1.ListEdgesResponse{
Edges: transferEdges(edges),
}, nil
}
return nil, apis.ErrIllegalRequest
}
func transferEdges(edges []*repo.Edge) []*v1.Edge {
retEdges := make([]*v1.Edge, len(edges))
for i, edge := range edges {
retEdge := transferEdge(edge)
retEdges[i] = retEdge
}
return retEdges
}
func transferEdge(edge *repo.Edge) *v1.Edge {
if edge == nil {
return nil
}
return &v1.Edge{
FrontierId: edge.FrontierID,
Addr: edge.Addr,
UpdateTime: uint64(edge.UpdateTime),
}
}

View File

@@ -0,0 +1,116 @@
package service
import (
"context"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
"github.com/singchia/frontier/pkg/frontlas/apis"
"github.com/singchia/frontier/pkg/frontlas/repo"
"k8s.io/klog/v2"
)
func (cs *ClusterService) getFrontierByEdge(_ context.Context, req *v1.GetFrontierByEdgeIDRequest) (*v1.GetFrontierByEdgeIDResponse, error) {
edge, err := cs.repo.GetEdge(req.EdgeId)
if err != nil {
klog.Errorf("cluster service edge err: %s", err)
return nil, err
}
frontier, err := cs.repo.GetFrontier(edge.FrontierID)
if err != nil {
klog.Errorf("cluster service get frontier err: %s", err)
return nil, err
}
return &v1.GetFrontierByEdgeIDResponse{
Fontier: &v1.Frontier{
FrontierId: frontier.FrontierID,
AdvertisedSbAddr: frontier.AdvertisedServiceboundAddr,
AdvertisedEbAddr: frontier.AdvertisedEdgeboundAddr,
},
}, nil
}
func (cs *ClusterService) listFrontiers(_ context.Context, req *v1.ListFrontiersRequest) (*v1.ListFrontiersResponse, error) {
// list frontiers by count and cursor
if req.Count != nil && req.Cursor != nil {
frontiers, cursor, err := cs.repo.GetFrontiersByCursor(&repo.FrontierQuery{
Cursor: uint64(*req.Cursor),
Count: int64(*req.Count),
})
if err != nil {
klog.Errorf("cluster service list frontier err: %s", err)
return nil, err
}
cursorUint32 := uint32(cursor)
return &v1.ListFrontiersResponse{
Cursor: &cursorUint32,
Frontiers: transferFrontiers(frontiers),
}, nil
}
// list frontiers by EdgeIDs
if req.EdgeIds != nil {
// TODO optimize by redis lua
edges, err := cs.repo.GetEdges(req.EdgeIds)
if err != nil {
klog.Errorf("cluster service get edges err: %s", err)
return nil, err
}
effectiveFrontierIDs := []string{}
indexes := []int{}
for i, edge := range edges {
if edge == nil {
continue
}
effectiveFrontierIDs = append(effectiveFrontierIDs, edge.FrontierID)
indexes = append(indexes, i)
}
effectiveFrontiers, err := cs.repo.GetFrontiers(effectiveFrontierIDs)
if err != nil {
klog.Errorf("cluster service get frontiers err: %s", err)
return nil, err
}
v1frontiers := make([]*v1.Frontier, len(req.EdgeIds))
for i, frontier := range effectiveFrontiers {
v1frontiers[indexes[i]] = transferFrontier(frontier)
}
return &v1.ListFrontiersResponse{
Frontiers: v1frontiers,
}, nil
}
// list frontiers by ID
if req.FrontierIds != nil {
frontiers, err := cs.repo.GetFrontiers(req.FrontierIds)
if err != nil {
klog.Errorf("cluster service get frontiers err: %s", err)
return nil, err
}
v1frontiers := transferFrontiers(frontiers)
return &v1.ListFrontiersResponse{
Frontiers: v1frontiers,
}, nil
}
return nil, apis.ErrIllegalRequest
}
func transferFrontiers(frontiers []*repo.Frontier) []*v1.Frontier {
retFrontiers := make([]*v1.Frontier, len(frontiers))
for i, frontier := range frontiers {
retFrontier := transferFrontier(frontier)
retFrontiers[i] = retFrontier
}
return retFrontiers
}
func transferFrontier(frontier *repo.Frontier) *v1.Frontier {
if frontier == nil {
return nil
}
return &v1.Frontier{
FrontierId: frontier.FrontierID,
AdvertisedSbAddr: frontier.AdvertisedServiceboundAddr,
AdvertisedEbAddr: frontier.AdvertisedEdgeboundAddr,
}
}

View File

@@ -0,0 +1,88 @@
package service
import (
"context"
v1 "github.com/singchia/frontier/api/controlplane/frontlas/v1"
"github.com/singchia/frontier/pkg/frontlas/apis"
"github.com/singchia/frontier/pkg/frontlas/repo"
"k8s.io/klog/v2"
)
func (cs *ClusterService) getServiceByID(_ context.Context, req *v1.GetServiceByIDRequest) (*v1.GetServiceByIDResponse, error) {
svc, err := cs.repo.GetService(req.ServiceId)
if err != nil {
klog.Errorf("cluster service get service err: %s", err)
return nil, err
}
return &v1.GetServiceByIDResponse{
Service: &v1.Service{
Service: svc.Service,
Addr: svc.Addr,
FrontierId: svc.FrontierID,
UpdateTime: uint64(svc.UpdateTime),
},
}, nil
}
func (cs *ClusterService) getServicesCount(_ context.Context, _ *v1.GetServicesCountRequest) (*v1.GetServicesCountResponse, error) {
count, err := cs.repo.CountServices()
if err != nil {
klog.Errorf("cluster service get services count err: %s", err)
return nil, err
}
return &v1.GetServicesCountResponse{
Count: uint64(count),
}, nil
}
func (cs *ClusterService) listServices(_ context.Context, req *v1.ListServicesRequest) (*v1.ListServicesResponse, error) {
// list services by count and cursor
if req.Count != nil && req.Cursor != nil {
services, cursor, err := cs.repo.GetServicesByCursor(&repo.ServiceQuery{
Cursor: uint64(*req.Cursor),
Count: int64(*req.Count),
})
if err != nil {
klog.Errorf("cluster service get services by cursor err: %s", err)
return nil, err
}
cursorUint32 := uint32(cursor)
return &v1.ListServicesResponse{
Cursor: &cursorUint32,
Services: transferServices(services),
}, nil
}
// list services by IDs
if req.ServiceIds != nil {
services, err := cs.repo.GetServices(req.ServiceIds)
if err != nil {
klog.Errorf("cluster service get services err: %s", err)
return nil, err
}
return &v1.ListServicesResponse{
Services: transferServices(services),
}, nil
}
return nil, apis.ErrIllegalRequest
}
func transferServices(services []*repo.Service) []*v1.Service {
retServices := make([]*v1.Service, len(services))
for i, service := range services {
retService := transferService(service)
retServices[i] = retService
}
return retServices
}
func transferService(service *repo.Service) *v1.Service {
return &v1.Service{
Service: service.Service,
Addr: service.Addr,
FrontierId: service.FrontierID,
UpdateTime: uint64(service.UpdateTime),
}
}

View File

@@ -180,3 +180,7 @@ type Configuration struct {
Redis Redis `yaml:"redis"`
}
func Parse() (*Configuration, error) {
return nil, nil
}

View File

@@ -137,3 +137,7 @@ func (fm *FrontierManager) register(end geminio.End) error {
}
return nil
}
func (fm *FrontierManager) Close() error {
return fm.ln.Close()
}

71
pkg/frontlas/frontlas.go Normal file
View File

@@ -0,0 +1,71 @@
package frontlas
import (
"net/http"
"runtime"
"github.com/singchia/frontier/pkg/frontlas/config"
"github.com/singchia/frontier/pkg/frontlas/repo"
"github.com/singchia/frontier/pkg/frontlas/server"
"github.com/singchia/frontier/pkg/utils"
"k8s.io/klog/v2"
)
type Frontlas struct {
repo *repo.Dao
server *server.Server
}
func NewFrontlas() (*Frontlas, error) {
conf, err := config.Parse()
if err != nil {
klog.Errorf("parse flags err: %s", err)
return nil, err
}
// pprof
if conf.Daemon.PProf.Enable {
runtime.SetCPUProfileRate(conf.Daemon.PProf.CPUProfileRate)
go func() {
http.ListenAndServe(conf.Daemon.PProf.Addr, nil)
}()
}
// rlimit
if conf.Daemon.RLimit.Enable {
err = utils.SetRLimit(uint64(conf.Daemon.RLimit.NumFile))
if err != nil {
klog.Errorf("set rlimit err: %s", err)
return nil, err
}
}
klog.Infof("frontlas starts")
// new repo
repo, err := repo.NewDao(conf)
if err != nil {
klog.Errorf("new dao err: %s", err)
return nil, err
}
// servers
server, err := server.NewServer(conf, repo)
if err != nil {
klog.Errorf("new server err: %s", err)
return nil, err
}
return &Frontlas{
repo: repo,
server: server,
}, nil
}
func (frontlas *Frontlas) Run() {
frontlas.server.Serve()
}
func (frontlas *Frontlas) Close() {
frontlas.repo.Close()
frontlas.server.Close()
klog.Infof("frontlas ends")
klog.Flush()
}

View File

@@ -39,7 +39,7 @@ type Dao struct {
rds RDS
}
func newDao(config *config.Configuration) (*Dao, error) {
func NewDao(config *config.Configuration) (*Dao, error) {
var (
rds RDS
mode int

View File

@@ -21,7 +21,7 @@ func TestSetEdgeAndAlive(t *testing.T) {
}
config.Redis.Standalone.Addr = s.Addr()
config.Redis.Standalone.Network = "tcp"
dao, err := newDao(config)
dao, err := NewDao(config)
assert.NoError(t, err)
// pre set edges

View File

@@ -19,7 +19,7 @@ func TestGetAllFrontiers(t *testing.T) {
}
config.Redis.Standalone.Addr = s.Addr()
config.Redis.Standalone.Network = "tcp"
dao, err := newDao(config)
dao, err := NewDao(config)
assert.NoError(t, err)
// pre set frontiers
@@ -43,7 +43,7 @@ func TestSetFrontier(t *testing.T) {
}
config.Redis.Standalone.Addr = s.Addr()
config.Redis.Standalone.Network = "tcp"
dao, err := newDao(config)
dao, err := NewDao(config)
assert.NoError(t, err)
// set frontier

View File

@@ -0,0 +1,50 @@
package server
import (
"github.com/singchia/frontier/pkg/frontlas/cluster"
"github.com/singchia/frontier/pkg/frontlas/config"
"github.com/singchia/frontier/pkg/frontlas/frontierbound"
"github.com/singchia/frontier/pkg/frontlas/repo"
"github.com/singchia/go-timer/v2"
"k8s.io/klog/v2"
)
type Server struct {
tmr timer.Timer
cluster *cluster.Cluster
fm *frontierbound.FrontierManager
}
func NewServer(conf *config.Configuration, repo *repo.Dao) (*Server, error) {
tmr := timer.NewTimer()
// frontierbound
fm, err := frontierbound.NewFrontierManager(conf, repo, tmr)
if err != nil {
klog.Errorf("new frontier manager err: %s", err)
return nil, err
}
// cluster
cluster, err := cluster.NewCluster(conf, repo)
if err != nil {
klog.Errorf("new cluster err: %s", err)
return nil, err
}
return &Server{
tmr: tmr,
cluster: cluster,
fm: fm,
}, nil
}
func (s *Server) Serve() {
go s.cluster.Serve()
go s.fm.Serve()
}
func (s *Server) Close() {
s.cluster.Close()
s.fm.Close()
}