diff --git a/apricot/cacheproxy/service.go b/apricot/cacheproxy/service.go index 2d471e6d..05ea7aa9 100644 --- a/apricot/cacheproxy/service.go +++ b/apricot/cacheproxy/service.go @@ -141,6 +141,14 @@ func (s Service) GetEndpointsForCRUCard(hostname, cardSerial string) ([]string, return s.base.GetEndpointsForCRUCard(hostname, cardSerial) } +func (s Service) GetLinkIDsForCRUEndpoint(host string, cruId string, endpoint string, onlyEnabled bool) (ids []string, err error) { + return s.base.GetLinkIDsForCRUEndpoint(host, cruId, endpoint, onlyEnabled) +} + +func (s Service) GetAliasedLinkIDsForDetector(detector string, onlyEnabled bool) ([]string, error) { + return s.base.GetAliasedLinkIDsForDetector(detector, onlyEnabled) +} + func (s Service) RawGetRecursive(path string) (string, error) { return s.base.RawGetRecursive(path) } diff --git a/apricot/local/service.go b/apricot/local/service.go index 28c108f3..0fe042dd 100644 --- a/apricot/local/service.go +++ b/apricot/local/service.go @@ -41,6 +41,7 @@ import ( "net/url" "os" "path/filepath" + "regexp" "runtime" "sort" "strconv" @@ -51,6 +52,7 @@ import ( var log = logger.New(logrus.StandardLogger(), "confsys") const inventoryKeyPrefix = "o2/hardware/" +const readoutCardKeyPrefix = "o2/components/readoutcard/" type Service struct { src cfgbackend.Source @@ -185,6 +187,114 @@ func (s *Service) GetHostInventory(detector string) (hosts []string, err error) return hosts, err } +func (s *Service) GetLinkIDsForCRUEndpoint(host string, cruId string, endpoint string, onlyEnabled bool) (ids []string, err error) { + + cfgPath := readoutCardKeyPrefix + host + "/cru/" + cruId + "/" + endpoint + + readoutCardConfig, err := s.src.Get(cfgPath) + if err != nil { + return nil, err + } + + var data map[string]map[string]interface{} + if err := json.Unmarshal([]byte(readoutCardConfig), &data); err != nil { + return nil, err + } + + linkPattern := regexp.MustCompile(`^link(\d+)$`) + + var linkIDs []string + for key, value := range data { + matches := linkPattern.FindStringSubmatch(key) + if matches == nil { + continue + } + linkEnabled, ok := value["enabled"].(string) + if !ok { + // this implies that "enabled" key should be always there, even if we want both enabled and disabled links + continue + } + if linkEnabled == "true" || onlyEnabled == false { + linkIDs = append(linkIDs, matches[1]) + } + } + + return linkIDs, nil +} + +type Aliases struct { + Flp struct { + Alias string `json:"alias"` + } `json:"flp"` + Cards map[string]struct { + Alias string `json:"alias"` + Links map[string]struct { + Alias string `json:"alias"` + } `json:"links"` + } `json:"cards"` +} + +func (s *Service) getAliasesForHost(detector, host string) (Aliases, error) { + aliasesPath := inventoryKeyPrefix + "detectors/" + detector + "/flps/" + host + "/aliases" + aliasesFile, err := s.src.Get(aliasesPath) + if err != nil { + return Aliases{}, err + } + + var aliases Aliases + if err := json.Unmarshal([]byte(aliasesFile), &aliases); err != nil { + return Aliases{}, err + } + return aliases, nil +} + +func (s *Service) GetAliasedLinkIDsForDetector(detector string, onlyEnabled bool) (aliasedLinkIds []string, err error) { + s.logMethod() + + hosts, err := s.GetHostInventory(detector) + if err != nil { + return nil, err + } + + for _, host := range hosts { + aliases, err := s.getAliasesForHost(detector, host) + if err != nil { + return nil, err + } + + crus, err := s.GetCRUCardsForHost(host) + if err != nil { + return nil, err + } + for _, cru := range crus { + endpoints, err := s.GetEndpointsForCRUCard(host, cru) + if err != nil { + return nil, err + } + for _, endpoint := range endpoints { + linkIDs, err := s.GetLinkIDsForCRUEndpoint(host, cru, endpoint, onlyEnabled) + if err != nil { + return nil, err + } + + aliasesForCruEndpoint, ok := aliases.Cards[cru+":"+endpoint] + if !ok { + return nil, fmt.Errorf("aliases for cru endpoint %s:%s not found", cru, endpoint) + } + for _, linkID := range linkIDs { + linkIdAlias, ok := aliasesForCruEndpoint.Links[linkID] + if !ok { + return nil, fmt.Errorf("alias for link %s in cru endpoint %s:%s not found", linkID, cru, endpoint) + } + aliasedLinkIds = append(aliasedLinkIds, linkIdAlias.Alias) + } + } + } + } + sort.Strings(aliasedLinkIds) + return aliasedLinkIds, nil +} + func (s *Service) GetDetectorsInventory() (inventory map[string][]string, err error) { s.logMethod() diff --git a/apricot/local/service_test.go b/apricot/local/service_test.go index 3e9a6fa5..9f892e74 100644 --- a/apricot/local/service_test.go +++ b/apricot/local/service_test.go @@ -482,6 +482,81 @@ var _ = Describe("local service", func() { }) }) }) + Describe("getting link IDs for a CRU card endpoint", func() { + var ( + linkIDs []string + err error + ) + When("retrieving the link IDs for a CRU card endpoint", func() { + It("should return the correct link IDs", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("flp001", "0228", "0", false) + Expect(err).NotTo(HaveOccurred()) + Expect(linkIDs).To(ContainElements("0", "1", "2", "10")) + }) + It("should return the correct enabled link IDs", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("flp001", "0228", "0", true) + Expect(err).NotTo(HaveOccurred()) + Expect(linkIDs).To(ContainElements("0", "2")) + }) + }) + When("retrieving the link IDs for a non-existing host", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("NOPE", "0228", "0", true) + Expect(err).To(HaveOccurred()) + }) + }) + When("retrieving the link IDs for a non-existing CRU card", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("flp001", "NOPE", "0", true) + Expect(err).To(HaveOccurred()) + }) + }) + When("retrieving the link IDs for a non-existing endpoint", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("flp001", "0228", "NOPE", true) + Expect(err).To(HaveOccurred()) + }) + }) + When("trying to retrieve the link IDs for an FLP belonging to a CRORC detector", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetLinkIDsForCRUEndpoint("flp146", "0110", "0", true) + Expect(err).To(HaveOccurred()) + }) + }) + }) + + Describe("getting aliased link IDs for a detector", func() { + var ( + linkIDs []string + err error + ) + When("retrieving the link IDs for a detector", func() { + It("should return the correct link IDs", func() { + linkIDs, err = svc.GetAliasedLinkIDsForDetector("ABC", false) + Expect(err).NotTo(HaveOccurred()) + Expect(linkIDs).To(Equal([]string{"01", "123", "400", "58", "59", "600", "62", "63", "a-b_c=d", "string"})) + }) + }) + When("retrieving the active link IDs for a detector", func() { + It("should return the correct link IDs", func() { + linkIDs, err = svc.GetAliasedLinkIDsForDetector("ABC", true) + Expect(err).NotTo(HaveOccurred()) + Expect(linkIDs).To(Equal([]string{"01", "400", "58", "600", "string"})) + }) + }) + When("retrieving the link IDs for a non-existing detector", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetAliasedLinkIDsForDetector("NOPE", false) + Expect(err).To(HaveOccurred()) + }) + }) + When("retrieving the link IDs for a detector without readoutcard config", func() { + It("should produce an error", func() { + linkIDs, err = svc.GetAliasedLinkIDsForDetector("DEF", false) + Expect(err).To(HaveOccurred()) + }) + }) + }) // TODO: // GetRuntimeEntry (currently not supporting yaml backend) diff --git a/apricot/local/service_test.yaml b/apricot/local/service_test.yaml index cca28db8..07047525 100644 --- a/apricot/local/service_test.yaml +++ b/apricot/local/service_test.yaml @@ -18,6 +18,105 @@ o2: entry12: "hello {% include \"sub/entry12\" %}" sub: entry12: "world" + readoutcard: + flp001: + cru: + "0228": + "0": '{ + "cru": { + "key" : "value" + }, + "links": { + "enabled": "false", + "gbtMux": "TTC", + "feeId": "0x2" + }, + "link0": { + "enabled": "true", + "gbtMux": "ttc", + "feeId": "0x680" + }, + "link1": { + "enabled": "false", + "gbtMux": "ttc", + "feeId": "0x681" + }, + "link2": { + "enabled": "true", + "gbtMux": "ttc", + "feeId": "0x682" + }, + "link10": { + "enabled": "false", + "gbtMux": "ttc", + "feeId": "0x683" + } + }' + "1": '{ + "cru": { + "key" : "value" + }, + "links": { + "enabled": "false", + "gbtMux": "TTC", + "feeId": "0x2" + }, + "link0": { + "enabled": "true", + "gbtMux": "ttc", + "feeId": "0x6c0" + }, + "link1": { + "enabled": "false", + "gbtMux": "ttc", + "feeId": "0x6c1" + }, + "link2": { + "enabled": "false", + "gbtMux": "ttc", + "feeId": "0x6c2" + }, + "link3": { + "enabled": "false", + "gbtMux": "ttc", + "feeId": "0x6c3" + } + }' + "0229": + "0": '{ + "cru": { + "key" : "value" + }, + "links": { + "enabled": "true", + "gbtMux": "TTC", + "feeId": "0x2" + }, + "link0": { + "enabled": "true", + "gbtMux": "ttc", + "feeId": "0x680" + } + }' + "1": '{ + "cru": { + "key" : "value" + }, + "links": { + "enabled": "true", + "gbtMux": "TTC", + "feeId": "0x2" + }, + "link0": { + "enabled": "true", + "gbtMux": "ttc", + "feeId": "0x6c0" + } + }' + flp146: + crorc: + "0110": + "0": "{}" runtime: aliecs: defaults: @@ -30,6 +129,44 @@ o2: flps: flp001: cards: "{ \"key\" : \"value\" }" + aliases: ' + { + "flp": { + "alias": "SM 0-1-2-3-4-14-15-16-17" + }, + "cards": { + "0228:0": { + "alias": "SM 14-15-16-17 A-Side", + "links": { + "10": {"alias": "a-b_c=d"}, + "2": {"alias": "string"}, + "1": {"alias": "123"}, + "0": {"alias": "01"} + } + }, + "0228:1": { + "alias": "SM 14-15-16-17 C-Side", + "links": { + "0": {"alias": "58"}, + "1": {"alias": "59"}, + "2": {"alias": "62"}, + "3": {"alias": "63"} + } + }, + "0229:0": { + "alias": "SM 0-1-2-3-4 A-Side", + "links": { + "0": {"alias": "400"} + } + }, + "0229:1": { + "alias": "SM 0-1-2-3-4 C-Side", + "links": { + "0": {"alias": "600"} + } + } + } + }' DEF: flps: flp002: diff --git a/apricot/protos/apricot.pb.go b/apricot/protos/apricot.pb.go index 69136026..e60821d4 100644 --- a/apricot/protos/apricot.pb.go +++ b/apricot/protos/apricot.pb.go @@ -24,7 +24,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.33.0 -// protoc v3.15.8 +// protoc v3.12.4 // source: protos/apricot.proto package apricotpb @@ -1732,6 +1732,226 @@ func (x *CRUCardEndpointResponse) GetEndpoints() string { return "" } +type LinkIDsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` + CardSerial string `protobuf:"bytes,2,opt,name=cardSerial,proto3" json:"cardSerial,omitempty"` + Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + OnlyEnabled bool `protobuf:"varint,4,opt,name=onlyEnabled,proto3" json:"onlyEnabled,omitempty"` +} + +func (x *LinkIDsRequest) Reset() { + *x = LinkIDsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_apricot_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkIDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkIDsRequest) ProtoMessage() {} + +func (x *LinkIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_apricot_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkIDsRequest.ProtoReflect.Descriptor instead. +func (*LinkIDsRequest) Descriptor() ([]byte, []int) { + return file_protos_apricot_proto_rawDescGZIP(), []int{30} +} + +func (x *LinkIDsRequest) GetHostname() string { + if x != nil { + return x.Hostname + } + return "" +} + +func (x *LinkIDsRequest) GetCardSerial() string { + if x != nil { + return x.CardSerial + } + return "" +} + +func (x *LinkIDsRequest) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +func (x *LinkIDsRequest) GetOnlyEnabled() bool { + if x != nil { + return x.OnlyEnabled + } + return false +} + +type LinkIDsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LinkIDs []string `protobuf:"bytes,1,rep,name=linkIDs,proto3" json:"linkIDs,omitempty"` +} + +func (x *LinkIDsResponse) Reset() { + *x = LinkIDsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_apricot_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LinkIDsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LinkIDsResponse) ProtoMessage() {} + +func (x *LinkIDsResponse) ProtoReflect() protoreflect.Message { + mi := &file_protos_apricot_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LinkIDsResponse.ProtoReflect.Descriptor instead. +func (*LinkIDsResponse) Descriptor() ([]byte, []int) { + return file_protos_apricot_proto_rawDescGZIP(), []int{31} +} + +func (x *LinkIDsResponse) GetLinkIDs() []string { + if x != nil { + return x.LinkIDs + } + return nil +} + +type AliasedLinkIDsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Detector string `protobuf:"bytes,1,opt,name=detector,proto3" json:"detector,omitempty"` + OnlyEnabled bool `protobuf:"varint,2,opt,name=onlyEnabled,proto3" json:"onlyEnabled,omitempty"` +} + +func (x *AliasedLinkIDsRequest) Reset() { + *x = AliasedLinkIDsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_apricot_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AliasedLinkIDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasedLinkIDsRequest) ProtoMessage() {} + +func (x *AliasedLinkIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_protos_apricot_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasedLinkIDsRequest.ProtoReflect.Descriptor instead. +func (*AliasedLinkIDsRequest) Descriptor() ([]byte, []int) { + return file_protos_apricot_proto_rawDescGZIP(), []int{32} +} + +func (x *AliasedLinkIDsRequest) GetDetector() string { + if x != nil { + return x.Detector + } + return "" +} + +func (x *AliasedLinkIDsRequest) GetOnlyEnabled() bool { + if x != nil { + return x.OnlyEnabled + } + return false +} + +type AliasedLinkIDsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AliasedLinkIDs []string `protobuf:"bytes,1,rep,name=aliasedLinkIDs,proto3" json:"aliasedLinkIDs,omitempty"` +} + +func (x *AliasedLinkIDsResponse) Reset() { + *x = AliasedLinkIDsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_protos_apricot_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AliasedLinkIDsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AliasedLinkIDsResponse) ProtoMessage() {} + +func (x *AliasedLinkIDsResponse) ProtoReflect() protoreflect.Message { + mi := &file_protos_apricot_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AliasedLinkIDsResponse.ProtoReflect.Descriptor instead. +func (*AliasedLinkIDsResponse) Descriptor() ([]byte, []int) { + return file_protos_apricot_proto_rawDescGZIP(), []int{33} +} + +func (x *AliasedLinkIDsResponse) GetAliasedLinkIDs() []string { + if x != nil { + return x.AliasedLinkIDs + } + return nil +} + var File_protos_apricot_proto protoreflect.FileDescriptor var file_protos_apricot_proto_rawDesc = []byte{ @@ -1894,149 +2114,181 @@ var file_protos_apricot_proto_rawDesc = []byte{ 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x2a, 0x96, 0x03, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x48, - 0x59, 0x53, 0x49, 0x43, 0x53, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x45, 0x43, 0x48, 0x4e, - 0x49, 0x43, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x45, 0x44, 0x45, 0x53, 0x54, - 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x4c, 0x53, 0x45, 0x52, 0x10, 0x04, - 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x53, 0x45, 0x52, 0x10, 0x05, 0x12, 0x1b, 0x0a, 0x17, 0x43, - 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x54, 0x48, 0x52, 0x5f, - 0x54, 0x55, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4c, 0x49, - 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x43, 0x41, 0x53, 0x4e, 0x5f, 0x54, 0x55, - 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x08, - 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x44, 0x49, 0x47, 0x49, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x09, 0x12, 0x1b, - 0x0a, 0x17, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x4e, - 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x43, - 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x48, 0x52, 0x10, 0x0b, - 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x41, 0x4c, 0x50, 0x49, 0x44, 0x45, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x0c, 0x12, 0x0f, 0x0a, - 0x0b, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0d, 0x12, 0x0b, - 0x0a, 0x07, 0x43, 0x4f, 0x53, 0x4d, 0x49, 0x43, 0x53, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x53, - 0x59, 0x4e, 0x54, 0x48, 0x45, 0x54, 0x49, 0x43, 0x10, 0x0f, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, - 0x49, 0x53, 0x45, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x55, 0x4c, 0x53, 0x45, 0x5f, 0x4c, 0x45, 0x4e, 0x47, 0x54, - 0x48, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x56, 0x52, 0x45, 0x53, 0x45, 0x54, 0x44, 0x10, 0x12, 0x12, 0x08, 0x0a, 0x03, - 0x41, 0x4e, 0x59, 0x10, 0xac, 0x02, 0x22, 0x05, 0x08, 0x13, 0x10, 0xab, 0x02, 0x32, 0xdd, 0x0d, - 0x0a, 0x07, 0x41, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x4e, 0x65, 0x77, - 0x52, 0x75, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, - 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x72, 0x69, - 0x63, 0x6f, 0x74, 0x2e, 0x52, 0x75, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x73, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, - 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, - 0x74, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x22, 0x00, 0x12, 0x50, 0x0a, - 0x0f, 0x52, 0x61, 0x77, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, - 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x52, 0x61, 0x77, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x69, 0x6e, 0x74, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x20, 0x0a, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x64, 0x22, 0x2b, 0x0a, 0x0f, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x22, 0x55, + 0x0a, 0x15, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x74, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x6f, 0x6e, 0x6c, 0x79, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x40, 0x0a, 0x16, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, + 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x26, 0x0a, 0x0e, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, + 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x2a, 0x96, 0x03, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x50, 0x48, 0x59, 0x53, 0x49, 0x43, 0x53, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x45, + 0x43, 0x48, 0x4e, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x45, 0x44, + 0x45, 0x53, 0x54, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x4c, 0x53, 0x45, + 0x52, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x53, 0x45, 0x52, 0x10, 0x05, 0x12, 0x1b, + 0x0a, 0x17, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x54, + 0x48, 0x52, 0x5f, 0x54, 0x55, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x43, + 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x43, 0x41, 0x53, 0x4e, + 0x5f, 0x54, 0x55, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x4c, + 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x5f, 0x53, 0x43, 0x41, + 0x4e, 0x10, 0x08, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x49, 0x47, 0x49, 0x54, 0x41, 0x4c, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, + 0x09, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x41, 0x4e, 0x41, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x0a, 0x12, 0x13, + 0x0a, 0x0f, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x48, + 0x52, 0x10, 0x0b, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x41, 0x4c, 0x50, 0x49, 0x44, 0x45, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10, 0x0c, + 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x53, 0x4d, 0x49, 0x43, 0x53, 0x10, 0x0e, 0x12, 0x0d, + 0x0a, 0x09, 0x53, 0x59, 0x4e, 0x54, 0x48, 0x45, 0x54, 0x49, 0x43, 0x10, 0x0f, 0x12, 0x09, 0x0a, + 0x05, 0x4e, 0x4f, 0x49, 0x53, 0x45, 0x10, 0x10, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x41, 0x4c, 0x49, + 0x42, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x55, 0x4c, 0x53, 0x45, 0x5f, 0x4c, 0x45, + 0x4e, 0x47, 0x54, 0x48, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x4c, 0x49, 0x42, 0x52, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x56, 0x52, 0x45, 0x53, 0x45, 0x54, 0x44, 0x10, 0x12, 0x12, + 0x08, 0x0a, 0x03, 0x41, 0x4e, 0x59, 0x10, 0xac, 0x02, 0x22, 0x05, 0x08, 0x13, 0x10, 0xab, 0x02, + 0x32, 0x91, 0x0f, 0x0a, 0x07, 0x41, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x12, 0x3c, 0x0a, 0x0c, + 0x4e, 0x65, 0x77, 0x52, 0x75, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x52, 0x75, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x22, 0x00, 0x12, + 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x56, 0x61, 0x72, 0x73, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x0f, 0x52, 0x61, 0x77, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, + 0x69, 0x76, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x52, 0x61, + 0x77, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x17, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x46, + 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, + 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x48, 0x6f, + 0x73, 0x74, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, + 0x6f, 0x74, 0x2e, 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x12, + 0x14, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, + 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x52, 0x55, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, + 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x1c, 0x47, 0x65, + 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x49, 0x44, 0x73, 0x46, + 0x6f, 0x72, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, + 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, + 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, + 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x48, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, - 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x10, 0x47, 0x65, 0x74, - 0x48, 0x6f, 0x73, 0x74, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x17, 0x2e, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x12, - 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x20, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x14, 0x2e, 0x61, 0x70, 0x72, 0x69, - 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x46, 0x6f, 0x72, 0x48, - 0x6f, 0x73, 0x74, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, - 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, - 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x73, 0x46, 0x6f, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x12, - 0x14, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, - 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x52, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x52, 0x55, 0x43, 0x61, 0x72, 0x64, 0x12, 0x14, 0x2e, 0x61, - 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x52, 0x55, - 0x43, 0x61, 0x72, 0x64, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x72, 0x69, - 0x63, 0x6f, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x72, - 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x52, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x61, 0x70, - 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, - 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x70, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x0e, 0x2e, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, + 0x44, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x53, 0x65, 0x74, + 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x72, + 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, + 0x70, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x61, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x72, - 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x26, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x61, 0x73, 0x74, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, - 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, - 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x15, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x17, 0x2e, - 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x00, 0x12, 0x7d, 0x0a, 0x1c, 0x49, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, - 0x6f, 0x74, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, - 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x20, 0x49, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x0e, 0x2e, 0x61, 0x70, - 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0e, 0x2e, 0x61, 0x70, - 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x5e, 0x0a, - 0x22, 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72, 0x6e, 0x2e, 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x6f, - 0x32, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x72, 0x70, 0x63, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x41, 0x6c, 0x69, 0x63, 0x65, 0x4f, 0x32, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x19, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x6e, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, + 0x69, 0x74, 0x68, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e, 0x61, + 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, + 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x57, 0x69, 0x74, 0x68, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x61, 0x70, + 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x22, 0x00, 0x12, + 0x7d, 0x0a, 0x1c, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2c, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, + 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, + 0x0a, 0x20, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x61, 0x63, + 0x68, 0x65, 0x12, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x42, 0x5e, 0x0a, 0x22, 0x63, 0x68, 0x2e, 0x63, 0x65, 0x72, 0x6e, 0x2e, + 0x61, 0x6c, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x32, 0x2e, 0x61, 0x70, 0x72, 0x69, 0x63, 0x6f, 0x74, + 0x2e, 0x72, 0x70, 0x63, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x41, 0x6c, 0x69, 0x63, 0x65, 0x4f, 0x32, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x2f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2f, 0x61, 0x70, 0x72, 0x69, + 0x63, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x3b, 0x61, 0x70, 0x72, 0x69, 0x63, + 0x6f, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2052,7 +2304,7 @@ func file_protos_apricot_proto_rawDescGZIP() []byte { } var file_protos_apricot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_protos_apricot_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_protos_apricot_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_protos_apricot_proto_goTypes = []interface{}{ (RunType)(0), // 0: apricot.RunType (*Empty)(nil), // 1: apricot.Empty @@ -2085,16 +2337,20 @@ var file_protos_apricot_proto_goTypes = []interface{}{ (*CRUCardsResponse)(nil), // 28: apricot.CRUCardsResponse (*CardRequest)(nil), // 29: apricot.CardRequest (*CRUCardEndpointResponse)(nil), // 30: apricot.CRUCardEndpointResponse - nil, // 31: apricot.ComponentRequest.VarStackEntry - nil, // 32: apricot.DetectorEntriesResponse.DetectorEntriesEntry - nil, // 33: apricot.StringMap.StringMapEntry + (*LinkIDsRequest)(nil), // 31: apricot.LinkIDsRequest + (*LinkIDsResponse)(nil), // 32: apricot.LinkIDsResponse + (*AliasedLinkIDsRequest)(nil), // 33: apricot.AliasedLinkIDsRequest + (*AliasedLinkIDsResponse)(nil), // 34: apricot.AliasedLinkIDsResponse + nil, // 35: apricot.ComponentRequest.VarStackEntry + nil, // 36: apricot.DetectorEntriesResponse.DetectorEntriesEntry + nil, // 37: apricot.StringMap.StringMapEntry } var file_protos_apricot_proto_depIdxs = []int32{ 0, // 0: apricot.ComponentQuery.runType:type_name -> apricot.RunType 2, // 1: apricot.ComponentRequest.query:type_name -> apricot.ComponentQuery - 31, // 2: apricot.ComponentRequest.varStack:type_name -> apricot.ComponentRequest.VarStackEntry - 32, // 3: apricot.DetectorEntriesResponse.detectorEntries:type_name -> apricot.DetectorEntriesResponse.DetectorEntriesEntry - 33, // 4: apricot.StringMap.stringMap:type_name -> apricot.StringMap.StringMapEntry + 35, // 2: apricot.ComponentRequest.varStack:type_name -> apricot.ComponentRequest.VarStackEntry + 36, // 3: apricot.DetectorEntriesResponse.detectorEntries:type_name -> apricot.DetectorEntriesResponse.DetectorEntriesEntry + 37, // 4: apricot.StringMap.stringMap:type_name -> apricot.StringMap.StringMapEntry 0, // 5: apricot.ComponentEntriesQuery.runType:type_name -> apricot.RunType 19, // 6: apricot.ListComponentEntriesRequest.query:type_name -> apricot.ComponentEntriesQuery 2, // 7: apricot.ImportComponentConfigurationRequest.query:type_name -> apricot.ComponentQuery @@ -2110,41 +2366,45 @@ var file_protos_apricot_proto_depIdxs = []int32{ 7, // 17: apricot.Apricot.GetDetectorsForHosts:input_type -> apricot.HostsRequest 6, // 18: apricot.Apricot.GetCRUCardsForHost:input_type -> apricot.HostRequest 29, // 19: apricot.Apricot.GetEndpointsForCRUCard:input_type -> apricot.CardRequest - 14, // 20: apricot.Apricot.GetRuntimeEntry:input_type -> apricot.GetRuntimeEntryRequest - 15, // 21: apricot.Apricot.SetRuntimeEntry:input_type -> apricot.SetRuntimeEntryRequest - 17, // 22: apricot.Apricot.GetRuntimeEntries:input_type -> apricot.GetRuntimeEntriesRequest - 18, // 23: apricot.Apricot.ListRuntimeEntries:input_type -> apricot.ListRuntimeEntriesRequest - 1, // 24: apricot.Apricot.ListComponents:input_type -> apricot.Empty - 20, // 25: apricot.Apricot.ListComponentEntries:input_type -> apricot.ListComponentEntriesRequest - 3, // 26: apricot.Apricot.GetComponentConfiguration:input_type -> apricot.ComponentRequest - 3, // 27: apricot.Apricot.GetComponentConfigurationWithLastIndex:input_type -> apricot.ComponentRequest - 2, // 28: apricot.Apricot.ResolveComponentQuery:input_type -> apricot.ComponentQuery - 26, // 29: apricot.Apricot.ImportComponentConfiguration:input_type -> apricot.ImportComponentConfigurationRequest - 1, // 30: apricot.Apricot.InvalidateComponentTemplateCache:input_type -> apricot.Empty - 11, // 31: apricot.Apricot.NewRunNumber:output_type -> apricot.RunNumberResponse - 12, // 32: apricot.Apricot.GetDefaults:output_type -> apricot.StringMap - 12, // 33: apricot.Apricot.GetVars:output_type -> apricot.StringMap - 4, // 34: apricot.Apricot.RawGetRecursive:output_type -> apricot.ComponentResponse - 23, // 35: apricot.Apricot.ListDetectors:output_type -> apricot.DetectorsResponse - 25, // 36: apricot.Apricot.GetHostInventory:output_type -> apricot.HostEntriesResponse - 10, // 37: apricot.Apricot.GetDetectorsInventory:output_type -> apricot.DetectorEntriesResponse - 8, // 38: apricot.Apricot.GetDetectorForHost:output_type -> apricot.DetectorResponse - 23, // 39: apricot.Apricot.GetDetectorsForHosts:output_type -> apricot.DetectorsResponse - 28, // 40: apricot.Apricot.GetCRUCardsForHost:output_type -> apricot.CRUCardsResponse - 30, // 41: apricot.Apricot.GetEndpointsForCRUCard:output_type -> apricot.CRUCardEndpointResponse - 4, // 42: apricot.Apricot.GetRuntimeEntry:output_type -> apricot.ComponentResponse - 1, // 43: apricot.Apricot.SetRuntimeEntry:output_type -> apricot.Empty - 12, // 44: apricot.Apricot.GetRuntimeEntries:output_type -> apricot.StringMap - 21, // 45: apricot.Apricot.ListRuntimeEntries:output_type -> apricot.ComponentEntriesResponse - 21, // 46: apricot.Apricot.ListComponents:output_type -> apricot.ComponentEntriesResponse - 21, // 47: apricot.Apricot.ListComponentEntries:output_type -> apricot.ComponentEntriesResponse - 4, // 48: apricot.Apricot.GetComponentConfiguration:output_type -> apricot.ComponentResponse - 5, // 49: apricot.Apricot.GetComponentConfigurationWithLastIndex:output_type -> apricot.ComponentResponseWithLastIndex - 2, // 50: apricot.Apricot.ResolveComponentQuery:output_type -> apricot.ComponentQuery - 27, // 51: apricot.Apricot.ImportComponentConfiguration:output_type -> apricot.ImportComponentConfigurationResponse - 1, // 52: apricot.Apricot.InvalidateComponentTemplateCache:output_type -> apricot.Empty - 31, // [31:53] is the sub-list for method output_type - 9, // [9:31] is the sub-list for method input_type + 31, // 20: apricot.Apricot.GetLinkIDsForCRUEndpoint:input_type -> apricot.LinkIDsRequest + 33, // 21: apricot.Apricot.GetAliasedLinkIDsForDetector:input_type -> apricot.AliasedLinkIDsRequest + 14, // 22: apricot.Apricot.GetRuntimeEntry:input_type -> apricot.GetRuntimeEntryRequest + 15, // 23: apricot.Apricot.SetRuntimeEntry:input_type -> apricot.SetRuntimeEntryRequest + 17, // 24: apricot.Apricot.GetRuntimeEntries:input_type -> apricot.GetRuntimeEntriesRequest + 18, // 25: apricot.Apricot.ListRuntimeEntries:input_type -> apricot.ListRuntimeEntriesRequest + 1, // 26: apricot.Apricot.ListComponents:input_type -> apricot.Empty + 20, // 27: apricot.Apricot.ListComponentEntries:input_type -> apricot.ListComponentEntriesRequest + 3, // 28: apricot.Apricot.GetComponentConfiguration:input_type -> apricot.ComponentRequest + 3, // 29: apricot.Apricot.GetComponentConfigurationWithLastIndex:input_type -> apricot.ComponentRequest + 2, // 30: apricot.Apricot.ResolveComponentQuery:input_type -> apricot.ComponentQuery + 26, // 31: apricot.Apricot.ImportComponentConfiguration:input_type -> apricot.ImportComponentConfigurationRequest + 1, // 32: apricot.Apricot.InvalidateComponentTemplateCache:input_type -> apricot.Empty + 11, // 33: apricot.Apricot.NewRunNumber:output_type -> apricot.RunNumberResponse + 12, // 34: apricot.Apricot.GetDefaults:output_type -> apricot.StringMap + 12, // 35: apricot.Apricot.GetVars:output_type -> apricot.StringMap + 4, // 36: apricot.Apricot.RawGetRecursive:output_type -> apricot.ComponentResponse + 23, // 37: apricot.Apricot.ListDetectors:output_type -> apricot.DetectorsResponse + 25, // 38: apricot.Apricot.GetHostInventory:output_type -> apricot.HostEntriesResponse + 10, // 39: apricot.Apricot.GetDetectorsInventory:output_type -> apricot.DetectorEntriesResponse + 8, // 40: apricot.Apricot.GetDetectorForHost:output_type -> apricot.DetectorResponse + 23, // 41: apricot.Apricot.GetDetectorsForHosts:output_type -> apricot.DetectorsResponse + 28, // 42: apricot.Apricot.GetCRUCardsForHost:output_type -> apricot.CRUCardsResponse + 30, // 43: apricot.Apricot.GetEndpointsForCRUCard:output_type -> apricot.CRUCardEndpointResponse + 32, // 44: apricot.Apricot.GetLinkIDsForCRUEndpoint:output_type -> apricot.LinkIDsResponse + 34, // 45: apricot.Apricot.GetAliasedLinkIDsForDetector:output_type -> apricot.AliasedLinkIDsResponse + 4, // 46: apricot.Apricot.GetRuntimeEntry:output_type -> apricot.ComponentResponse + 1, // 47: apricot.Apricot.SetRuntimeEntry:output_type -> apricot.Empty + 12, // 48: apricot.Apricot.GetRuntimeEntries:output_type -> apricot.StringMap + 21, // 49: apricot.Apricot.ListRuntimeEntries:output_type -> apricot.ComponentEntriesResponse + 21, // 50: apricot.Apricot.ListComponents:output_type -> apricot.ComponentEntriesResponse + 21, // 51: apricot.Apricot.ListComponentEntries:output_type -> apricot.ComponentEntriesResponse + 4, // 52: apricot.Apricot.GetComponentConfiguration:output_type -> apricot.ComponentResponse + 5, // 53: apricot.Apricot.GetComponentConfigurationWithLastIndex:output_type -> apricot.ComponentResponseWithLastIndex + 2, // 54: apricot.Apricot.ResolveComponentQuery:output_type -> apricot.ComponentQuery + 27, // 55: apricot.Apricot.ImportComponentConfiguration:output_type -> apricot.ImportComponentConfigurationResponse + 1, // 56: apricot.Apricot.InvalidateComponentTemplateCache:output_type -> apricot.Empty + 33, // [33:57] is the sub-list for method output_type + 9, // [9:33] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name @@ -2516,6 +2776,54 @@ func file_protos_apricot_proto_init() { return nil } } + file_protos_apricot_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_apricot_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LinkIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_apricot_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AliasedLinkIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protos_apricot_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AliasedLinkIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_protos_apricot_proto_msgTypes[2].OneofWrappers = []interface{}{ (*ComponentRequest_Path)(nil), @@ -2531,7 +2839,7 @@ func file_protos_apricot_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protos_apricot_proto_rawDesc, NumEnums: 1, - NumMessages: 33, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/apricot/protos/apricot.proto b/apricot/protos/apricot.proto index 61d727e2..d9729e79 100644 --- a/apricot/protos/apricot.proto +++ b/apricot/protos/apricot.proto @@ -42,6 +42,8 @@ service Apricot { rpc GetDetectorsForHosts(HostsRequest) returns (DetectorsResponse) {} rpc GetCRUCardsForHost(HostRequest) returns (CRUCardsResponse) {} rpc GetEndpointsForCRUCard(CardRequest) returns (CRUCardEndpointResponse) {} + rpc GetLinkIDsForCRUEndpoint(LinkIDsRequest) returns (LinkIDsResponse) {} + rpc GetAliasedLinkIDsForDetector(AliasedLinkIDsRequest) returns (AliasedLinkIDsResponse) {} // Runtime KV calls rpc GetRuntimeEntry(GetRuntimeEntryRequest) returns (ComponentResponse) {} @@ -226,3 +228,23 @@ message CardRequest { message CRUCardEndpointResponse { string endpoints = 1; } + +message LinkIDsRequest { + string hostname = 1; + string cardSerial = 2; + string endpoint = 3; + bool onlyEnabled = 4; +} + +message LinkIDsResponse { + repeated string linkIDs = 1; +} + +message AliasedLinkIDsRequest { + string detector = 1; + bool onlyEnabled = 2; +} + +message AliasedLinkIDsResponse { + repeated string aliasedLinkIDs = 1; +} \ No newline at end of file diff --git a/apricot/protos/apricot_grpc.pb.go b/apricot/protos/apricot_grpc.pb.go index e3e5f720..25f695a1 100644 --- a/apricot/protos/apricot_grpc.pb.go +++ b/apricot/protos/apricot_grpc.pb.go @@ -24,7 +24,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v3.15.8 +// - protoc v3.12.4 // source: protos/apricot.proto package apricotpb @@ -53,6 +53,8 @@ const ( Apricot_GetDetectorsForHosts_FullMethodName = "/apricot.Apricot/GetDetectorsForHosts" Apricot_GetCRUCardsForHost_FullMethodName = "/apricot.Apricot/GetCRUCardsForHost" Apricot_GetEndpointsForCRUCard_FullMethodName = "/apricot.Apricot/GetEndpointsForCRUCard" + Apricot_GetLinkIDsForCRUEndpoint_FullMethodName = "/apricot.Apricot/GetLinkIDsForCRUEndpoint" + Apricot_GetAliasedLinkIDsForDetector_FullMethodName = "/apricot.Apricot/GetAliasedLinkIDsForDetector" Apricot_GetRuntimeEntry_FullMethodName = "/apricot.Apricot/GetRuntimeEntry" Apricot_SetRuntimeEntry_FullMethodName = "/apricot.Apricot/SetRuntimeEntry" Apricot_GetRuntimeEntries_FullMethodName = "/apricot.Apricot/GetRuntimeEntries" @@ -82,6 +84,8 @@ type ApricotClient interface { GetDetectorsForHosts(ctx context.Context, in *HostsRequest, opts ...grpc.CallOption) (*DetectorsResponse, error) GetCRUCardsForHost(ctx context.Context, in *HostRequest, opts ...grpc.CallOption) (*CRUCardsResponse, error) GetEndpointsForCRUCard(ctx context.Context, in *CardRequest, opts ...grpc.CallOption) (*CRUCardEndpointResponse, error) + GetLinkIDsForCRUEndpoint(ctx context.Context, in *LinkIDsRequest, opts ...grpc.CallOption) (*LinkIDsResponse, error) + GetAliasedLinkIDsForDetector(ctx context.Context, in *AliasedLinkIDsRequest, opts ...grpc.CallOption) (*AliasedLinkIDsResponse, error) // Runtime KV calls GetRuntimeEntry(ctx context.Context, in *GetRuntimeEntryRequest, opts ...grpc.CallOption) (*ComponentResponse, error) SetRuntimeEntry(ctx context.Context, in *SetRuntimeEntryRequest, opts ...grpc.CallOption) (*Empty, error) @@ -204,6 +208,24 @@ func (c *apricotClient) GetEndpointsForCRUCard(ctx context.Context, in *CardRequ return out, nil } +func (c *apricotClient) GetLinkIDsForCRUEndpoint(ctx context.Context, in *LinkIDsRequest, opts ...grpc.CallOption) (*LinkIDsResponse, error) { + out := new(LinkIDsResponse) + err := c.cc.Invoke(ctx, Apricot_GetLinkIDsForCRUEndpoint_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apricotClient) GetAliasedLinkIDsForDetector(ctx context.Context, in *AliasedLinkIDsRequest, opts ...grpc.CallOption) (*AliasedLinkIDsResponse, error) { + out := new(AliasedLinkIDsResponse) + err := c.cc.Invoke(ctx, Apricot_GetAliasedLinkIDsForDetector_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *apricotClient) GetRuntimeEntry(ctx context.Context, in *GetRuntimeEntryRequest, opts ...grpc.CallOption) (*ComponentResponse, error) { out := new(ComponentResponse) err := c.cc.Invoke(ctx, Apricot_GetRuntimeEntry_FullMethodName, in, out, opts...) @@ -319,6 +341,8 @@ type ApricotServer interface { GetDetectorsForHosts(context.Context, *HostsRequest) (*DetectorsResponse, error) GetCRUCardsForHost(context.Context, *HostRequest) (*CRUCardsResponse, error) GetEndpointsForCRUCard(context.Context, *CardRequest) (*CRUCardEndpointResponse, error) + GetLinkIDsForCRUEndpoint(context.Context, *LinkIDsRequest) (*LinkIDsResponse, error) + GetAliasedLinkIDsForDetector(context.Context, *AliasedLinkIDsRequest) (*AliasedLinkIDsResponse, error) // Runtime KV calls GetRuntimeEntry(context.Context, *GetRuntimeEntryRequest) (*ComponentResponse, error) SetRuntimeEntry(context.Context, *SetRuntimeEntryRequest) (*Empty, error) @@ -371,6 +395,12 @@ func (UnimplementedApricotServer) GetCRUCardsForHost(context.Context, *HostReque func (UnimplementedApricotServer) GetEndpointsForCRUCard(context.Context, *CardRequest) (*CRUCardEndpointResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetEndpointsForCRUCard not implemented") } +func (UnimplementedApricotServer) GetLinkIDsForCRUEndpoint(context.Context, *LinkIDsRequest) (*LinkIDsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLinkIDsForCRUEndpoint not implemented") +} +func (UnimplementedApricotServer) GetAliasedLinkIDsForDetector(context.Context, *AliasedLinkIDsRequest) (*AliasedLinkIDsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAliasedLinkIDsForDetector not implemented") +} func (UnimplementedApricotServer) GetRuntimeEntry(context.Context, *GetRuntimeEntryRequest) (*ComponentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRuntimeEntry not implemented") } @@ -614,6 +644,42 @@ func _Apricot_GetEndpointsForCRUCard_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Apricot_GetLinkIDsForCRUEndpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LinkIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApricotServer).GetLinkIDsForCRUEndpoint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Apricot_GetLinkIDsForCRUEndpoint_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApricotServer).GetLinkIDsForCRUEndpoint(ctx, req.(*LinkIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Apricot_GetAliasedLinkIDsForDetector_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AliasedLinkIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApricotServer).GetAliasedLinkIDsForDetector(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Apricot_GetAliasedLinkIDsForDetector_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApricotServer).GetAliasedLinkIDsForDetector(ctx, req.(*AliasedLinkIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Apricot_GetRuntimeEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRuntimeEntryRequest) if err := dec(in); err != nil { @@ -863,6 +929,14 @@ var Apricot_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetEndpointsForCRUCard", Handler: _Apricot_GetEndpointsForCRUCard_Handler, }, + { + MethodName: "GetLinkIDsForCRUEndpoint", + Handler: _Apricot_GetLinkIDsForCRUEndpoint_Handler, + }, + { + MethodName: "GetAliasedLinkIDsForDetector", + Handler: _Apricot_GetAliasedLinkIDsForDetector_Handler, + }, { MethodName: "GetRuntimeEntry", Handler: _Apricot_GetRuntimeEntry_Handler, diff --git a/apricot/remote/server.go b/apricot/remote/server.go index 0936d83b..53baffc9 100644 --- a/apricot/remote/server.go +++ b/apricot/remote/server.go @@ -281,6 +281,46 @@ func (m *RpcServer) GetEndpointsForCRUCard(_ context.Context, request *apricotpb return &apricotpb.CRUCardEndpointResponse{Endpoints: endpointsSpaceSeparated}, E_OK.Err() } +func (m *RpcServer) GetLinkIDsForCRUEndpoint(_ context.Context, request *apricotpb.LinkIDsRequest) (*apricotpb.LinkIDsResponse, error) { + if m == nil || m.service == nil { + return nil, E_CONFIGURATION_BACKEND_UNAVAILABLE + } + m.logMethod() + if request == nil { + return nil, E_BAD_INPUT + } + + linkIDs, err := m.service.GetLinkIDsForCRUEndpoint( + request.GetHostname(), + request.GetCardSerial(), + request.GetEndpoint(), + request.GetOnlyEnabled(), + ) + if err != nil { + return nil, err + } + return &apricotpb.LinkIDsResponse{LinkIDs: linkIDs}, E_OK.Err() +} + +func (m *RpcServer) GetAliasedLinkIDsForDetector(_ context.Context, request *apricotpb.AliasedLinkIDsRequest) (*apricotpb.AliasedLinkIDsResponse, error) { + if m == nil || m.service == nil { + return nil, E_CONFIGURATION_BACKEND_UNAVAILABLE + } + m.logMethod() + if request == nil { + return nil, E_BAD_INPUT + } + + aliasedLinkIDs, err := m.service.GetAliasedLinkIDsForDetector( + request.GetDetector(), + request.GetOnlyEnabled(), + ) + if err != nil { + return nil, err + } + return &apricotpb.AliasedLinkIDsResponse{AliasedLinkIDs: aliasedLinkIDs}, E_OK.Err() +} + func (m *RpcServer) GetRuntimeEntry(_ context.Context, request *apricotpb.GetRuntimeEntryRequest) (*apricotpb.ComponentResponse, error) { if m == nil || m.service == nil { return nil, E_CONFIGURATION_BACKEND_UNAVAILABLE diff --git a/apricot/remote/service.go b/apricot/remote/service.go index 1c6c42b0..974e604e 100644 --- a/apricot/remote/service.go +++ b/apricot/remote/service.go @@ -234,6 +234,31 @@ func (c *RemoteService) GetEndpointsForCRUCard(hostname, cardSerial string) (end return endpoints, nil } +func (c *RemoteService) GetLinkIDsForCRUEndpoint(hostname, cardSerial, endpoint string, onlyEnabled bool) ([]string, error) { + request := &apricotpb.LinkIDsRequest{ + Hostname: hostname, + CardSerial: cardSerial, + Endpoint: endpoint, + } + response, err := c.cli.GetLinkIDsForCRUEndpoint(context.Background(), request, grpc.EmptyCallOption{}) + if err != nil { + return nil, err + } + return response.GetLinkIDs(), nil +} + +func (c *RemoteService) GetAliasedLinkIDsForDetector(detector string, onlyEnabled bool) ([]string, error) { + request := &apricotpb.AliasedLinkIDsRequest{ + Detector: detector, + OnlyEnabled: onlyEnabled, + } + response, err := c.cli.GetAliasedLinkIDsForDetector(context.Background(), request, grpc.EmptyCallOption{}) + if err != nil { + return nil, err + } + return response.GetAliasedLinkIDs(), nil +} + func (c *RemoteService) GetRuntimeEntry(component string, key string) (payload string, err error) { var response *apricotpb.ComponentResponse request := &apricotpb.GetRuntimeEntryRequest{ diff --git a/configuration/service.go b/configuration/service.go index 0c3bfa0d..ac9be5b7 100644 --- a/configuration/service.go +++ b/configuration/service.go @@ -59,6 +59,8 @@ type Service interface { GetDetectorsForHosts(hosts []string) ([]string, error) GetCRUCardsForHost(hostname string) ([]string, error) GetEndpointsForCRUCard(hostname, cardSerial string) ([]string, error) + GetLinkIDsForCRUEndpoint(host string, cruId string, endpoint string, onlyEnabled bool) (ids []string, err error) + GetAliasedLinkIDsForDetector(detector string, onlyEnabled bool) (aliasedLinkIds []string, err error) RawGetRecursive(path string) (string, error) } diff --git a/core/integration/dcs/dcsutil.go b/core/integration/dcs/dcsutil.go index 764e4101..86094b74 100644 --- a/core/integration/dcs/dcsutil.go +++ b/core/integration/dcs/dcsutil.go @@ -26,6 +26,8 @@ package dcs import ( "fmt" + "github.com/AliceO2Group/Control/common/logger/infologger" + "github.com/AliceO2Group/Control/core/the" "strings" dcspb "github.com/AliceO2Group/Control/core/integration/dcs/protos" @@ -51,6 +53,24 @@ func resolveDefaults(detectorArgMap map[string]string, varStack map[string]strin return detectorArgMap } +func addEnabledLinks(detectorArgMap map[string]string, varStack map[string]string, ecsDetector string, theLog *logrus.Entry) map[string]string { + sendDetLinks, ok := varStack[ecsDetector+"_dcs_send_enabled_links"] + if !ok || sendDetLinks != "true" { + return detectorArgMap + } + linkIDs, err := the.ConfSvc().GetAliasedLinkIDsForDetector(ecsDetector, true) + if err != nil { + theLog.WithError(err).Errorf("failed to get aliased link IDs for detector '%s'", ecsDetector) + return detectorArgMap + } + linksJoined := strings.Join(linkIDs, ",") + theLog.WithField(infologger.Level, infologger.IL_Devel). + Infof("adding enabled link IDs for detector '%s' to DCS payload '%s'", ecsDetector, linksJoined) + detectorArgMap["ddl_list"] = linksJoined + + return detectorArgMap +} + func ecsToDcsDetector(ecsDetector string) (dcspb.Detector, error) { var err error det := strings.ToUpper(strings.TrimSpace(ecsDetector)) diff --git a/core/integration/dcs/plugin.go b/core/integration/dcs/plugin.go index 122ecb88..0b070392 100644 --- a/core/integration/dcs/plugin.go +++ b/core/integration/dcs/plugin.go @@ -664,6 +664,11 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) { WithField("call", "PrepareForRun"). WithField("detector", ecsDet)) + detectorArgMap = addEnabledLinks(detectorArgMap, varStack, ecsDet, + log.WithField("partition", envId). + WithField("call", "PrepareForRun"). + WithField("detector", ecsDet)) + in.Detectors[i] = &dcspb.DetectorOperationRequest{ Detector: dcsDet, ExtraParameters: detectorArgMap, @@ -1365,6 +1370,12 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) { WithField("detector", ecsDet). WithField("run", runNumber64)) + detectorArgMap = addEnabledLinks(detectorArgMap, varStack, ecsDet, + log.WithField("partition", envId). + WithField("call", "StartOfRun"). + WithField("detector", ecsDet). + WithField("run", runNumber64)) + in.Detectors[i] = &dcspb.DetectorOperationRequest{ Detector: dcsDet, ExtraParameters: detectorArgMap,