Skip to content

Commit f942aaa

Browse files
authored
Merge pull request #5 from EmbarkStudios/do/get-indexed-ticket-ticket-count
feat: add endpoint to return num of active cached tickets
2 parents 6718ab2 + 5aeeea7 commit f942aaa

File tree

86 files changed

+1775
-1305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1775
-1305
lines changed

api/frontend.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ message DeleteTicketsRequest {
136136
repeated string ticket_ids = 1;
137137
}
138138

139+
message GetIndexedTicketCountRequest{
140+
141+
}
142+
143+
message GetIndexedTicketCountResponse{
144+
int32 count =1;
145+
}
146+
139147
// The FrontendService implements APIs to manage and query status of a Tickets.
140148
service FrontendService {
141149
// CreateTicket assigns an unique TicketId to the input Ticket and record it in state storage.
@@ -240,4 +248,11 @@ service FrontendService {
240248
delete: "/v1/frontendservice/tickets"
241249
};
242250
}
251+
252+
// GetIndexedTicketCount returns the count of tickets currently indexed
253+
rpc GetIndexedTicketCount(GetIndexedTicketCountRequest) returns (GetIndexedTicketCountResponse) {
254+
option (google.api.http) = {
255+
get: "/v1/frontendservice/tickets/count"
256+
};
257+
}
243258
}

api/frontend.swagger.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,36 @@
354354
]
355355
}
356356
},
357+
"/v1/frontendservice/tickets/count": {
358+
"get": {
359+
"summary": "GetIndexedTicketCount returns the count of tickets currently indexed",
360+
"operationId": "FrontendService_GetIndexedTicketCount",
361+
"responses": {
362+
"200": {
363+
"description": "A successful response.",
364+
"schema": {
365+
"$ref": "#/definitions/openmatchGetIndexedTicketCountResponse"
366+
}
367+
},
368+
"404": {
369+
"description": "Returned when the resource does not exist.",
370+
"schema": {
371+
"type": "string",
372+
"format": "string"
373+
}
374+
},
375+
"default": {
376+
"description": "An unexpected error response.",
377+
"schema": {
378+
"$ref": "#/definitions/rpcStatus"
379+
}
380+
}
381+
},
382+
"tags": [
383+
"FrontendService"
384+
]
385+
}
386+
},
357387
"/v1/frontendservice/tickets/{ticket_id}": {
358388
"get": {
359389
"summary": "GetTicket get the Ticket associated with the specified TicketId.",
@@ -601,6 +631,15 @@
601631
}
602632
}
603633
},
634+
"openmatchGetIndexedTicketCountResponse": {
635+
"type": "object",
636+
"properties": {
637+
"count": {
638+
"type": "integer",
639+
"format": "int32"
640+
}
641+
}
642+
},
604643
"openmatchSearchFields": {
605644
"type": "object",
606645
"properties": {

go.mod

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@ require (
3232
github.com/golang/protobuf v1.5.4
3333
github.com/gomodule/redigo v2.0.1-0.20191111085604-09d84710e01a+incompatible
3434
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
35-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3
35+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.2
3636
github.com/pkg/errors v0.9.1
3737
github.com/prometheus/client_golang v1.16.0
3838
github.com/rs/xid v1.5.0
3939
github.com/sirupsen/logrus v1.9.3
4040
github.com/spf13/viper v1.16.0
41-
github.com/stretchr/testify v1.9.0
41+
github.com/stretchr/testify v1.10.0
4242
go.opencensus.io v0.24.0
43-
golang.org/x/net v0.35.0
44-
golang.org/x/sync v0.11.0
43+
golang.org/x/net v0.41.0
44+
golang.org/x/sync v0.16.0
4545
google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect
46-
google.golang.org/grpc v1.70.0
47-
google.golang.org/protobuf v1.36.6
46+
google.golang.org/grpc v1.75.0
47+
google.golang.org/protobuf v1.36.8
4848
k8s.io/api v0.28.0 // kubernetes-1.14.10
4949
k8s.io/apimachinery v0.28.0
5050
k8s.io/client-go v0.28.0
5151
)
5252

5353
require (
54-
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb
55-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb
54+
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c
55+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c
5656
)
5757

5858
require (
59-
cloud.google.com/go/compute/metadata v0.5.2 // indirect
59+
cloud.google.com/go/compute/metadata v0.7.0 // indirect
6060
cloud.google.com/go/monitoring v1.16.3 // indirect
6161
cloud.google.com/go/trace v1.10.4 // indirect
6262
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect
@@ -69,7 +69,7 @@ require (
6969
github.com/felixge/httpsnoop v1.0.4 // indirect
7070
github.com/go-kit/log v0.2.1 // indirect
7171
github.com/go-logfmt/logfmt v0.6.0 // indirect
72-
github.com/go-logr/logr v1.4.2 // indirect
72+
github.com/go-logr/logr v1.4.3 // indirect
7373
github.com/go-logr/stdr v1.2.2 // indirect
7474
github.com/go-openapi/jsonpointer v0.20.0 // indirect
7575
github.com/go-openapi/jsonreference v0.20.2 // indirect
@@ -112,16 +112,17 @@ require (
112112
github.com/spf13/pflag v1.0.5 // indirect
113113
github.com/subosito/gotenv v1.6.0 // indirect
114114
github.com/yuin/gopher-lua v1.1.0 // indirect
115+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
115116
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
116117
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
117-
go.opentelemetry.io/otel v1.32.0 // indirect
118-
go.opentelemetry.io/otel/metric v1.32.0 // indirect
119-
go.opentelemetry.io/otel/trace v1.32.0 // indirect
120-
golang.org/x/crypto v0.33.0 // indirect
121-
golang.org/x/oauth2 v0.27.0 // indirect
122-
golang.org/x/sys v0.30.0 // indirect
123-
golang.org/x/term v0.29.0 // indirect
124-
golang.org/x/text v0.22.0 // indirect
118+
go.opentelemetry.io/otel v1.37.0 // indirect
119+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
120+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
121+
golang.org/x/crypto v0.39.0 // indirect
122+
golang.org/x/oauth2 v0.30.0 // indirect
123+
golang.org/x/sys v0.33.0 // indirect
124+
golang.org/x/term v0.32.0 // indirect
125+
golang.org/x/text v0.28.0 // indirect
125126
golang.org/x/time v0.5.0 // indirect
126127
google.golang.org/api v0.155.0 // indirect
127128
gopkg.in/inf.v0 v0.9.1 // indirect

0 commit comments

Comments
 (0)