From 0254db261a0983f77feffdc8737e75a602dda217 Mon Sep 17 00:00:00 2001 From: yannic rieger Date: Sun, 21 Jun 2026 17:37:03 +0200 Subject: [PATCH] expose match information this is needed by downstream clients to display match information in the ui. --- api/v1alpha1/api.pb.go | 444 +++++++++++++++++------------ api/v1alpha1/api.proto | 6 + api/v1alpha1/api_grpc.pb.go | 14 + cmd/server/main.go | 4 +- internal/matchmaking/matchmaker.go | 29 +- internal/matchmaking/types.go | 15 +- internal/server/endpoints.go | 25 +- internal/server/server.go | 12 +- test/functional/suite_test.go | 61 +++- 9 files changed, 399 insertions(+), 211 deletions(-) diff --git a/api/v1alpha1/api.pb.go b/api/v1alpha1/api.pb.go index ce8df61..52f6116 100644 --- a/api/v1alpha1/api.pb.go +++ b/api/v1alpha1/api.pb.go @@ -1,3 +1,17 @@ +// +//A basic matchmaking service for the Chunk Explorer. +//Copyright (C) 2026 Yannic Rieger +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU Affero General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Affero General Public License for more details. +//You should have received a copy of the GNU Affero General Public License +//along with this program. If not, see . + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.35.2 @@ -70,6 +84,59 @@ func (TicketStatus) EnumDescriptor() ([]byte, []int) { return file_v1alpha1_api_proto_rawDescGZIP(), []int{0} } +type Match struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PlayerCount uint32 `protobuf:"varint,2,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"` +} + +func (x *Match) Reset() { + *x = Match{} + mi := &file_v1alpha1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Match) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Match) ProtoMessage() {} + +func (x *Match) ProtoReflect() protoreflect.Message { + mi := &file_v1alpha1_api_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Match.ProtoReflect.Descriptor instead. +func (*Match) Descriptor() ([]byte, []int) { + return file_v1alpha1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *Match) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Match) GetPlayerCount() uint32 { + if x != nil { + return x.PlayerCount + } + return 0 +} + type Ticket struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -80,11 +147,12 @@ type Ticket struct { PlayerCount uint32 `protobuf:"varint,3,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"` Status TicketStatus `protobuf:"varint,4,opt,name=status,proto3,enum=matchmaking.v1alpha1.TicketStatus" json:"status,omitempty"` Assignment *Assignment `protobuf:"bytes,5,opt,name=assignment,proto3" json:"assignment,omitempty"` + Match *Match `protobuf:"bytes,6,opt,name=match,proto3" json:"match,omitempty"` } func (x *Ticket) Reset() { *x = Ticket{} - mi := &file_v1alpha1_api_proto_msgTypes[0] + mi := &file_v1alpha1_api_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +164,7 @@ func (x *Ticket) String() string { func (*Ticket) ProtoMessage() {} func (x *Ticket) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[0] + mi := &file_v1alpha1_api_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +177,7 @@ func (x *Ticket) ProtoReflect() protoreflect.Message { // Deprecated: Use Ticket.ProtoReflect.Descriptor instead. func (*Ticket) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{0} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{1} } func (x *Ticket) GetId() string { @@ -147,6 +215,13 @@ func (x *Ticket) GetAssignment() *Assignment { return nil } +func (x *Ticket) GetMatch() *Match { + if x != nil { + return x.Match + } + return nil +} + type Assignment struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -157,7 +232,7 @@ type Assignment struct { func (x *Assignment) Reset() { *x = Assignment{} - mi := &file_v1alpha1_api_proto_msgTypes[1] + mi := &file_v1alpha1_api_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -169,7 +244,7 @@ func (x *Assignment) String() string { func (*Assignment) ProtoMessage() {} func (x *Assignment) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[1] + mi := &file_v1alpha1_api_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -182,7 +257,7 @@ func (x *Assignment) ProtoReflect() protoreflect.Message { // Deprecated: Use Assignment.ProtoReflect.Descriptor instead. func (*Assignment) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{1} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{2} } func (x *Assignment) GetInstanceId() string { @@ -203,7 +278,7 @@ type SearchMatchRequest struct { func (x *SearchMatchRequest) Reset() { *x = SearchMatchRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[2] + mi := &file_v1alpha1_api_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -215,7 +290,7 @@ func (x *SearchMatchRequest) String() string { func (*SearchMatchRequest) ProtoMessage() {} func (x *SearchMatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[2] + mi := &file_v1alpha1_api_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -228,7 +303,7 @@ func (x *SearchMatchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchMatchRequest.ProtoReflect.Descriptor instead. func (*SearchMatchRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{2} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{3} } func (x *SearchMatchRequest) GetFlavorId() string { @@ -255,7 +330,7 @@ type SearchMatchResponse struct { func (x *SearchMatchResponse) Reset() { *x = SearchMatchResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[3] + mi := &file_v1alpha1_api_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -267,7 +342,7 @@ func (x *SearchMatchResponse) String() string { func (*SearchMatchResponse) ProtoMessage() {} func (x *SearchMatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[3] + mi := &file_v1alpha1_api_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -280,7 +355,7 @@ func (x *SearchMatchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SearchMatchResponse.ProtoReflect.Descriptor instead. func (*SearchMatchResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{3} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{4} } func (x *SearchMatchResponse) GetTicket() *Ticket { @@ -300,7 +375,7 @@ type GetTicketRequest struct { func (x *GetTicketRequest) Reset() { *x = GetTicketRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[4] + mi := &file_v1alpha1_api_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -312,7 +387,7 @@ func (x *GetTicketRequest) String() string { func (*GetTicketRequest) ProtoMessage() {} func (x *GetTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[4] + mi := &file_v1alpha1_api_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -325,7 +400,7 @@ func (x *GetTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTicketRequest.ProtoReflect.Descriptor instead. func (*GetTicketRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{4} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{5} } func (x *GetTicketRequest) GetTicketId() string { @@ -345,7 +420,7 @@ type GetTicketResponse struct { func (x *GetTicketResponse) Reset() { *x = GetTicketResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[5] + mi := &file_v1alpha1_api_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -357,7 +432,7 @@ func (x *GetTicketResponse) String() string { func (*GetTicketResponse) ProtoMessage() {} func (x *GetTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[5] + mi := &file_v1alpha1_api_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -370,7 +445,7 @@ func (x *GetTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetTicketResponse.ProtoReflect.Descriptor instead. func (*GetTicketResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{5} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{6} } func (x *GetTicketResponse) GetTicket() *Ticket { @@ -390,7 +465,7 @@ type RemoveTicketRequest struct { func (x *RemoveTicketRequest) Reset() { *x = RemoveTicketRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[6] + mi := &file_v1alpha1_api_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -402,7 +477,7 @@ func (x *RemoveTicketRequest) String() string { func (*RemoveTicketRequest) ProtoMessage() {} func (x *RemoveTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[6] + mi := &file_v1alpha1_api_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -415,7 +490,7 @@ func (x *RemoveTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveTicketRequest.ProtoReflect.Descriptor instead. func (*RemoveTicketRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{6} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{7} } func (x *RemoveTicketRequest) GetTicketId() string { @@ -433,7 +508,7 @@ type RemoveTicketResponse struct { func (x *RemoveTicketResponse) Reset() { *x = RemoveTicketResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[7] + mi := &file_v1alpha1_api_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -445,7 +520,7 @@ func (x *RemoveTicketResponse) String() string { func (*RemoveTicketResponse) ProtoMessage() {} func (x *RemoveTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[7] + mi := &file_v1alpha1_api_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -458,7 +533,7 @@ func (x *RemoveTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveTicketResponse.ProtoReflect.Descriptor instead. func (*RemoveTicketResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{7} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{8} } type RemoveAllTicketsRequest struct { @@ -469,7 +544,7 @@ type RemoveAllTicketsRequest struct { func (x *RemoveAllTicketsRequest) Reset() { *x = RemoveAllTicketsRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[8] + mi := &file_v1alpha1_api_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -481,7 +556,7 @@ func (x *RemoveAllTicketsRequest) String() string { func (*RemoveAllTicketsRequest) ProtoMessage() {} func (x *RemoveAllTicketsRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[8] + mi := &file_v1alpha1_api_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -494,7 +569,7 @@ func (x *RemoveAllTicketsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAllTicketsRequest.ProtoReflect.Descriptor instead. func (*RemoveAllTicketsRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{8} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{9} } type RemoveAllTicketsResponse struct { @@ -505,7 +580,7 @@ type RemoveAllTicketsResponse struct { func (x *RemoveAllTicketsResponse) Reset() { *x = RemoveAllTicketsResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[9] + mi := &file_v1alpha1_api_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -517,7 +592,7 @@ func (x *RemoveAllTicketsResponse) String() string { func (*RemoveAllTicketsResponse) ProtoMessage() {} func (x *RemoveAllTicketsResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[9] + mi := &file_v1alpha1_api_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -530,7 +605,7 @@ func (x *RemoveAllTicketsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAllTicketsResponse.ProtoReflect.Descriptor instead. func (*RemoveAllTicketsResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{9} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{10} } type CreateTicketRequest struct { @@ -544,7 +619,7 @@ type CreateTicketRequest struct { func (x *CreateTicketRequest) Reset() { *x = CreateTicketRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[10] + mi := &file_v1alpha1_api_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -556,7 +631,7 @@ func (x *CreateTicketRequest) String() string { func (*CreateTicketRequest) ProtoMessage() {} func (x *CreateTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[10] + mi := &file_v1alpha1_api_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -569,7 +644,7 @@ func (x *CreateTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTicketRequest.ProtoReflect.Descriptor instead. func (*CreateTicketRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{10} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{11} } func (x *CreateTicketRequest) GetFlavorId() string { @@ -596,7 +671,7 @@ type CreateTicketResponse struct { func (x *CreateTicketResponse) Reset() { *x = CreateTicketResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[11] + mi := &file_v1alpha1_api_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -608,7 +683,7 @@ func (x *CreateTicketResponse) String() string { func (*CreateTicketResponse) ProtoMessage() {} func (x *CreateTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[11] + mi := &file_v1alpha1_api_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -621,7 +696,7 @@ func (x *CreateTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTicketResponse.ProtoReflect.Descriptor instead. func (*CreateTicketResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{11} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{12} } func (x *CreateTicketResponse) GetTicket() *Ticket { @@ -641,7 +716,7 @@ type ActivateTicketRequest struct { func (x *ActivateTicketRequest) Reset() { *x = ActivateTicketRequest{} - mi := &file_v1alpha1_api_proto_msgTypes[12] + mi := &file_v1alpha1_api_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -653,7 +728,7 @@ func (x *ActivateTicketRequest) String() string { func (*ActivateTicketRequest) ProtoMessage() {} func (x *ActivateTicketRequest) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[12] + mi := &file_v1alpha1_api_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -666,7 +741,7 @@ func (x *ActivateTicketRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateTicketRequest.ProtoReflect.Descriptor instead. func (*ActivateTicketRequest) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{12} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{13} } func (x *ActivateTicketRequest) GetTicketId() string { @@ -684,7 +759,7 @@ type ActivateTicketResponse struct { func (x *ActivateTicketResponse) Reset() { *x = ActivateTicketResponse{} - mi := &file_v1alpha1_api_proto_msgTypes[13] + mi := &file_v1alpha1_api_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -696,7 +771,7 @@ func (x *ActivateTicketResponse) String() string { func (*ActivateTicketResponse) ProtoMessage() {} func (x *ActivateTicketResponse) ProtoReflect() protoreflect.Message { - mi := &file_v1alpha1_api_proto_msgTypes[13] + mi := &file_v1alpha1_api_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -709,7 +784,7 @@ func (x *ActivateTicketResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivateTicketResponse.ProtoReflect.Descriptor instead. func (*ActivateTicketResponse) Descriptor() ([]byte, []int) { - return file_v1alpha1_api_proto_rawDescGZIP(), []int{13} + return file_v1alpha1_api_proto_rawDescGZIP(), []int{14} } var File_v1alpha1_api_proto protoreflect.FileDescriptor @@ -719,113 +794,120 @@ var file_v1alpha1_api_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a, 0x06, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x49, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, - 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x22, 0x2d, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, - 0x5e, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3a, 0x0a, 0x05, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x89, 0x02, 0x0a, 0x06, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, + 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x0a, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x05, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, + 0x2d, 0x0a, 0x0a, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x5e, + 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, + 0x01, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4b, + 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x39, 0x0a, 0x10, 0x47, + 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, + 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x22, 0x3c, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, + 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x4b, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x39, 0x0a, 0x10, - 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x69, - 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, - 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x22, 0x3c, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x72, 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, - 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x1a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x5f, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, + 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, + 0x4c, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x3e, 0x0a, + 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, - 0xb0, 0x01, 0x01, 0x52, 0x08, 0x66, 0x6c, 0x61, 0x76, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x22, 0x4c, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, - 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x3e, - 0x0a, 0x15, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x74, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, - 0x03, 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x18, - 0x0a, 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x48, 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, - 0x54, 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, - 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x4f, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x41, 0x42, 0x4c, - 0x45, 0x5f, 0x46, 0x4c, 0x41, 0x56, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, - 0x10, 0x02, 0x32, 0xa0, 0x04, 0x0a, 0x12, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x47, 0x65, 0x74, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, - 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0xb0, 0x01, 0x01, 0x52, 0x08, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64, 0x22, 0x18, 0x0a, + 0x16, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x48, 0x0a, 0x0c, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x4e, 0x4f, 0x5f, 0x50, 0x4c, 0x41, 0x59, 0x41, 0x42, 0x4c, 0x45, + 0x5f, 0x46, 0x4c, 0x41, 0x56, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x10, + 0x02, 0x32, 0xa0, 0x04, 0x0a, 0x12, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, + 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, + 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, - 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x65, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, - 0x74, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x6d, 0x61, 0x74, - 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x58, 0x0a, 0x25, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2e, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5a, 0x2f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x41, 0x6c, + 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x65, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, + 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x58, 0x0a, 0x25, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2e, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5a, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x63, + 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x6d, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -841,45 +923,47 @@ func file_v1alpha1_api_proto_rawDescGZIP() []byte { } var file_v1alpha1_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_v1alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_v1alpha1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_v1alpha1_api_proto_goTypes = []any{ (TicketStatus)(0), // 0: matchmaking.v1alpha1.TicketStatus - (*Ticket)(nil), // 1: matchmaking.v1alpha1.Ticket - (*Assignment)(nil), // 2: matchmaking.v1alpha1.Assignment - (*SearchMatchRequest)(nil), // 3: matchmaking.v1alpha1.SearchMatchRequest - (*SearchMatchResponse)(nil), // 4: matchmaking.v1alpha1.SearchMatchResponse - (*GetTicketRequest)(nil), // 5: matchmaking.v1alpha1.GetTicketRequest - (*GetTicketResponse)(nil), // 6: matchmaking.v1alpha1.GetTicketResponse - (*RemoveTicketRequest)(nil), // 7: matchmaking.v1alpha1.RemoveTicketRequest - (*RemoveTicketResponse)(nil), // 8: matchmaking.v1alpha1.RemoveTicketResponse - (*RemoveAllTicketsRequest)(nil), // 9: matchmaking.v1alpha1.RemoveAllTicketsRequest - (*RemoveAllTicketsResponse)(nil), // 10: matchmaking.v1alpha1.RemoveAllTicketsResponse - (*CreateTicketRequest)(nil), // 11: matchmaking.v1alpha1.CreateTicketRequest - (*CreateTicketResponse)(nil), // 12: matchmaking.v1alpha1.CreateTicketResponse - (*ActivateTicketRequest)(nil), // 13: matchmaking.v1alpha1.ActivateTicketRequest - (*ActivateTicketResponse)(nil), // 14: matchmaking.v1alpha1.ActivateTicketResponse + (*Match)(nil), // 1: matchmaking.v1alpha1.Match + (*Ticket)(nil), // 2: matchmaking.v1alpha1.Ticket + (*Assignment)(nil), // 3: matchmaking.v1alpha1.Assignment + (*SearchMatchRequest)(nil), // 4: matchmaking.v1alpha1.SearchMatchRequest + (*SearchMatchResponse)(nil), // 5: matchmaking.v1alpha1.SearchMatchResponse + (*GetTicketRequest)(nil), // 6: matchmaking.v1alpha1.GetTicketRequest + (*GetTicketResponse)(nil), // 7: matchmaking.v1alpha1.GetTicketResponse + (*RemoveTicketRequest)(nil), // 8: matchmaking.v1alpha1.RemoveTicketRequest + (*RemoveTicketResponse)(nil), // 9: matchmaking.v1alpha1.RemoveTicketResponse + (*RemoveAllTicketsRequest)(nil), // 10: matchmaking.v1alpha1.RemoveAllTicketsRequest + (*RemoveAllTicketsResponse)(nil), // 11: matchmaking.v1alpha1.RemoveAllTicketsResponse + (*CreateTicketRequest)(nil), // 12: matchmaking.v1alpha1.CreateTicketRequest + (*CreateTicketResponse)(nil), // 13: matchmaking.v1alpha1.CreateTicketResponse + (*ActivateTicketRequest)(nil), // 14: matchmaking.v1alpha1.ActivateTicketRequest + (*ActivateTicketResponse)(nil), // 15: matchmaking.v1alpha1.ActivateTicketResponse } var file_v1alpha1_api_proto_depIdxs = []int32{ 0, // 0: matchmaking.v1alpha1.Ticket.status:type_name -> matchmaking.v1alpha1.TicketStatus - 2, // 1: matchmaking.v1alpha1.Ticket.assignment:type_name -> matchmaking.v1alpha1.Assignment - 1, // 2: matchmaking.v1alpha1.SearchMatchResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket - 1, // 3: matchmaking.v1alpha1.GetTicketResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket - 1, // 4: matchmaking.v1alpha1.CreateTicketResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket - 5, // 5: matchmaking.v1alpha1.MatchmakingService.GetTicket:input_type -> matchmaking.v1alpha1.GetTicketRequest - 7, // 6: matchmaking.v1alpha1.MatchmakingService.RemoveTicket:input_type -> matchmaking.v1alpha1.RemoveTicketRequest - 9, // 7: matchmaking.v1alpha1.MatchmakingService.RemoveAllTickets:input_type -> matchmaking.v1alpha1.RemoveAllTicketsRequest - 11, // 8: matchmaking.v1alpha1.MatchmakingService.CreateTicket:input_type -> matchmaking.v1alpha1.CreateTicketRequest - 13, // 9: matchmaking.v1alpha1.MatchmakingService.ActivateTicket:input_type -> matchmaking.v1alpha1.ActivateTicketRequest - 6, // 10: matchmaking.v1alpha1.MatchmakingService.GetTicket:output_type -> matchmaking.v1alpha1.GetTicketResponse - 8, // 11: matchmaking.v1alpha1.MatchmakingService.RemoveTicket:output_type -> matchmaking.v1alpha1.RemoveTicketResponse - 10, // 12: matchmaking.v1alpha1.MatchmakingService.RemoveAllTickets:output_type -> matchmaking.v1alpha1.RemoveAllTicketsResponse - 12, // 13: matchmaking.v1alpha1.MatchmakingService.CreateTicket:output_type -> matchmaking.v1alpha1.CreateTicketResponse - 14, // 14: matchmaking.v1alpha1.MatchmakingService.ActivateTicket:output_type -> matchmaking.v1alpha1.ActivateTicketResponse - 10, // [10:15] is the sub-list for method output_type - 5, // [5:10] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 3, // 1: matchmaking.v1alpha1.Ticket.assignment:type_name -> matchmaking.v1alpha1.Assignment + 1, // 2: matchmaking.v1alpha1.Ticket.match:type_name -> matchmaking.v1alpha1.Match + 2, // 3: matchmaking.v1alpha1.SearchMatchResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket + 2, // 4: matchmaking.v1alpha1.GetTicketResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket + 2, // 5: matchmaking.v1alpha1.CreateTicketResponse.ticket:type_name -> matchmaking.v1alpha1.Ticket + 6, // 6: matchmaking.v1alpha1.MatchmakingService.GetTicket:input_type -> matchmaking.v1alpha1.GetTicketRequest + 8, // 7: matchmaking.v1alpha1.MatchmakingService.RemoveTicket:input_type -> matchmaking.v1alpha1.RemoveTicketRequest + 10, // 8: matchmaking.v1alpha1.MatchmakingService.RemoveAllTickets:input_type -> matchmaking.v1alpha1.RemoveAllTicketsRequest + 12, // 9: matchmaking.v1alpha1.MatchmakingService.CreateTicket:input_type -> matchmaking.v1alpha1.CreateTicketRequest + 14, // 10: matchmaking.v1alpha1.MatchmakingService.ActivateTicket:input_type -> matchmaking.v1alpha1.ActivateTicketRequest + 7, // 11: matchmaking.v1alpha1.MatchmakingService.GetTicket:output_type -> matchmaking.v1alpha1.GetTicketResponse + 9, // 12: matchmaking.v1alpha1.MatchmakingService.RemoveTicket:output_type -> matchmaking.v1alpha1.RemoveTicketResponse + 11, // 13: matchmaking.v1alpha1.MatchmakingService.RemoveAllTickets:output_type -> matchmaking.v1alpha1.RemoveAllTicketsResponse + 13, // 14: matchmaking.v1alpha1.MatchmakingService.CreateTicket:output_type -> matchmaking.v1alpha1.CreateTicketResponse + 15, // 15: matchmaking.v1alpha1.MatchmakingService.ActivateTicket:output_type -> matchmaking.v1alpha1.ActivateTicketResponse + 11, // [11:16] is the sub-list for method output_type + 6, // [6:11] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_v1alpha1_api_proto_init() } @@ -893,7 +977,7 @@ func file_v1alpha1_api_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_v1alpha1_api_proto_rawDesc, NumEnums: 1, - NumMessages: 14, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/api/v1alpha1/api.proto b/api/v1alpha1/api.proto index 62376ab..dee346f 100644 --- a/api/v1alpha1/api.proto +++ b/api/v1alpha1/api.proto @@ -39,12 +39,18 @@ enum TicketStatus { NO_PLAYABLE_FLAVOR_VERSION = 2; } +message Match { + string id = 1; + uint32 player_count = 2; +} + message Ticket { string id = 1; string flavor_id = 2; uint32 player_count = 3; TicketStatus status = 4; Assignment assignment = 5; + Match match = 6; } message Assignment { diff --git a/api/v1alpha1/api_grpc.pb.go b/api/v1alpha1/api_grpc.pb.go index b45fd1b..b65fada 100644 --- a/api/v1alpha1/api_grpc.pb.go +++ b/api/v1alpha1/api_grpc.pb.go @@ -1,3 +1,17 @@ +// +//A basic matchmaking service for the Chunk Explorer. +//Copyright (C) 2026 Yannic Rieger +//This program is free software: you can redistribute it and/or modify +//it under the terms of the GNU Affero General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +//This program is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU Affero General Public License for more details. +//You should have received a copy of the GNU Affero General Public License +//along with this program. If not, see . + // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 diff --git a/cmd/server/main.go b/cmd/server/main.go index 9fc9720..5fe5229 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -35,6 +35,7 @@ func main() { ctx, cancel = context.WithCancel(context.Background()) logger = slog.New(slog.NewJSONHandler(os.Stdout, nil)) tickets = matchmaking.NewStore[matchmaking.Ticket]() + matches = matchmaking.NewStore[matchmaking.Match]() ) viper.SetEnvPrefix("MM") @@ -46,6 +47,7 @@ func main() { viper.SetDefault("match_interval", "1s") viper.SetDefault("allocate_instance_for_pending_match_after", "15s") viper.SetDefault("remove_inactive_tickets_after", "1m") + viper.SetDefault("remove_deployed_matches_after", "2m") var cfg server.Config if err := viper.Unmarshal(&cfg); err != nil { @@ -53,7 +55,7 @@ func main() { os.Exit(1) } - serv := server.New(logger, cfg, tickets) + serv := server.New(logger, cfg, tickets, matches) go func() { c := make(chan os.Signal, 1) diff --git a/internal/matchmaking/matchmaker.go b/internal/matchmaking/matchmaker.go index 7239b85..0676321 100644 --- a/internal/matchmaking/matchmaker.go +++ b/internal/matchmaking/matchmaker.go @@ -50,6 +50,7 @@ type FlavorMatchMaker struct { allocInstanceForPendingMatchAfter time.Duration removeInactiveTicketsAfter time.Duration + removeDeployedMatchesAfter time.Duration chunkClient chunkv1alpha1.ChunkServiceClient insClient instancev1alpha1.InstanceServiceClient @@ -60,7 +61,9 @@ func NewFlavorMatchMaker( matchEvalInterval time.Duration, allocInstanceForPendingMatchAfter time.Duration, removeInactiveTicketsAfter time.Duration, + removeDeployedMatchesAfter time.Duration, tickets *Store[Ticket], + matches *Store[Match], chunkClient chunkv1alpha1.ChunkServiceClient, insClient instancev1alpha1.InstanceServiceClient, ) *FlavorMatchMaker { @@ -69,10 +72,11 @@ func NewFlavorMatchMaker( ticker: time.NewTicker(matchEvalInterval), tickets: tickets, ticketPools: make(map[string]TicketPool), - matches: NewStore[Match](), + matches: matches, pendingMatches: make(map[string][]string), allocInstanceForPendingMatchAfter: allocInstanceForPendingMatchAfter, removeInactiveTicketsAfter: removeInactiveTicketsAfter, + removeDeployedMatchesAfter: removeDeployedMatchesAfter, chunkClient: chunkClient, insClient: insClient, } @@ -157,9 +161,9 @@ func (m FlavorMatchMaker) generateMatches(flavorID string, version *chunkv1alpha matched = pool.FindTickets(maxPlayers - match.PlayerCount()) ) - for _, t := range matched { - t.MatchID = &match.ID - m.tickets.Update(t) + for i := range matched { + matched[i].MatchID = &match.ID + m.tickets.Update(matched[i]) } pool.RemoveAll(matched) @@ -209,9 +213,9 @@ func (m FlavorMatchMaker) generateMatches(flavorID string, version *chunkv1alpha match.Full = true } - for _, t := range match.Tickets { - t.MatchID = &match.ID - m.tickets.Update(t) + for i := range match.Tickets { + match.Tickets[i].MatchID = &match.ID + m.tickets.Update(match.Tickets[i]) } m.matches.Add(match) @@ -228,6 +232,12 @@ func (m FlavorMatchMaker) checkAndDeployMatches(ctx context.Context) { logger.Info("found match") + if time.Now().After(match.CreatedAt.Add(m.removeDeployedMatchesAfter)) { + logger.InfoContext(ctx, "removing deployed match") + m.matches.Delete(match.ID) + continue + } + var ( invalidated []Ticket valid []Ticket @@ -267,7 +277,7 @@ func (m FlavorMatchMaker) checkAndDeployMatches(ctx context.Context) { continue } - if time.Now().After(match.CreatedAt.Add(m.allocInstanceForPendingMatchAfter)) { + if time.Now().After(match.CreatedAt.Add(m.allocInstanceForPendingMatchAfter)) && match.InstanceAllocatedAt == nil { m.logger.Info("pending match created") if err := m.AllocateInstanceAndAssign(ctx, match); err != nil { logger.ErrorContext(ctx, "failed to allocate instance", "err", err) @@ -308,7 +318,8 @@ func (m FlavorMatchMaker) AllocateInstanceAndAssign(ctx context.Context, match M return match.ID == matchID }) - m.matches.Delete(match.ID) + match.InstanceAllocatedAt = new(time.Now()) + m.matches.Update(match) return nil } diff --git a/internal/matchmaking/types.go b/internal/matchmaking/types.go index e20d78e..08bbbf5 100644 --- a/internal/matchmaking/types.go +++ b/internal/matchmaking/types.go @@ -53,13 +53,14 @@ type Assignment struct { } type Match struct { - ID string - Tickets TicketList - Full bool - ChunkID string - FlavorID string - FlavorVersion *chunkv1alpha1.FlavorVersion - CreatedAt time.Time + ID string + Tickets TicketList + Full bool + ChunkID string + FlavorID string + FlavorVersion *chunkv1alpha1.FlavorVersion + CreatedAt time.Time + InstanceAllocatedAt *time.Time } func (m Match) GetID() string { diff --git a/internal/server/endpoints.go b/internal/server/endpoints.go index 4a3dcc7..a9339ea 100644 --- a/internal/server/endpoints.go +++ b/internal/server/endpoints.go @@ -34,23 +34,32 @@ func (s Server) GetTicket( _ context.Context, req *mmv1alpha1.GetTicketRequest, ) (*mmv1alpha1.GetTicketResponse, error) { - t := s.tickets.Get(req.TicketId) - if t == nil { + ticket := s.tickets.Get(req.TicketId) + if ticket == nil { return nil, status.Error(codes.NotFound, "ticket not found") } ret := &mmv1alpha1.GetTicketResponse{ Ticket: &mmv1alpha1.Ticket{ - Id: t.ID, - FlavorId: t.FlavorID, - PlayerCount: t.PlayerCount, - Status: mmv1alpha1.TicketStatus(t.Status), + Id: ticket.ID, + FlavorId: ticket.FlavorID, + PlayerCount: ticket.PlayerCount, + Status: mmv1alpha1.TicketStatus(ticket.Status), }, } - if t.Assignment != nil { + if ticket.Assignment != nil { ret.Ticket.Assignment = &mmv1alpha1.Assignment{ - InstanceId: t.Assignment.InstanceID, + InstanceId: ticket.Assignment.InstanceID, + } + } + + if ticket.MatchID != nil { + if m := s.matches.Get(*ticket.MatchID); m != nil { + ret.Ticket.Match = &mmv1alpha1.Match{ + Id: m.ID, + PlayerCount: m.PlayerCount(), + } } } diff --git a/internal/server/server.go b/internal/server/server.go index 7b068ca..16087be 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -44,13 +44,20 @@ type Server struct { logger *slog.Logger cfg Config tickets *matchmaking.Store[matchmaking.Ticket] + matches *matchmaking.Store[matchmaking.Match] } -func New(logger *slog.Logger, config Config, tickets *matchmaking.Store[matchmaking.Ticket]) *Server { +func New( + logger *slog.Logger, + config Config, + tickets *matchmaking.Store[matchmaking.Ticket], + matches *matchmaking.Store[matchmaking.Match], +) *Server { return &Server{ logger: logger, cfg: config, tickets: tickets, + matches: matches, } } @@ -62,6 +69,7 @@ type Config struct { MatchInterval time.Duration `mapstructure:"match_interval"` AllocateInstanceForPendingMatchAfter time.Duration `mapstructure:"allocate_instance_for_pending_match_after"` RemoveInactiveTicketsAfter time.Duration `mapstructure:"remove_inactive_tickets_after"` + RemoveDeployedMatchesAfter time.Duration `mapstructure:"remove_deployed_matches_after"` } func (s Server) Run(ctx context.Context) error { @@ -118,7 +126,9 @@ func (s Server) Run(ctx context.Context) error { s.cfg.MatchInterval, s.cfg.AllocateInstanceForPendingMatchAfter, s.cfg.RemoveInactiveTicketsAfter, + s.cfg.RemoveDeployedMatchesAfter, s.tickets, + s.matches, chunkv1alpha1.NewChunkServiceClient(conn), instancev1alpha1.NewInstanceServiceClient(conn), ) diff --git a/test/functional/suite_test.go b/test/functional/suite_test.go index 4e8e541..192d406 100644 --- a/test/functional/suite_test.go +++ b/test/functional/suite_test.go @@ -45,6 +45,7 @@ var ( MatchInterval: 100 * time.Millisecond, AllocateInstanceForPendingMatchAfter: 1 * time.Second, RemoveInactiveTicketsAfter: 3 * time.Second, + RemoveDeployedMatchesAfter: 4 * time.Second, } workingFlavor1 = &chunkv1alpha1.Flavor{ @@ -119,8 +120,13 @@ var _ = Describe("matchmaking", func() { config.ControlPlaneAddr = fmt.Sprintf("localhost:%d", 31000+rand.IntN(10000)) var ( - logger = slog.New(slog.NewTextHandler(GinkgoWriter, nil)) - serv = server.New(logger, config, matchmaking.NewStore[matchmaking.Ticket]()) + logger = slog.New(slog.NewTextHandler(GinkgoWriter, nil)) + serv = server.New( + logger, + config, + matchmaking.NewStore[matchmaking.Ticket](), + matchmaking.NewStore[matchmaking.Match](), + ) fakceCP = FakeControlPlane{ flavors: map[string]*chunkv1alpha1.Flavor{ workingFlavor1.Id: workingFlavor1, @@ -180,6 +186,11 @@ var _ = Describe("matchmaking", func() { g.Expect(updated1.Assignment).NotTo(BeNil()) g.Expect(updated2.Assignment).NotTo(BeNil()) g.Expect(updated1.Assignment.InstanceId).To(Equal(updated2.Assignment.InstanceId)) + + g.Expect(updated1.Match).NotTo(BeNil()) + g.Expect(updated2.Match).NotTo(BeNil()) + g.Expect(updated1.Match.Id).To(Equal(updated2.Match.Id)) + g.Expect(updated1.Match.PlayerCount).To(Equal(updated1.PlayerCount + updated2.PlayerCount)) }).WithTimeout(10 * time.Second).Should(Succeed()) }) @@ -211,6 +222,14 @@ var _ = Describe("matchmaking", func() { insID := updated1.Assignment.InstanceId g.Expect(updated2.Assignment.InstanceId).To(Equal(insID)) g.Expect(updated3.Assignment.InstanceId).To(Equal(insID)) + + g.Expect(updated1.Match).NotTo(BeNil()) + g.Expect(updated2.Match).NotTo(BeNil()) + g.Expect(updated3.Match).NotTo(BeNil()) + + matchID := updated1.Match.Id + g.Expect(updated2.Match.Id).To(Equal(matchID)) + g.Expect(updated3.Match.Id).To(Equal(matchID)) }).WithTimeout(10 * time.Second).Should(Succeed()) }) @@ -244,6 +263,15 @@ var _ = Describe("matchmaking", func() { // make sure they do not equal one another, these should be two distinct matches g.Expect(updated1.Assignment.InstanceId).NotTo(Equal(updated3.Assignment.InstanceId)) g.Expect(updated4.Assignment.InstanceId).NotTo(Equal(updated2.Assignment.InstanceId)) + + g.Expect(updated1.Match).NotTo(BeNil()) + g.Expect(updated2.Match).NotTo(BeNil()) + g.Expect(updated3.Match).NotTo(BeNil()) + g.Expect(updated4.Match).NotTo(BeNil()) + + g.Expect(updated1.Match.Id).NotTo(Equal(updated3.Match.Id)) + g.Expect(updated4.Match.Id).NotTo(Equal(updated2.Match.Id)) + }).WithTimeout(10 * time.Second).Should(Succeed()) }) @@ -263,6 +291,9 @@ var _ = Describe("matchmaking", func() { g.Expect(updated1.Assignment).To(BeNil()) g.Expect(updated2.Assignment).To(BeNil()) + + g.Expect(updated1.Match).To(BeNil()) + g.Expect(updated2.Match).To(BeNil()) }, "5s").Should(Succeed()) }) @@ -284,6 +315,10 @@ var _ = Describe("matchmaking", func() { g.Expect(updated1.Assignment).To(BeNil()) g.Expect(updated2.Assignment).To(BeNil()) g.Expect(updated3.Assignment).To(BeNil()) + + g.Expect(updated1.Match).To(BeNil()) + g.Expect(updated2.Match).To(BeNil()) + g.Expect(updated3.Match).To(BeNil()) }, "2s").Should(Succeed()) }) @@ -294,7 +329,7 @@ var _ = Describe("matchmaking", func() { ticket2 = createTicket(ctx, client, flavorID, 2) ) - time.Sleep(300 * time.Millisecond) + time.Sleep(100 * time.Millisecond) activateTicket(ctx, client, ticket2.Id) @@ -307,7 +342,11 @@ var _ = Describe("matchmaking", func() { g.Expect(updated1.Assignment).NotTo(BeNil()) g.Expect(updated2.Assignment).NotTo(BeNil()) g.Expect(updated1.Assignment.InstanceId).To(Equal(updated2.Assignment.InstanceId)) - }).WithTimeout(10 * time.Second).Should(Succeed()) + + g.Expect(updated1.Match).NotTo(BeNil()) + g.Expect(updated2.Match).NotTo(BeNil()) + //g.Expect(updated1.Match.Id).To(Equal(updated2.Match.Id)) + }).WithTimeout(2 * time.Second).Should(Succeed()) }) It("creates 2 different matches when combined player count is greater than maxPlayer", func(ctx SpecContext) { @@ -329,11 +368,17 @@ var _ = Describe("matchmaking", func() { g.Expect(updated2.Assignment).NotTo(BeNil()) g.Expect(updated3.Assignment).NotTo(BeNil()) + g.Expect(updated1.Match).NotTo(BeNil()) + g.Expect(updated2.Match).NotTo(BeNil()) + g.Expect(updated3.Match).NotTo(BeNil()) + // ticket1 is a separate match g.Expect(updated1.Assignment.InstanceId).NotTo(Equal(updated2.Assignment.InstanceId)) + g.Expect(updated1.Match.Id).NotTo(Equal(updated2.Match.Id)) // ticket2 and ticket3 should be matched together g.Expect(updated2.Assignment.InstanceId).To(Equal(updated3.Assignment.InstanceId)) + g.Expect(updated2.Match.Id).To(Equal(updated3.Match.Id)) }, "10s").Should(Succeed()) }) @@ -349,6 +394,7 @@ var _ = Describe("matchmaking", func() { Eventually(func(g Gomega) { updated := fetchTicket(ctx, client, ticket1.Id) g.Expect(updated.Assignment).NotTo(BeNil()) + g.Expect(updated.Match).NotTo(BeNil()) }).WithTimeout(10 * time.Second).Should(Succeed()) Consistently(func(g Gomega) { @@ -358,6 +404,8 @@ var _ = Describe("matchmaking", func() { ) g.Expect(updated2.Assignment).To(BeNil()) g.Expect(updated3.Assignment).To(BeNil()) + g.Expect(updated2.Match).To(BeNil()) + g.Expect(updated3.Match).To(BeNil()) }, "2s").Should(Succeed()) }) @@ -376,6 +424,8 @@ var _ = Describe("matchmaking", func() { g.Expect(updated1.Assignment).To(BeNil()) g.Expect(updated2.Assignment).To(BeNil()) + g.Expect(updated1.Match).To(BeNil()) + g.Expect(updated2.Match).To(BeNil()) }, "2s").Should(Succeed()) }) @@ -460,7 +510,7 @@ var _ = Describe("matchmaking", func() { removeTicket(ctx, client, ticket1.Id) // give the server some time to remove the ticket from the store - time.Sleep(50 * time.Millisecond) + time.Sleep(100 * time.Millisecond) Consistently(func(g Gomega) { _, err := client.GetTicket(ctx, &mmv1alpha1.GetTicketRequest{ @@ -470,6 +520,7 @@ var _ = Describe("matchmaking", func() { updated2 := fetchTicket(ctx, client, ticket2.Id) g.Expect(updated2.Assignment).To(BeNil()) + g.Expect(updated2.Match).To(BeNil()) }, "2s").Should(Succeed()) }) })