mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-15 19:19:28 +00:00
Compare commits
30 Commits
release-1.
...
main
Author | SHA1 | Date | |
---|---|---|---|
d781be1a3c | |||
ea02b531ad | |||
02aa4781ae | |||
493b702723 | |||
4eb2ff5e62 | |||
879e2efcc4 | |||
3b3d49b1fe | |||
4dca40d85f | |||
c58996da62 | |||
8474eca3cc | |||
2ac12b1c83 | |||
dbda6c8dc1 | |||
98e7a02ebf | |||
3d1bae2021 | |||
7070f056df | |||
4c2544f043 | |||
2e6aa4f36f | |||
50b4063bee | |||
31a4a45d73 | |||
67be35006c | |||
d0ce1b317f | |||
93cd5c7a9f | |||
3193921816 | |||
7a3bb82089 | |||
a4eb6d6cbd | |||
927a976a10 | |||
33efc848ff | |||
04c019c6cb | |||
1e51ad859c | |||
fdd8783a34 |
.github
.golangci.yamlDockerfile.base-buildDockerfile.ciMakefileREADME.mdapi
backend.swagger.jsonevaluator.swagger.jsonfrontend.swagger.jsonmatchfunction.swagger.jsonquery.swagger.json
cloudbuild.yamlexamples
functions/golang/backfill/mmf
scale/scenarios
install
helm
README.md
open-match
Chart.yaml
subcharts
open-match-customize/templates
open-match-telemetry
templates
_helpers.tplbackend.yamlfrontend.yamlom-configmap-default.yamlom-configmap-override.yamlpodsecuritypolicy.yamlquery.yamlservice-account.yaml
values-production.yamlvalues.yamltests
policies
terraform/open-match-build
internal
app
backend
evaluator
frontend
query
config
filter
ipb
logging
rpc
statestore
telemetry
util/testing
pkg/pb
backend.pb.gobackend.pb.gw.gobackend_grpc.pb.goevaluator.pb.goevaluator.pb.gw.goevaluator_grpc.pb.goextensions.pb.gofrontend.pb.gofrontend.pb.gw.gofrontend_grpc.pb.gomatchfunction.pb.gomatchfunction.pb.gw.gomatchfunction_grpc.pb.gomessages.pb.goquery.pb.goquery.pb.gw.goquery_grpc.pb.go
testing
e2e
README.mdbackfill_test.gocluster.gocluster_test.gocommon.gofetch_matches_test.goin_memory.goquery_backfills_test.goquery_tickets_test.goticket_test.go
fake_frontend.gommf
third_party
tools/reaper/internal
tutorials
custom_evaluator
director
evaluator
frontend
matchfunction
solution
director
evaluator
frontend
matchfunction
default_evaluator
director
frontend
matchfunction
solution
director
frontend
matchfunction
matchmaker101
director
frontend
matchfunction
solution
matchmaker102
director
frontend
matchfunction
solution
redis-enterprise-cloud
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -1 +1 @@
|
||||
* @laremere @aLekSer @HazWard @calebatwd @syntxerror @sawagh @andrewgrundy @scosgrave @mridulji
|
||||
* @laremere @aLekSer @calebatwd @syntxerror @sawagh @amg84 @scosgrave @mridulji @markmandel @joeholley @kazshinohara @kemurayama @govargo @ashutosji
|
||||
|
70
.github/ISSUE_TEMPLATE/release.md
vendored
70
.github/ISSUE_TEMPLATE/release.md
vendored
@ -37,7 +37,7 @@ then you'll need to create the release branch.
|
||||
|
||||
```shell
|
||||
# Create a local release branch.
|
||||
git checkout -b release-0.5 upstream/master
|
||||
git checkout -b release-0.5 upstream/main
|
||||
# Push the branch upstream.
|
||||
git push upstream release-0.5
|
||||
```
|
||||
@ -49,7 +49,7 @@ otherwise there should already be a `release-0.5` branch so run,
|
||||
git checkout -b release-0.5 upstream/release-0.5
|
||||
```
|
||||
|
||||
**NOTE: The branch name must be in the format, `release-X.Y` otherwise**
|
||||
**NOTE: The branch name must be in the format, `release-X.Y.Z` otherwise**
|
||||
**some artifacts will not be pushed.**
|
||||
|
||||
## Releases & Versions
|
||||
@ -76,7 +76,7 @@ Hot Fixes:
|
||||
|
||||
Preview:
|
||||
|
||||
* Rare, a one off release cut from the master branch to provide early access
|
||||
* Rare, a one off release cut from the main branch to provide early access
|
||||
to APIs or some other major change.
|
||||
* **NOTE: There's no branch for this release.**
|
||||
* Example: 0.5-preview.1
|
||||
@ -97,8 +97,8 @@ releases. Find {version} and replace with the current release (e.g. 0.5.0)
|
||||
only required once.**
|
||||
|
||||
- [ ] Create the branch in the **upstream** repository. It should be named
|
||||
release-X.Y. Example: release-0.5. At this point there's effectively a code
|
||||
freeze for this version and all work on master will be included in a future
|
||||
release-X.Y.Z. Example: release-0.5. At this point there's effectively a code
|
||||
freeze for this version and all work on main will be included in a future
|
||||
version. If you're on the branch that you created in the *getting setup*
|
||||
section above you should be able to push upstream.
|
||||
|
||||
@ -106,17 +106,16 @@ only required once.**
|
||||
git push origin release-0.5
|
||||
```
|
||||
|
||||
- [ ] Announce a PR freeze on release-X.Y branch on [open-match-discuss@](mailing-list-post).
|
||||
- [ ] Announce a PR freeze on release-X.Y.Z branch on [open-match-discuss@](https://groups.google.com/forum/#!forum/open-match-discuss).
|
||||
- [ ] Open the [`Makefile`](makefile-version) and change BASE_VERSION entry.
|
||||
- [ ] Open the [`install/helm/open-match/Chart.yaml`](om-chart-yaml-version) and change the `appVersion` and `version` entries.
|
||||
- [ ] Open the [`install/helm/open-match/values.yaml`](om-values-yaml-version) and change the `tag` entries.
|
||||
- [ ] Open the [`cloudbuild.yaml`] and change the `_OM_VERSION` entry.
|
||||
- [ ] There might be additional references to the old version but be careful not to change it for places that have it for historical purposes.
|
||||
- [ ] Run `make release`
|
||||
- [ ] Run `make api/api.md` in open-match repo to update the auto-generated API references in open-match-docs repo.
|
||||
- [ ] Update usage requirements in the Installation doc - e.g. supported minikube version, kubectl version, golang version, etc.
|
||||
- [ ] Create a PR with the changes, include the release candidate name, and point it to the release branch.
|
||||
- [ ] Go to [open-match-build](https://pantheon.corp.google.com/cloud-build/triggers?project=open-match-build) and update all *post submit* triggers' `_GCB_LATEST_VERSION` value to the `X.Y` of the release. This value should only increase as it's used to determine the latest stable version.
|
||||
- [ ] Merge your changes once the PR is approved.
|
||||
- [ ] Go to [open-match-build](https://pantheon.corp.google.com/cloud-build/triggers?project=open-match-build) and update all *post submit* triggers' `_GCB_LATEST_VERSION` value to the `X.Y.Z` of the release. This value should only increase as it's used to determine the latest stable version.
|
||||
- [ ] Merge your changes once the PR is approved. Note: the helm chart is not published to the public registry until the merge is complete (it's a second cloud build trigger upon merge), so you won't be able to do final release testing until after all checks/approvals are finished!
|
||||
|
||||
## Create a release branch in the upstream open-match-docs repository
|
||||
- [ ] Open [`Makefile`](makefile-version) and change BASE_VERSION entry.
|
||||
@ -131,53 +130,46 @@ git push origin release-0.5
|
||||
only required once.**
|
||||
- [ ] Create the next [version milestone](https://github.com/googleforgames/open-match/milestones) and use [semantic versioning](https://semver.org/) when naming it to be consistent with the [Go community](https://blog.golang.org/versioning-proposal).
|
||||
- [ ] Create a *draft* [release](https://github.com/googleforgames/open-match/releases). Note that github has both "Pre-release" and "draft" as different concepts for a release. Until the release is finalized, only use "Save draft", and do not use "Publish release".
|
||||
- [ ] Use the [release template](https://github.com/googleforgames/open-match/blob/master/docs/governance/templates/release.md)
|
||||
- [ ] `Tag` = v{version}. Example: v0.5.0. Append -rc.# for release candidates. Example: v0.5.0-rc.1.
|
||||
- [ ] `Target` = release-X.Y. Example: release-0.5.
|
||||
- [ ] `Release Title` = `Tag`
|
||||
- [ ] `Write` section will contain the contents from the [release template](https://github.com/googleforgames/open-match/blob/master/docs/governance/templates/release.md).
|
||||
- [ ] Add the milestone to all PRs and issues that were merged since the last milestone. Look at the [releases page](https://github.com/googleforgames/open-match/releases) and look for the "X commits to master since this release" for the diff.
|
||||
- [ ] Review all [milestone-less closed issues](https://github.com/googleforgames/open-match/issues?q=is%3Aissue+is%3Aclosed+no%3Amilestone) and assign the appropriate milestone.
|
||||
- [ ] Review all [issues in milestone](https://github.com/googleforgames/open-match/milestones) for proper [labels](https://github.com/googleforgames/open-match/labels) (ex: area/build).
|
||||
- [ ] Use the [release template](https://github.com/googleforgames/open-match/blob/main/docs/governance/templates/release.md)
|
||||
- [ ] `Tag = v{version}` (Example: v0.5.0. Append -rc.# for release candidates. Example: v0.5.0-rc.1.)
|
||||
- [ ] `Target = release-X.Y.Z` (Example: release-0.5.)
|
||||
- [ ] `Release Title = v{version}` (Must match `Tag`)
|
||||
- [ ] `Write` section will contain the contents from the [release template](https://github.com/googleforgames/open-match/blob/main/docs/governance/templates/release.md).
|
||||
- [ ] Add the milestone to all PRs and issues that were merged since the last milestone. Look at the [releases page](https://github.com/googleforgames/open-match/releases) and look for the "X commits to main since this release" for the diff.
|
||||
- [ ] Review all [milestone-less closed PRs](https://github.com/googleforgames/open-match/pulls?q=is%3Apr+is%3Aclosed+no%3Amilestone) and assign the appropriate milestone.
|
||||
- [ ] Review all [PRs in milestone](https://github.com/googleforgames/open-match/milestones) for proper [labels](https://github.com/googleforgames/open-match/labels) (ex: area/build).
|
||||
- [ ] View all open entries in milestone and move them to a future milestone if they aren't getting closed in time. https://github.com/googleforgames/open-match/milestones/v{version}
|
||||
- [ ] Review all closed PRs against the milestone. Put the user visible changes into the release notes using the suggested format. https://github.com/googleforgames/open-match/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+is%3Amerged+milestone%3Av{version}
|
||||
- [ ] Review all closed issues against the milestone. Put the user visible changes into the release notes using the suggested format. https://github.com/googleforgames/open-match/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+milestone%3Av{version}
|
||||
- [ ] Verify the [milestone](https://github.com/googleforgames/open-match/milestones) is effectively 100% at this point with the exception of the release issue itself.
|
||||
- [ ] Verify everything in the [milestone](https://github.com/googleforgames/open-match/milestones) is complete with the exception of the release issue itself.
|
||||
|
||||
## Build Artifacts
|
||||
## Build And Test Artifacts
|
||||
|
||||
- [ ] Go to the History section and find the "Post Submit" build of the merged commit that's running. Wait for it to go Green. If it's red, fix error repeat this section. Take note of the docker image version tag for next step. Example: 0.5.0-a4706cb.
|
||||
- [ ] Navigate to the [Cloud Console](https://console.cloud.google.com) in a browser and open the [Cloud Build History section](https://console.cloud.google.com/cloud-build/builds?project=open-match-build) and find the latest "Post Submit" build (trigger id: 9a451c7a-197b-4a38-a612-21f4c53c42fd) of the merged commit. The build may still be running, if so wait for it to finish. If it failed, fix the error and repeat this section. Open the build details and click on step 12, "Build: Docker Images". Take note of the docker image version tag near the top of the build log. This is the "{source version tag}" referenced in various commands below. Example: `0.5.0-a4706cb`.
|
||||
- [ ] Run `./docs/governance/templates/release.sh {source version tag} {version}` to copy the images to open-match-public-images.
|
||||
- [ ] If this is a new minor version in the newest major version then run `./docs/governance/templates/release.sh {source version tag} latest`.
|
||||
- [ ] Once the images have successfully been pushed to the registry, modify the line `open-match.dev/open-match v0.0.0-dev` in all `go.mod` files in the [Tutorials] (https://github.com/googleforgames/open-match/tree/main/tutorials) directory to use the current release version. This includes all solution subdirectories as well
|
||||
- [ ] Use the files under the `build/release/` directory for the Open Match installation guide. Make sure the artifacts work as expected - these are the artifacts that will be published to the GCS bucket and used in our release assets.
|
||||
- [ ] Copy the files from `build/release/` generated from `make release` to the release draft you created. You can drag and drop the files using the Github UI.
|
||||
- [ ] Update [Slack invitation link](https://slack.com/help/articles/201330256-invite-new-members-to-your-workspace#share-an-invite-link) in [open-match.dev](https://open-match.dev/site/docs/contribute/#get-involved).
|
||||
- [ ] Test Open Match installation under GKE and Minikube enviroment using YAML files and Helm. Follow the [First Match](https://development.open-match.dev/site/docs/getting-started/first_match/) guide, run `make proxy-demo`, and open `localhost:51507` to make sure everything works.
|
||||
- [ ] If this is not a release candidate or preview but a full release, run `./docs/governance/templates/release.sh {source version tag} latest` to tag these public images as the default version to pull from the registry.
|
||||
- [ ] Once the images have successfully been pushed to the registry, modify the line `open-match.dev/open-match v0.0.0-dev` in all `go.mod` files in the [Tutorials] (https://github.com/googleforgames/open-match/tree/main/tutorials) directory to use the current release version for the remainder of your local release testing. This includes all solution subdirectories as well. This change is local only and doesn't get committed to git.
|
||||
- [ ] Copy the installation files named `{sequence_number}-{component}.yaml` (example: `01-open-match-core.yaml`) from the [build folder in the private open-match-build-artifacts GCS bucket https://storage.mtls.cloud.google.com/open-match-build-artifacts/{version}](https://console.cloud.google.com/storage/browser/open-match-build-artifacts?project=open-match-build) to the release draft you created. Download them to your local machine, and then attach them to the draft using the Github UI. Note: the `05-jaeger.yaml` file no longer exists after release 1.8, so don't be surprised if that number is missing.
|
||||
- [ ] Update the [Slack invitation link](https://slack.com/help/articles/201330256-invite-new-members-to-your-workspace#share-an-invite-link) in [open-match.dev](https://open-match.dev/site/docs/contribute/#get-involved).
|
||||
- [ ] Test Open Match installation under GKE and Minikube enviroment using the YAML files attached to the release and the latest Helm chart, pulled from the public helm repo (not your local copy from github). Follow the [First Match](https://development.open-match.dev/site/docs/getting-started/first_match/) guide, run `make proxy-demo`, and open `localhost:51507` to make sure everything works.
|
||||
- [ ] Minikube: Run `make create-mini-cluster` to create a local cluster with latest Kubernetes API version.
|
||||
- [ ] GKE: Run `make create-gke-cluster` to create a GKE cluster.
|
||||
- [ ] Helm: Run `helm install open-match -n open-match open-match/open-match`
|
||||
- [ ] Update usage requirements in the Installation doc - e.g. supported minikube version, kubectl version, golang version, etc.
|
||||
- [ ] Helm: Run `helm install open-match -n open-match open-match/open-match`. Note, the helm chart for the release is not public until the PR has been merged, so you cannot complete this step until after the PR is closed and the 'Tagged Build' trigger (trigger ID: 083adc1a-fcac-4033-bc38-b9f6eadcb75d) has completed, which publishes the helm chart.
|
||||
|
||||
## Finalize
|
||||
|
||||
- [ ] Save the release as a draft.
|
||||
- [ ] Make sure your release draft reflects all steps up to this point, and is saved (so contributors can review it).
|
||||
- [ ] Circulate the draft release to active contributors. Where reasonable, get everyone's ok on the release notes before continuing.
|
||||
- [ ] Publish the [Release](om-release) in Github. This will notify repository watchers.
|
||||
- [ ] Publish the [Release](om-release) on Open Match [Blog](https://open-match.dev/site/blog/).
|
||||
|
||||
## Announce
|
||||
|
||||
- [ ] Send an email to the [mailing list](mailing-list-post) with the release details (copy-paste the release blog post)
|
||||
- [ ] Send a chat on the [Slack channel](om-slack). "Open Match {version} has been released! Check it out at {release url}."
|
||||
- [ ] Send an email to the [mailing list](https://groups.google.com/forum/#!newtopic/open-match-discuss) with the release details (copy-paste the release blog post)
|
||||
- [ ] Send a chat on the [Slack channel](https://open-match.slack.com/). "Open Match {version} has been released! Check it out at {release url}."
|
||||
|
||||
[om-slack]: https://open-match.slack.com/
|
||||
[mailing-list-post]: https://groups.google.com/forum/#!newtopic/open-match-discuss
|
||||
[release-template]: https://github.com/googleforgames/open-match/blob/master/docs/governance/templates/release.md
|
||||
[makefile-version]: https://github.com/googleforgames/open-match/blob/master/Makefile#L53
|
||||
[om-chart-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/Chart.yaml#L16
|
||||
[om-values-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/values.yaml#L16
|
||||
[makefile-version]: https://github.com/googleforgames/open-match/blob/main/Makefile#L53
|
||||
[om-chart-yaml-version]: https://github.com/googleforgames/open-match/blob/main/install/helm/open-match/Chart.yaml#L16
|
||||
[om-values-yaml-version]: https://github.com/googleforgames/open-match/blob/main/install/helm/open-match/values.yaml#L16
|
||||
[om-release]: https://github.com/googleforgames/open-match/releases/new
|
||||
[readme-deploy]: https://github.com/googleforgames/open-match/blob/master/README.md#deploy-to-kubernetes
|
||||
[readme-deploy]: https://github.com/googleforgames/open-match/blob/main/README.md#deploy-to-kubernetes
|
||||
|
@ -175,6 +175,7 @@ linters:
|
||||
- gosec
|
||||
- interfacer # deprecated - "A tool that suggests interfaces is prone to bad suggestions"
|
||||
- lll
|
||||
- typecheck
|
||||
|
||||
#linters:
|
||||
# enable-all: true
|
||||
|
@ -13,8 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
|
||||
FROM golang:1.14.0
|
||||
ENV GO111MODULE=on
|
||||
FROM golang:1.21.5
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match
|
||||
|
||||
|
100
Dockerfile.ci
100
Dockerfile.ci
@ -11,47 +11,65 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
FROM debian:bookworm
|
||||
|
||||
FROM debian
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y -qq git make python3 virtualenv curl sudo unzip apt-transport-https ca-certificates curl software-properties-common gnupg2
|
||||
|
||||
# Docker
|
||||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
||||
RUN sudo apt-key fingerprint 0EBFCD88
|
||||
RUN sudo add-apt-repository \
|
||||
"deb [arch=amd64] https://download.docker.com/linux/debian \
|
||||
stretch \
|
||||
stable"
|
||||
RUN sudo apt-get update
|
||||
RUN sudo apt-get install -y -qq docker-ce docker-ce-cli containerd.io
|
||||
|
||||
# Cloud SDK
|
||||
RUN export CLOUD_SDK_REPO="cloud-sdk-stretch" && \
|
||||
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
|
||||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
|
||||
apt-get update -y && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-go -y -qq
|
||||
|
||||
# Install Golang
|
||||
# https://github.com/docker-library/golang/blob/master/1.14/stretch/Dockerfile
|
||||
RUN mkdir -p /toolchain/golang
|
||||
WORKDIR /toolchain/golang
|
||||
RUN sudo rm -rf /usr/local/go/
|
||||
|
||||
# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
|
||||
RUN curl -L https://golang.org/dl/go1.14.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
|
||||
|
||||
ENV GOPATH /go
|
||||
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
|
||||
|
||||
RUN sudo mkdir -p "$GOPATH/src" "$GOPATH/bin" \
|
||||
&& sudo chmod -R 777 "$GOPATH"
|
||||
|
||||
# Prepare toolchain and workspace
|
||||
RUN mkdir -p /toolchain
|
||||
|
||||
WORKDIR /workspace
|
||||
# set env vars
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV OPEN_MATCH_CI_MODE=1
|
||||
ENV KUBECONFIG=$HOME/.kube/config
|
||||
RUN mkdir -p $HOME/.kube/
|
||||
ENV GOPATH=/go
|
||||
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y -qq --no-install-recommends \
|
||||
apt-utils \
|
||||
git \
|
||||
make \
|
||||
python3 \
|
||||
virtualenv \
|
||||
curl \
|
||||
sudo \
|
||||
unzip \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
software-properties-common \
|
||||
gnupg2 \
|
||||
libc6 \
|
||||
build-essential
|
||||
RUN mkdir -p /usr/share/keyrings/
|
||||
|
||||
# Docker
|
||||
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | tee -a /etc/apt/sources.list.d/docker.list \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y -qq \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
containerd.io
|
||||
|
||||
# Cloud SDK
|
||||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
|
||||
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
|
||||
&& apt-get update -y \
|
||||
&& apt-get install -y -qq \
|
||||
google-cloud-cli \
|
||||
google-cloud-sdk-gke-gcloud-auth-plugin
|
||||
|
||||
# Install Golang
|
||||
RUN mkdir -p /toolchain/golang
|
||||
WORKDIR /toolchain/golang
|
||||
RUN rm -rf /usr/local/go/
|
||||
|
||||
# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
|
||||
# reference: https://github.com/docker-library/golang/blob/master/1.20/bookworm/Dockerfile
|
||||
RUN curl -L https://golang.org/dl/go1.21.5.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \
|
||||
&& chmod -R 777 "$GOPATH"
|
||||
|
||||
# Prepare toolchain, workspace, homedir
|
||||
RUN mkdir -p \
|
||||
/toolchain \
|
||||
/workspace \
|
||||
$HOME/.kube/
|
||||
WORKDIR /workspace
|
||||
|
137
Makefile
137
Makefile
@ -53,7 +53,7 @@
|
||||
# If you want information on how to edit this file checkout,
|
||||
# http://makefiletutorial.com/
|
||||
|
||||
BASE_VERSION = 0.0.0-dev
|
||||
BASE_VERSION = 1.8.1
|
||||
SHORT_SHA = $(shell git rev-parse --short=7 HEAD | tr -d [:punct:])
|
||||
BRANCH_NAME = $(shell git rev-parse --abbrev-ref HEAD | tr -d [:punct:])
|
||||
VERSION = $(BASE_VERSION)-$(SHORT_SHA)
|
||||
@ -61,15 +61,15 @@ BUILD_DATE = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
YEAR_MONTH = $(shell date -u +'%Y%m')
|
||||
YEAR_MONTH_DAY = $(shell date -u +'%Y%m%d')
|
||||
MAJOR_MINOR_VERSION = $(shell echo $(BASE_VERSION) | cut -d '.' -f1).$(shell echo $(BASE_VERSION) | cut -d '.' -f2)
|
||||
PROTOC_VERSION = 3.10.1
|
||||
HELM_VERSION = 3.8.0
|
||||
KUBECTL_VERSION = 1.16.2
|
||||
PROTOC_VERSION = 24.0
|
||||
HELM_VERSION = 3.12.3
|
||||
KUBECTL_VERSION = 1.27.3
|
||||
MINIKUBE_VERSION = latest
|
||||
GOLANGCI_VERSION = 1.18.0
|
||||
KIND_VERSION = 0.5.1
|
||||
SWAGGERUI_VERSION = 3.24.2
|
||||
GOOGLE_APIS_VERSION = aba342359b6743353195ca53f944fe71e6fb6cd4
|
||||
GRPC_GATEWAY_VERSION = 2.3.0
|
||||
GRPC_GATEWAY_VERSION = 2.16.2
|
||||
TERRAFORM_VERSION = 0.12.13
|
||||
CHART_TESTING_VERSION = 2.4.0
|
||||
|
||||
@ -77,7 +77,7 @@ CHART_TESTING_VERSION = 2.4.0
|
||||
REDIS_DEV_PASSWORD = helloworld
|
||||
|
||||
ENABLE_SECURITY_HARDENING = 0
|
||||
GO = GO111MODULE=on go
|
||||
GO = go
|
||||
# Defines the absolute local directory of the open-match project
|
||||
REPOSITORY_ROOT := $(patsubst %/,%,$(dir $(abspath $(MAKEFILE_LIST))))
|
||||
BUILD_DIR = $(REPOSITORY_ROOT)/build
|
||||
@ -100,11 +100,10 @@ GCP_ZONE = us-west1-a
|
||||
GCP_LOCATION = $(GCP_ZONE)
|
||||
EXE_EXTENSION =
|
||||
GCP_LOCATION_FLAG = --zone $(GCP_ZONE)
|
||||
GO111MODULE = on
|
||||
GOLANG_TEST_COUNT = 1
|
||||
GOLANG_EXTRA_TEST_FLAGS =
|
||||
SWAGGERUI_PORT = 51500
|
||||
PROMETHEUS_PORT = 9090
|
||||
JAEGER_QUERY_PORT = 16686
|
||||
GRAFANA_PORT = 3000
|
||||
FRONTEND_PORT = 51504
|
||||
BACKEND_PORT = 51505
|
||||
@ -121,6 +120,7 @@ CERTGEN = $(TOOLCHAIN_BIN)/certgen$(EXE_EXTENSION)
|
||||
GOLANGCI = $(TOOLCHAIN_BIN)/golangci-lint$(EXE_EXTENSION)
|
||||
CHART_TESTING = $(TOOLCHAIN_BIN)/ct$(EXE_EXTENSION)
|
||||
GCLOUD = gcloud --quiet
|
||||
USE_GKE_GCLOUD_AUTH_PLUGIN = True
|
||||
OPEN_MATCH_HELM_NAME = open-match
|
||||
OPEN_MATCH_KUBERNETES_NAMESPACE = open-match
|
||||
OPEN_MATCH_SECRETS_DIR = $(REPOSITORY_ROOT)/install/helm/open-match/secrets
|
||||
@ -189,8 +189,10 @@ else
|
||||
endif
|
||||
|
||||
GOLANG_PROTOS = pkg/pb/backend.pb.go pkg/pb/frontend.pb.go pkg/pb/matchfunction.pb.go pkg/pb/query.pb.go pkg/pb/messages.pb.go pkg/pb/extensions.pb.go pkg/pb/evaluator.pb.go internal/ipb/synchronizer.pb.go internal/ipb/messages.pb.go pkg/pb/backend.pb.gw.go pkg/pb/frontend.pb.gw.go pkg/pb/matchfunction.pb.gw.go pkg/pb/query.pb.gw.go pkg/pb/evaluator.pb.gw.go
|
||||
golang-protos: $(GOLANG_PROTOS)
|
||||
|
||||
SWAGGER_JSON_DOCS = api/frontend.swagger.json api/backend.swagger.json api/query.swagger.json api/matchfunction.swagger.json api/evaluator.swagger.json
|
||||
swagger-json-docs: $(SWAGGER_JSON_DOCS)
|
||||
|
||||
ALL_PROTOS = $(GOLANG_PROTOS) $(SWAGGER_JSON_DOCS)
|
||||
|
||||
@ -228,10 +230,10 @@ build-images: $(foreach IMAGE,$(IMAGES),build-$(IMAGE)-image)
|
||||
# Include all-protos here so that all dependencies are guaranteed to be downloaded after the base image is created.
|
||||
# This is important so that the repository does not have any mutations while building individual images.
|
||||
build-base-build-image: docker $(ALL_PROTOS)
|
||||
DOCKER_BUILDKIT=1 docker build -f Dockerfile.base-build -t open-match-base-build -t $(REGISTRY)/openmatch-base-build:$(TAG) -t $(REGISTRY)/openmatch-base-build:$(ALTERNATE_TAG) .
|
||||
docker build -f Dockerfile.base-build -t open-match-base-build -t $(REGISTRY)/openmatch-base-build:$(TAG) -t $(REGISTRY)/openmatch-base-build:$(ALTERNATE_TAG) .
|
||||
|
||||
$(foreach CMD,$(CMDS),build-$(CMD)-image): build-%-image: docker build-base-build-image
|
||||
DOCKER_BUILDKIT=1 docker build \
|
||||
docker build \
|
||||
-f Dockerfile.cmd \
|
||||
$(IMAGE_BUILD_ARGS) \
|
||||
--build-arg=IMAGE_TITLE=$* \
|
||||
@ -240,10 +242,10 @@ $(foreach CMD,$(CMDS),build-$(CMD)-image): build-%-image: docker build-base-buil
|
||||
.
|
||||
|
||||
build-mmf-go-soloduel-image: docker build-base-build-image
|
||||
DOCKER_BUILDKIT=1 docker build -f examples/functions/golang/soloduel/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(ALTERNATE_TAG) .
|
||||
docker build -f examples/functions/golang/soloduel/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(ALTERNATE_TAG) .
|
||||
|
||||
build-mmf-go-backfill-image: docker build-base-build-image
|
||||
DOCKER_BUILDKIT=1 docker build -f examples/functions/golang/backfill/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-backfill:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-backfill:$(ALTERNATE_TAG) .
|
||||
docker build -f examples/functions/golang/backfill/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-backfill:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-backfill:$(ALTERNATE_TAG) .
|
||||
|
||||
#######################################
|
||||
## # Builds and pushes images to your container registry.
|
||||
@ -317,7 +319,6 @@ build/chart/: build/chart/index.yaml build/chart/index.yaml.$(YEAR_MONTH_DAY)
|
||||
|
||||
install-chart-prerequisite: build/toolchain/bin/kubectl$(EXE_EXTENSION) update-chart-deps
|
||||
-$(KUBECTL) create namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE)
|
||||
$(KUBECTL) apply -f install/gke-metadata-server-workaround.yaml
|
||||
|
||||
# Used for Open Match development. Install om-configmap-override.yaml by default.
|
||||
HELM_UPGRADE_FLAGS = --cleanup-on-fail -i --no-hooks --debug --timeout=600s --namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) --set global.gcpProjectId=$(GCP_PROJECT_ID) --set open-match-override.enabled=true --set redis.password=$(REDIS_DEV_PASSWORD) --set redis.auth.enabled=false --set redis.auth.sentinel=false
|
||||
@ -339,7 +340,6 @@ install-large-chart: install-chart-prerequisite install-demo build/toolchain/bin
|
||||
--set open-match-customize.enabled=true \
|
||||
--set open-match-customize.evaluator.enabled=true \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
--set global.telemetry.prometheus.enabled=true
|
||||
|
||||
# install-chart will install open-match-core, open-match-demo, with the demo evaluator and mmf.
|
||||
@ -357,7 +357,6 @@ install-scale-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EX
|
||||
--set open-match-customize.evaluator.enabled=true \
|
||||
--set open-match-customize.function.image=openmatch-scale-mmf \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=false \
|
||||
--set global.telemetry.prometheus.enabled=true
|
||||
$(HELM) template $(OPEN_MATCH_HELM_NAME)-scale install/helm/open-match $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) -f install/helm/open-match/values-production.yaml \
|
||||
--set open-match-core.enabled=false \
|
||||
@ -388,8 +387,8 @@ install-ci-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EXTEN
|
||||
delete-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
-$(HELM) uninstall $(OPEN_MATCH_HELM_NAME)
|
||||
-$(HELM) uninstall $(OPEN_MATCH_HELM_NAME)-demo
|
||||
-$(KUBECTL) delete psp,clusterrole,clusterrolebinding --selector=release=open-match
|
||||
-$(KUBECTL) delete psp,clusterrole,clusterrolebinding --selector=release=open-match-demo
|
||||
-$(KUBECTL) delete clusterrole,clusterrolebinding --selector=release=open-match
|
||||
-$(KUBECTL) delete clusterrole,clusterrolebinding --selector=release=open-match-demo
|
||||
-$(KUBECTL) delete namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE)
|
||||
-$(KUBECTL) delete namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE)-demo
|
||||
|
||||
@ -397,14 +396,11 @@ ifneq ($(BASE_VERSION), 0.0.0-dev)
|
||||
install/yaml/: REGISTRY = gcr.io/$(OPEN_MATCH_PUBLIC_IMAGES_PROJECT_ID)
|
||||
install/yaml/: TAG = $(BASE_VERSION)
|
||||
endif
|
||||
install/yaml/: update-chart-deps install/yaml/install.yaml install/yaml/01-open-match-core.yaml install/yaml/02-open-match-demo.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/05-jaeger-chart.yaml install/yaml/06-open-match-override-configmap.yaml install/yaml/07-open-match-default-evaluator.yaml
|
||||
install/yaml/: update-chart-deps install/yaml/install.yaml install/yaml/01-open-match-core.yaml install/yaml/02-open-match-demo.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/06-open-match-override-configmap.yaml install/yaml/07-open-match-default-evaluator.yaml
|
||||
|
||||
# We have to hard-code the Jaeger endpoints as we are excluding Jaeger, so Helm cannot determine the endpoints from the Jaeger subchart
|
||||
install/yaml/01-open-match-core.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
|
||||
--set-string global.telemetry.jaeger.agentEndpoint="$(OPEN_MATCH_HELM_NAME)-jaeger-agent:6831" \
|
||||
--set-string global.telemetry.jaeger.collectorEndpoint="http://$(OPEN_MATCH_HELM_NAME)-jaeger-collector:14268/api/traces" \
|
||||
install/helm/open-match > install/yaml/01-open-match-core.yaml
|
||||
|
||||
install/yaml/02-open-match-demo.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
@ -433,15 +429,6 @@ install/yaml/04-grafana-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set-string global.telemetry.grafana.prometheusServer="http://$(OPEN_MATCH_HELM_NAME)-prometheus-server.$(OPEN_MATCH_KUBERNETES_NAMESPACE).svc.cluster.local:80/" \
|
||||
install/helm/open-match > install/yaml/04-grafana-chart.yaml
|
||||
|
||||
install/yaml/05-jaeger-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
|
||||
--set open-match-core.enabled=false \
|
||||
--set open-match-core.redis.enabled=false \
|
||||
--set open-match-telemetry.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
install/helm/open-match > install/yaml/05-jaeger-chart.yaml
|
||||
|
||||
install/yaml/06-open-match-override-configmap.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
|
||||
@ -466,7 +453,6 @@ install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
--set open-match-customize.enabled=true \
|
||||
--set open-match-customize.evaluator.enabled=true \
|
||||
--set open-match-telemetry.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.prometheus.enabled=true \
|
||||
install/helm/open-match > install/yaml/install.yaml
|
||||
@ -495,7 +481,7 @@ install-kubernetes-tools: build/toolchain/bin/kubectl$(EXE_EXTENSION) build/tool
|
||||
## # Install protoc tools
|
||||
## make install-protoc-tools
|
||||
##
|
||||
install-protoc-tools: build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-openapiv2$(EXE_EXTENSION)
|
||||
install-protoc-tools: build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go-grpc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-openapiv2$(EXE_EXTENSION)
|
||||
|
||||
## # Install OpenMatch tools
|
||||
## make install-openmatch-tools
|
||||
@ -564,18 +550,22 @@ build/toolchain/bin/protoc$(EXE_EXTENSION):
|
||||
|
||||
build/toolchain/bin/protoc-gen-doc$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) build -i -pkgdir . github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc && $(GO) build -pkgdir . github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
||||
|
||||
build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) build -i -pkgdir . github.com/golang/protobuf/protoc-gen-go
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) get google.golang.org/protobuf/cmd/protoc-gen-go && $(GO) build -pkgdir . google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
|
||||
build/toolchain/bin/protoc-gen-go-grpc$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) get google.golang.org/grpc/cmd/protoc-gen-go-grpc && $(GO) build -pkgdir . google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
|
||||
build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION):
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) build -i -pkgdir . github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway && $(GO) build -pkgdir . github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
|
||||
|
||||
build/toolchain/bin/protoc-gen-openapiv2$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) build -i -pkgdir . github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
|
||||
cd $(TOOLCHAIN_BIN) && $(GO) get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 && $(GO) build -pkgdir . github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
|
||||
|
||||
build/toolchain/bin/certgen$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
@ -636,27 +626,23 @@ delete-kind-cluster: build/toolchain/bin/kind$(EXE_EXTENSION) build/toolchain/bi
|
||||
create-cluster-role-binding:
|
||||
$(KUBECTL) create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=$(GCLOUD_ACCOUNT_EMAIL)
|
||||
|
||||
create-gke-cluster: GKE_VERSION = 1.22.8-gke.202 # gcloud beta container get-server-config --zone us-west1-a
|
||||
create-gke-cluster: GKE_CLUSTER_SHAPE_FLAGS = --machine-type n1-standard-8 --enable-autoscaling --min-nodes 1 --num-nodes 6 --max-nodes 10 --disk-size 50
|
||||
create-gke-cluster: GKE_FUTURE_COMPAT_FLAGS = --no-enable-basic-auth --no-issue-client-certificate --enable-ip-alias --metadata disable-legacy-endpoints=true --enable-autoupgrade
|
||||
create-gke-cluster: build/toolchain/bin/kubectl$(EXE_EXTENSION) gcloud
|
||||
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
|
||||
--enable-pod-security-policy \
|
||||
--cluster-version $(GKE_VERSION) \
|
||||
$(GCLOUD) $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
|
||||
--cluster-version 1.27.3-gke.1700 \
|
||||
--image-type cos_containerd \
|
||||
--tags open-match \
|
||||
--workload-pool $(GCP_PROJECT_ID).svc.id.goog
|
||||
$(MAKE) create-cluster-role-binding
|
||||
|
||||
|
||||
delete-gke-cluster: gcloud
|
||||
-$(GCLOUD) $(GCP_PROJECT_FLAG) container clusters delete $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GCLOUD_EXTRA_FLAGS)
|
||||
|
||||
create-mini-cluster: build/toolchain/bin/minikube$(EXE_EXTENSION)
|
||||
$(MINIKUBE) start --memory 6144 --cpus 4 --disk-size 50g
|
||||
$(MINIKUBE) start -p openmatch --memory 6144 --cpus 4 --disk-size 50g --kubernetes-version=v1.27.3
|
||||
|
||||
delete-mini-cluster: build/toolchain/bin/minikube$(EXE_EXTENSION)
|
||||
-$(MINIKUBE) delete
|
||||
-$(MINIKUBE) delete -p openmatch
|
||||
|
||||
gcp-apply-binauthz-policy: build/policies/binauthz.yaml
|
||||
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container binauthz policy import build/policies/binauthz.yaml
|
||||
@ -674,26 +660,28 @@ all-protos: $(ALL_PROTOS)
|
||||
# support methods for directing it to the correct location that's not the proto
|
||||
# file's location.
|
||||
# So, instead, put it in a tempororary directory, then move it out.
|
||||
pkg/pb/%.pb.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
pkg/pb/%.pb.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go-grpc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/pkg/pb
|
||||
$(PROTOC) $< \
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
--go_out=$(REPOSITORY_ROOT)/build/prototmp \
|
||||
--go-grpc_out=require_unimplemented_servers=false:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/pkg/pb/* $(REPOSITORY_ROOT)/pkg/pb/
|
||||
|
||||
internal/ipb/%.pb.go: internal/api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
internal/ipb/%.pb.go: internal/api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go-grpc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/internal/ipb
|
||||
$(PROTOC) $< \
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
--go_out=$(REPOSITORY_ROOT)/build/prototmp \
|
||||
--go-grpc_out=require_unimplemented_servers=false:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/internal/ipb/* $(REPOSITORY_ROOT)/internal/ipb/
|
||||
|
||||
pkg/pb/%.pb.gw.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
pkg/pb/%.pb.gw.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go-grpc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/pkg/pb
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--grpc-gateway_out=logtostderr=true,allow_delete_body=true:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/pkg/pb/* $(REPOSITORY_ROOT)/pkg/pb/
|
||||
|
||||
api/%.swagger.json: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-openapiv2$(EXE_EXTENSION)
|
||||
$(PROTOC) $< \
|
||||
@ -737,8 +725,10 @@ build: assets
|
||||
define test_folder
|
||||
$(if $(wildcard $(1)/go.mod), \
|
||||
cd $(1) && \
|
||||
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -race ./... && \
|
||||
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -run IgnoreRace$$ ./... \
|
||||
$(GO) mod tidy && \
|
||||
$(GO) mod download -x && \
|
||||
CGO_ENABLED=1 $(GO) test $(GOLANG_EXTRA_TEST_FLAGS) -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -race -vet=off ./... && \
|
||||
CGO_ENABLED=0 $(GO) test $(GOLANG_EXTRA_TEST_FLAGS) -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -vet=off -run IgnoreRace$$ ./... \
|
||||
)
|
||||
$(foreach dir, $(wildcard $(1)/*/.), $(call test_folder, $(dir)))
|
||||
endef
|
||||
@ -764,7 +754,7 @@ fasttest: $(ALL_PROTOS) tls-certs third_party/
|
||||
$(call fast_test_folder,.)
|
||||
|
||||
test-e2e-cluster: all-protos tls-certs third_party/
|
||||
$(HELM) test --timeout 7m30s -v 0 --logs -n $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(OPEN_MATCH_HELM_NAME)
|
||||
$(HELM) test --timeout 15m --debug -v 0 --logs -n $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(OPEN_MATCH_HELM_NAME)
|
||||
|
||||
fmt:
|
||||
$(GO) fmt ./...
|
||||
@ -774,7 +764,7 @@ vet:
|
||||
$(GO) vet ./...
|
||||
|
||||
golangci: build/toolchain/bin/golangci-lint$(EXE_EXTENSION)
|
||||
GO111MODULE=on $(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml
|
||||
$(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml
|
||||
|
||||
## # Run linter on Go code, charts and terraform
|
||||
## make lint
|
||||
@ -949,17 +939,13 @@ proxy-synchronizer: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Synchronizer Trace: http://localhost:$(SYNCHRONIZER_PORT)/debug/tracez"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=synchronizer,release=$(OPEN_MATCH_HELM_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SYNCHRONIZER_PORT):51506 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-jaeger: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Jaeger Query Frontend: http://localhost:16686"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app.kubernetes.io/name=jaeger,app.kubernetes.io/component=query" --output jsonpath='{.items[0].metadata.name}') $(JAEGER_QUERY_PORT):16686 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-grafana: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "User: admin"
|
||||
@echo "Password: openmatch"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=grafana,release=$(OPEN_MATCH_HELM_NAME)" --output jsonpath='{.items[0].metadata.name}') $(GRAFANA_PORT):3000 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) service/$(shell $(KUBECTL) get service --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app.kubernetes.io/name=grafana" --output jsonpath='{.items[0].metadata.name}') $(GRAFANA_PORT):3000 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-prometheus: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=prometheus,component=server,release=$(OPEN_MATCH_HELM_NAME)" --output jsonpath='{.items[0].metadata.name}') $(PROMETHEUS_PORT):9090 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) service/$(shell $(KUBECTL) get service --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=prometheus,component=server,release=$(OPEN_MATCH_HELM_NAME)" --output jsonpath='{.items[0].metadata.name}') $(PROMETHEUS_PORT):80 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-dashboard: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) port-forward --namespace kube-system $(shell $(KUBECTL) get pod --namespace kube-system --selector="app=kubernetes-dashboard" --output jsonpath='{.items[0].metadata.name}') $(DASHBOARD_PORT):9092 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
@ -974,7 +960,7 @@ proxy-demo: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
|
||||
# Run `make proxy` instead to run everything at the same time.
|
||||
# If you run this directly it will just run each proxy sequentially.
|
||||
proxy-all: proxy-frontend proxy-backend proxy-query proxy-grafana proxy-prometheus proxy-jaeger proxy-synchronizer proxy-ui proxy-dashboard proxy-demo
|
||||
proxy-all: proxy-frontend proxy-backend proxy-query proxy-grafana proxy-prometheus proxy-synchronizer proxy-ui proxy-dashboard proxy-demo
|
||||
|
||||
proxy:
|
||||
# This is an exception case where we'll call recursive make.
|
||||
@ -983,6 +969,7 @@ proxy:
|
||||
|
||||
update-deps:
|
||||
$(GO) mod tidy
|
||||
$(MAKE) tutorial-deps
|
||||
|
||||
third_party/: third_party/google/api third_party/protoc-gen-openapiv2/options third_party/swaggerui/
|
||||
|
||||
@ -1018,9 +1005,25 @@ third_party/swaggerui/:
|
||||
$(SED_REPLACE) 's|0.0.0-dev|$(BASE_VERSION)|g' $(REPOSITORY_ROOT)/third_party/swaggerui/config.json
|
||||
rm -rf $(TOOLCHAIN_DIR)/swaggerui-temp
|
||||
|
||||
sync-deps:
|
||||
|
||||
clean-deps:
|
||||
$(GO) clean -modcache
|
||||
$(GO) mod download
|
||||
|
||||
sync-deps: clean-deps
|
||||
$(GO) mod tidy
|
||||
$(GO) mod download -x
|
||||
|
||||
define tutorial_folder
|
||||
$(if $(wildcard $(1)/go.mod), \
|
||||
cd $(1) && \
|
||||
$(GO) mod tidy
|
||||
)
|
||||
$(foreach dir, $(wildcard $(1)/*/.), $(call tutorial_folder, $(dir)))
|
||||
endef
|
||||
|
||||
tutorial-deps:
|
||||
$(call tutorial_folder,./tutorials)
|
||||
|
||||
|
||||
# Prevents users from running with sudo.
|
||||
# There's an exception for Google Cloud Build because it runs as root.
|
||||
|
@ -26,7 +26,7 @@ to Open Match.
|
||||
|
||||
## Support
|
||||
|
||||
* [Slack Channel](https://open-match.slack.com/) ([Signup](https://join.slack.com/t/open-match/shared_invite/enQtNDM1NjcxNTY4MTgzLTM5ZWQxNjc1YWI3MzJmN2RiMWJmYWI0ZjFiNzNkZmNkMWQ3YWU5OGVkNzA5Yzc4OGVkOGU5MTc0OTA5ZTA5NDU))
|
||||
* [Slack Channel](https://open-match.slack.com/) ([Signup](https://join.slack.com/t/open-match/shared_invite/zt-5k57lph3-Oe0WdatzL32xv6tPG3PfzQ))
|
||||
* [File an Issue](https://github.com/googleforgames/open-match/issues/new)
|
||||
* [Mailing list](https://groups.google.com/forum/#!forum/open-match-discuss)
|
||||
|
||||
|
@ -225,6 +225,7 @@
|
||||
"assignments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchAssignmentGroup"
|
||||
},
|
||||
"description": "Assignments is a list of assignment groups that contain assignment and the Tickets to which they should be applied."
|
||||
@ -237,6 +238,7 @@
|
||||
"failures": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchAssignmentFailure"
|
||||
},
|
||||
"description": "Failures is a list of all the Tickets that failed assignment along with the cause of failure."
|
||||
@ -415,6 +417,7 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
@ -447,6 +450,7 @@
|
||||
"pools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchPool"
|
||||
},
|
||||
"description": "Set of pools to be queried when generating a match for this MatchProfile."
|
||||
@ -471,6 +475,7 @@
|
||||
"double_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchDoubleRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected tickets must\nmatch every Filter."
|
||||
@ -478,12 +483,14 @@
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
},
|
||||
"tag_present_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTagPresentFilter"
|
||||
}
|
||||
},
|
||||
@ -611,17 +618,13 @@
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
"additionalProperties": {},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
@ -638,6 +641,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
|
@ -172,6 +172,7 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
@ -262,17 +263,13 @@
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
"additionalProperties": {},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
@ -289,6 +286,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
|
@ -57,6 +57,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": "BETA FEATURE WARNING: This Request message is not finalized and still subject\nto possible change or removal.",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
@ -95,6 +96,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": "UpdateBackfillRequest - update searchFields, extensions and set assignment.\n\nBETA FEATURE WARNING: This Request message is not finalized and still subject\nto possible change or removal.",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
@ -152,6 +154,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
@ -221,7 +224,14 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/openmatchAcknowledgeBackfillRequest"
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "An updated Assignment of the requested Backfill."
|
||||
}
|
||||
},
|
||||
"description": "BETA FEATURE WARNING: This Request message is not finalized and still subject\nto possible change or removal."
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -315,6 +325,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
@ -396,20 +407,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"openmatchAcknowledgeBackfillRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"backfill_id": {
|
||||
"type": "string",
|
||||
"description": "An existing ID of Backfill to acknowledge."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "An updated Assignment of the requested Backfill."
|
||||
}
|
||||
},
|
||||
"description": "BETA FEATURE WARNING: This Request message is not finalized and still subject\nto possible change or removal."
|
||||
},
|
||||
"openmatchAcknowledgeBackfillResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -420,6 +417,7 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"title": "All of the Tickets that were successfully assigned"
|
||||
@ -588,17 +586,13 @@
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
"additionalProperties": {},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
@ -615,6 +609,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
|
@ -188,6 +188,7 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
@ -220,6 +221,7 @@
|
||||
"pools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchPool"
|
||||
},
|
||||
"description": "Set of pools to be queried when generating a match for this MatchProfile."
|
||||
@ -244,6 +246,7 @@
|
||||
"double_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchDoubleRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected tickets must\nmatch every Filter."
|
||||
@ -251,12 +254,14 @@
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
},
|
||||
"tag_present_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTagPresentFilter"
|
||||
}
|
||||
},
|
||||
@ -381,17 +386,13 @@
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
"additionalProperties": {},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
@ -408,6 +409,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
|
@ -66,6 +66,7 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": "BETA FEATURE WARNING: This Request messages are not finalized and \nstill subject to possible change or removal.",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
@ -278,6 +279,7 @@
|
||||
"double_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchDoubleRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected tickets must\nmatch every Filter."
|
||||
@ -285,12 +287,14 @@
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
},
|
||||
"tag_present_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTagPresentFilter"
|
||||
}
|
||||
},
|
||||
@ -323,6 +327,7 @@
|
||||
"backfills": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchBackfill"
|
||||
},
|
||||
"description": "Backfills that meet all the filtering criteria requested by the pool."
|
||||
@ -366,6 +371,7 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets that meet all the filtering criteria requested by the pool."
|
||||
@ -462,17 +468,13 @@
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
"additionalProperties": {},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
@ -489,6 +491,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
|
@ -16,15 +16,9 @@
|
||||
# Open Match Script for Google Cloud Build #
|
||||
################################################################################
|
||||
|
||||
# To run this locally:
|
||||
# cloud-build-local --config=cloudbuild.yaml --dryrun=false --substitutions=_OM_VERSION=DEV .
|
||||
# To run this remotely:
|
||||
# example command-line invocation:
|
||||
# gcloud builds submit --config=cloudbuild.yaml --substitutions=_OM_VERSION=DEV .
|
||||
|
||||
# Requires gcloud to be installed to work. (https://cloud.google.com/sdk/)
|
||||
# gcloud auth login
|
||||
# gcloud components install cloud-build-local
|
||||
|
||||
# This YAML contains all the build steps for building Open Match.
|
||||
# All PRs are verified against this script to prevent build breakages and regressions.
|
||||
|
||||
@ -38,8 +32,11 @@
|
||||
# Setup: Read-Write, similar to generate but steps that run before any other step.
|
||||
|
||||
# Some useful things to know about Cloud Build.
|
||||
# The root of this repository is always stored in /workspace.
|
||||
# Any modifications that occur within /workspace are persisted between builds anything else is forgotten.
|
||||
# When your build executes, Cloud Build copies the contents of your repository to /workspace, the default working directory for Cloud Build.
|
||||
# Learn more about working directories on the Build configuration overview page https://cloud.google.com/build/docs/build-config-file-schema
|
||||
# - Modifications that occur within /workspace are persisted between build steps.
|
||||
# - If you want to replicate the build process from this file locally, you'll need to
|
||||
# clone the open match github repo and set HEAD to the commit you're trying to build.
|
||||
# If a build step has intermediate files that need to be persisted for a future step then use volumes.
|
||||
# An example of this is the go-vol which is where the pkg/ data for go mod is stored.
|
||||
# More information here: https://cloud.google.com/cloud-build/docs/build-config#build_steps
|
||||
@ -48,23 +45,31 @@
|
||||
|
||||
steps:
|
||||
- id: 'Docker Image: open-match-build'
|
||||
name: gcr.io/cloud-builders/docker
|
||||
args: ['build', '-t', 'gcr.io/$PROJECT_ID/open-match-build', '-f', 'Dockerfile.ci', '.']
|
||||
name: gcr.io/kaniko-project/executor:latest
|
||||
args: [
|
||||
"--destination=gcr.io/$PROJECT_ID/open-match-build",
|
||||
"--dockerfile=Dockerfile.ci",
|
||||
"--cache=true",
|
||||
"--cache-ttl=3600h",
|
||||
]
|
||||
waitFor: ['-']
|
||||
#name: gcr.io/cloud-builders/docker
|
||||
#args: ['build', '-t', 'gcr.io/$PROJECT_ID/open-match-build', '-f', 'Dockerfile.ci', '.']
|
||||
#waitFor: ['-']
|
||||
|
||||
- id: 'Build: Clean'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'clean-third-party', 'clean-protos', 'clean-swagger-docs']
|
||||
waitFor: ['Docker Image: open-match-build']
|
||||
|
||||
# - id: 'Test: Markdown'
|
||||
# name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
# args: ['make', 'md-test']
|
||||
# waitFor: ['Build: Clean']
|
||||
|
||||
- id: 'Setup: Download Dependencies'
|
||||
- id: 'Test: Markdown'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'sync-deps']
|
||||
args: ['make', 'md-test']
|
||||
waitFor: ['Build: Clean']
|
||||
|
||||
- id: 'Setup: Clean Go Dependencies'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'clean-deps']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
@ -76,17 +81,33 @@ steps:
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Setup: Download Dependencies']
|
||||
waitFor: ['Setup: Clean Go Dependencies']
|
||||
|
||||
- id: 'Test: Terraform Configuration'
|
||||
- id: 'Build: Compile Protos'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'terraform-test']
|
||||
args: ['make', 'golang-protos']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Build: Initialize Toolchain']
|
||||
|
||||
- id: 'Setup: Download Go Dependencies'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'sync-deps']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Build: Compile Protos']
|
||||
|
||||
- id: 'Build: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'update-chart-deps', 'install/yaml/']
|
||||
waitFor: ['Build: Initialize Toolchain']
|
||||
waitFor: ['Setup: Download Go Dependencies']
|
||||
|
||||
- id: 'Test: Terraform Configuration'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'terraform-test']
|
||||
waitFor: ['Setup: Download Go Dependencies']
|
||||
|
||||
- id: 'Build: Assets'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
@ -98,7 +119,7 @@ steps:
|
||||
|
||||
- id: 'Build: Binaries'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GOPROXY=off', 'build', 'all', '-j12']
|
||||
args: ['make', '_CHARTS_BUCKET=${_CHARTS_BUCKET}', 'build', 'all', '-j12']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
@ -106,7 +127,9 @@ steps:
|
||||
|
||||
- id: 'Test: Services'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GOPROXY=off', 'GOLANG_TEST_COUNT=10', 'test']
|
||||
args: ['make', 'GOLANG_TEST_COUNT=3', 'test']
|
||||
# When debugging failing tests, enable verbose 'go test' output, run additional passes
|
||||
#args: ['make', 'GOLANG_EXTRA_TEST_FLAGS=-v', 'GOLANG_TEST_COUNT=10', 'test']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
@ -153,21 +176,19 @@ steps:
|
||||
|
||||
artifacts:
|
||||
objects:
|
||||
location: '${_ARTIFACTS_BUCKET}'
|
||||
location: '${_ARTIFACTS_BUCKET}${_OM_VERSION}'
|
||||
paths:
|
||||
- install/yaml/install.yaml
|
||||
- install/yaml/01-open-match-core.yaml
|
||||
- install/yaml/02-open-match-demo.yaml
|
||||
- install/yaml/03-prometheus-chart.yaml
|
||||
- install/yaml/04-grafana-chart.yaml
|
||||
- install/yaml/05-jaeger-chart.yaml
|
||||
- install/yaml/06-open-match-override-configmap.yaml
|
||||
- install/yaml/*.yaml
|
||||
- pkg/pb/*.pb.go
|
||||
- pkg/pb/*.pb.gw.go
|
||||
- internal/ipb/*.pb.go
|
||||
- api/*.swagger.json
|
||||
|
||||
substitutions:
|
||||
_OM_VERSION: "0.0.0-dev"
|
||||
_OM_VERSION: "1.8.1"
|
||||
_GCB_POST_SUBMIT: "0"
|
||||
_GCB_LATEST_VERSION: "undefined"
|
||||
_ARTIFACTS_BUCKET: "gs://open-match-build-artifacts/output/"
|
||||
_ARTIFACTS_BUCKET: "gs://open-match-build-artifacts/"
|
||||
_LOGS_BUCKET: "gs://open-match-build-logs/"
|
||||
_CHARTS_BUCKET: "gs://open-match-chart"
|
||||
logsBucket: '${_LOGS_BUCKET}'
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
|
||||
"log"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/golang/protobuf/ptypes/wrappers"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
"open-match.dev/open-match/pkg/matchfunction"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
@ -243,7 +243,7 @@ func newBackfill(searchFields *pb.SearchFields, openSlots int) (*pb.Backfill, er
|
||||
b := pb.Backfill{
|
||||
SearchFields: searchFields,
|
||||
Generation: 0,
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
}
|
||||
|
||||
err := setOpenSlots(&b, int32(openSlots))
|
||||
@ -264,10 +264,10 @@ func newMatch(num int, profile string, tickets []*pb.Ticket, b *pb.Backfill) pb.
|
||||
|
||||
func setOpenSlots(b *pb.Backfill, val int32) error {
|
||||
if b.Extensions == nil {
|
||||
b.Extensions = make(map[string]*any.Any)
|
||||
b.Extensions = make(map[string]*anypb.Any)
|
||||
}
|
||||
|
||||
any, err := ptypes.MarshalAny(&wrappers.Int32Value{Value: val})
|
||||
any, err := anypb.New(&wrapperspb.Int32Value{Value: val})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -283,8 +283,8 @@ func getOpenSlots(b *pb.Backfill) (int32, error) {
|
||||
|
||||
if b.Extensions != nil {
|
||||
if any, ok := b.Extensions[openSlotsKey]; ok {
|
||||
var val wrappers.Int32Value
|
||||
err := ptypes.UnmarshalAny(any, &val)
|
||||
var val wrapperspb.Int32Value
|
||||
err := any.UnmarshalTo(&val)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@ -16,10 +16,9 @@ package mmf
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/golang/protobuf/ptypes/wrappers"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -129,13 +128,13 @@ func TestMakeFullMatches(t *testing.T) {
|
||||
}
|
||||
|
||||
func withOpenSlots(openSlots int) *pb.Backfill {
|
||||
val, err := ptypes.MarshalAny(&wrappers.Int32Value{Value: int32(openSlots)})
|
||||
val, err := anypb.New(&wrapperspb.Int32Value{Value: int32(openSlots)})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &pb.Backfill{
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
openSlotsKey: val,
|
||||
},
|
||||
}
|
||||
|
@ -19,9 +19,8 @@ import (
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/golang/protobuf/ptypes/wrappers"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -162,8 +161,8 @@ func getOpenSlots(b *pb.Backfill, defaultVal int) int {
|
||||
return defaultVal
|
||||
}
|
||||
|
||||
var val wrappers.Int32Value
|
||||
err := ptypes.UnmarshalAny(any, &val)
|
||||
var val wrapperspb.Int32Value
|
||||
err := any.UnmarshalTo(&val)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -173,10 +172,10 @@ func getOpenSlots(b *pb.Backfill, defaultVal int) int {
|
||||
|
||||
func setOpenSlots(b *pb.Backfill, val int) {
|
||||
if b.Extensions == nil {
|
||||
b.Extensions = make(map[string]*any.Any)
|
||||
b.Extensions = make(map[string]*anypb.Any)
|
||||
}
|
||||
|
||||
any, err := ptypes.MarshalAny(&wrappers.Int32Value{Value: int32(val)})
|
||||
any, err := anypb.New(&wrapperspb.Int32Value{Value: int32(val)})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -18,10 +18,13 @@
|
||||
// arguments used:
|
||||
// mode: The game mode the players wants to play in. mode is a hard partition.
|
||||
// regions: Players may have good latency to one or more regions. A player will
|
||||
// search for matches in all eligible regions.
|
||||
//
|
||||
// search for matches in all eligible regions.
|
||||
//
|
||||
// skill: Players have a random skill based on a normal distribution. Players
|
||||
// will only be matched with other players who have a close skill value. The
|
||||
// match functions have overlapping partitions of the skill brackets.
|
||||
//
|
||||
// will only be matched with other players who have a close skill value. The
|
||||
// match functions have overlapping partitions of the skill brackets.
|
||||
package teamshooter
|
||||
|
||||
import (
|
||||
@ -32,9 +35,8 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/golang/protobuf/ptypes/wrappers"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -265,9 +267,9 @@ type matchExt struct {
|
||||
}
|
||||
|
||||
func unpackMatch(m *pb.Match) (*matchExt, error) {
|
||||
v := &wrappers.DoubleValue{}
|
||||
v := &wrapperspb.DoubleValue{}
|
||||
|
||||
err := ptypes.UnmarshalAny(m.Extensions["quality"], v)
|
||||
err := m.Extensions["quality"].UnmarshalTo(v)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error unpacking match quality: %w", err)
|
||||
}
|
||||
@ -282,9 +284,9 @@ func unpackMatch(m *pb.Match) (*matchExt, error) {
|
||||
}
|
||||
|
||||
func (m *matchExt) pack() (*pb.Match, error) {
|
||||
v := &wrappers.DoubleValue{Value: m.quality}
|
||||
v := &wrapperspb.DoubleValue{Value: m.quality}
|
||||
|
||||
a, err := ptypes.MarshalAny(v)
|
||||
a, err := anypb.New(v)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error packing match quality: %w", err)
|
||||
}
|
||||
@ -294,7 +296,7 @@ func (m *matchExt) pack() (*pb.Match, error) {
|
||||
Tickets: m.tickets,
|
||||
MatchProfile: m.matchProfile,
|
||||
MatchFunction: m.matchFunction,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"quality": a,
|
||||
},
|
||||
}, nil
|
||||
|
143
go.mod
143
go.mod
@ -15,51 +15,116 @@ module open-match.dev/open-match
|
||||
// limitations under the License.
|
||||
|
||||
// When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
|
||||
go 1.14
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.1
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.7.0
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.2.0
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.4
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.2
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.13.14
|
||||
github.com/Bose/minisentinel v0.0.0-20200130220412-917c5a9223bb
|
||||
github.com/TV4/logrus-stackdriver-formatter v0.1.0
|
||||
github.com/alicebob/miniredis/v2 v2.14.1
|
||||
github.com/aws/aws-sdk-go v1.35.26 // indirect
|
||||
github.com/alicebob/miniredis/v2 v2.30.5
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/go-redsync/redsync/v4 v4.3.0
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.4.3
|
||||
github.com/fsnotify/fsnotify v1.6.0
|
||||
github.com/go-redsync/redsync/v4 v4.8.1
|
||||
github.com/golang/protobuf v1.5.3
|
||||
github.com/gomodule/redigo v2.0.1-0.20191111085604-09d84710e01a+incompatible
|
||||
github.com/googleapis/gnostic v0.3.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.3.0
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/imdario/mergo v0.3.11 // indirect
|
||||
github.com/pelletier/go-toml v1.8.1 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.2
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.8.0
|
||||
github.com/rs/xid v1.2.1
|
||||
github.com/sirupsen/logrus v1.7.0
|
||||
github.com/spf13/afero v1.4.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/viper v1.7.1
|
||||
github.com/stretchr/testify v1.7.0
|
||||
go.opencensus.io v0.23.0
|
||||
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
|
||||
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 // indirect
|
||||
google.golang.org/api v0.35.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20210224155714-063164c882e6
|
||||
google.golang.org/grpc v1.36.0
|
||||
google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
k8s.io/api v0.0.0-20191004102349-159aefb8556b // kubernetes-1.14.10
|
||||
k8s.io/apimachinery v0.0.0-20191004074956-c5d2f014d689 // kubernetes-1.14.10
|
||||
k8s.io/client-go v11.0.1-0.20191029005444-8e4128053008+incompatible // kubernetes-1.14.10
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect
|
||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/rs/xid v1.5.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/viper v1.16.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
go.opencensus.io v0.24.0
|
||||
golang.org/x/net v0.25.0
|
||||
golang.org/x/sync v0.3.0
|
||||
google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878 // indirect
|
||||
google.golang.org/grpc v1.57.1
|
||||
google.golang.org/protobuf v1.34.1
|
||||
k8s.io/api v0.28.0 // kubernetes-1.14.10
|
||||
k8s.io/apimachinery v0.28.0
|
||||
k8s.io/client-go v0.28.0
|
||||
)
|
||||
|
||||
require (
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230815205213-6bfd019c3878
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute v1.23.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.2.3 // indirect
|
||||
cloud.google.com/go/monitoring v1.15.1 // indirect
|
||||
cloud.google.com/go/trace v1.10.1 // indirect
|
||||
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect
|
||||
github.com/aws/aws-sdk-go v1.44.324 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/go-stack/stack v1.8.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/go-cmp v0.5.9 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.5 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/imdario/mergo v0.3.16 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.9 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_model v0.4.0 // indirect
|
||||
github.com/prometheus/common v0.44.0 // indirect
|
||||
github.com/prometheus/procfs v0.11.1 // indirect
|
||||
github.com/prometheus/prometheus v0.46.0 // indirect
|
||||
github.com/prometheus/statsd_exporter v0.24.0 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
github.com/yuin/gopher-lua v1.1.0 // indirect
|
||||
golang.org/x/crypto v0.23.0 // indirect
|
||||
golang.org/x/oauth2 v0.11.0 // indirect
|
||||
golang.org/x/sys v0.20.0 // indirect
|
||||
golang.org/x/term v0.20.0 // indirect
|
||||
golang.org/x/text v0.15.0 // indirect
|
||||
golang.org/x/time v0.3.0 // indirect
|
||||
google.golang.org/api v0.137.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d // indirect
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ Templates under the `templates/` directory are for the core components in Open M
|
||||
|
||||
Open Match also provides templates for optional components that are disabled by default under the `subcharts/` directory.
|
||||
1. `open-match-customize` contains flexible templates to deploy your own matchfunction and evaluator.
|
||||
2. `open-match-telemetry` contains monitoring supports for Open Match, you may choose to enable/disable [jaeger](https://www.jaegertracing.io/ "jaeger"), [prometheus](http://prometheus.io "prometheus"), [stackdriver](https://cloud.google.com/stackdriver/ "stackdriver"), and [grafana](https://grafana.com/ "grafana") by overriding the config values in the provided templates.
|
||||
2. `open-match-telemetry` contains monitoring supports for Open Match, you may choose to enable/disable [prometheus](http://prometheus.io "prometheus"), [Observability in Google Cloud](https://cloud.google.com/stackdriver/docs "Observability in Google Cloud"), and [grafana](https://grafana.com/ "grafana") by overriding the config values in the provided templates.
|
||||
|
||||
You may control the behavior of Open Match by overriding the configs in `install/helm/open-match/values.yaml` file. Here are a few examples:
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v2
|
||||
appVersion: "0.0.0-dev"
|
||||
version: 0.0.0-dev
|
||||
appVersion: "1.8.1"
|
||||
version: 1.8.1
|
||||
name: open-match
|
||||
dependencies:
|
||||
- name: redis
|
||||
version: 16.3.1
|
||||
version: 17.15.4
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: open-match-core.redis.enabled
|
||||
- name: open-match-telemetry
|
||||
|
@ -54,7 +54,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openmatch.evaluator.hostName" . }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.evaluator.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -54,7 +54,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openmatchcustomize.function.hostName" . }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.matchfunction.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -26,8 +26,3 @@ dependencies:
|
||||
version: 6.29.3
|
||||
repository: https://grafana.github.io/helm-charts
|
||||
condition: global.telemetry.grafana.enabled,grafana.enabled
|
||||
- name: jaeger
|
||||
version: 0.56.5
|
||||
repository: https://jaegertracing.github.io/helm-charts
|
||||
condition: global.telemetry.jaeger.enabled,jaeger.enabled
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -146,23 +146,3 @@ grafana:
|
||||
datasources:
|
||||
enabled: true
|
||||
plugins: grafana-piechart-panel
|
||||
|
||||
jaeger:
|
||||
enabled: true
|
||||
# Configs for the cassandra schema job
|
||||
schema:
|
||||
pullPolicy: Always
|
||||
mode: prod
|
||||
activeDeadlineSeconds: 200
|
||||
cassandra:
|
||||
image:
|
||||
tag: latest
|
||||
config:
|
||||
cluster_size: 2
|
||||
resources:
|
||||
requests:
|
||||
memory: 4Gi
|
||||
cpu: 2
|
||||
limits:
|
||||
memory: 4Gi
|
||||
cpu: 2
|
||||
|
@ -112,7 +112,7 @@ resources:
|
||||
{{- if .Values.redis.auth.enabled }}
|
||||
- name: redis-password
|
||||
secret:
|
||||
secretName: {{ include "call-nested" (list . "redis" "redis.fullname") }}
|
||||
secretName: {{ include "call-nested" (list . "redis" "common.names.fullname") }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@ -150,10 +150,34 @@ readinessProbe:
|
||||
failureThreshold: 2
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.targetCPUUtilizationPercentage }}
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.frontend.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.frontend.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.frontend.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.frontend.targetCPUUtilizationPercentage }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.backend.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.backend.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.backend.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.backend.targetCPUUtilizationPercentage }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.query.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.query.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.query.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.query.targetCPUUtilizationPercentage }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.evaluator.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.evaluator.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.evaluator.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.evaluator.targetCPUUtilizationPercentage }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.matchfunction.spec.common" -}}
|
||||
minReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.matchfunction.minReplicas }}
|
||||
maxReplicas: {{ .Values.global.kubernetes.horizontalPodAutoScaler.matchfunction.maxReplicas }}
|
||||
targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoScaler.matchfunction.targetCPUUtilizationPercentage }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.serviceAccount.name" -}}
|
||||
@ -198,25 +222,9 @@ targetCPUUtilizationPercentage: {{ .Values.global.kubernetes.horizontalPodAutoSc
|
||||
{{- printf "%s-configmap-override" (include "openmatch.fullname" . ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.jaeger.agent" -}}
|
||||
{{- if index .Values "open-match-telemetry" "enabled" -}}
|
||||
{{- if index .Values "open-match-telemetry" "jaeger" "enabled" -}}
|
||||
{{ include "call-nested" (list . "open-match-telemetry.jaeger" "jaeger.agent.name") }}:6831
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.jaeger.collector" -}}
|
||||
{{- if index .Values "open-match-telemetry" "enabled" -}}
|
||||
{{- if index .Values "open-match-telemetry" "jaeger" "enabled" -}}
|
||||
http://{{ include "call-nested" (list . "open-match-telemetry.jaeger" "jaeger.collector.name") }}:14268/api/traces
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Call templates from sub-charts in a synthesized context, workaround for https://github.com/helm/helm/issues/3920
|
||||
Mainly useful for things like `{{ include "call-nested" (list . "redis" "redis.fullname") }}`
|
||||
Mainly useful for things like `{{ include "call-nested" (list . "redis" "common.names.fullname") }}`
|
||||
https://github.com/helm/helm/issues/4535#issuecomment-416022809
|
||||
https://github.com/helm/helm/issues/4535#issuecomment-477778391
|
||||
*/}}
|
||||
|
@ -51,7 +51,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openmatch.backend.hostName" . }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.backend.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -51,7 +51,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openmatch.frontend.hostName" . }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.frontend.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -26,7 +26,11 @@ metadata:
|
||||
data:
|
||||
matchmaker_config_default.yaml: |-
|
||||
logging:
|
||||
{{- if .Values.global.logging.level }}
|
||||
level: {{ .Values.global.logging.level }}
|
||||
{{- else }}
|
||||
level: debug
|
||||
{{- end }}
|
||||
{{- if .Values.global.telemetry.stackdriverMetrics.enabled }}
|
||||
format: stackdriver
|
||||
{{- else }}
|
||||
@ -91,12 +95,24 @@ data:
|
||||
sentinelPort: {{ .Values.redis.sentinel.port }}
|
||||
sentinelMaster: {{ .Values.redis.sentinel.masterSet }}
|
||||
sentinelHostname: {{ include "call-nested" (list . "redis" "common.names.fullname") }}
|
||||
sentinelUsePassword: {{ .Values.redis.auth.sentinel }}
|
||||
sentinelUsePassword: {{ .Values.redis.sentinel.usePassword }}
|
||||
{{- else}}
|
||||
# Open Match's default Redis setups
|
||||
hostname: {{ include "call-nested" (list . "redis" "common.names.fullname") }}-master.{{ .Release.Namespace }}.svc.cluster.local
|
||||
{{- if .Values.redis.redisPort }}
|
||||
# source value: redis.redisPort = {{ .Values.redis.redisPort }}
|
||||
port: {{ .Values.redis.redisPort }}
|
||||
{{- else if index .Values "open-match-core" "redis" "port" }}
|
||||
# source value: open-match-core.redis.port = {{ index .Values "open-match-core" "redis" "port"}}
|
||||
port: {{ index .Values "open-match-core" "redis" "port" }}
|
||||
{{- end }}
|
||||
{{- if .Values.redis.user }}
|
||||
# source value: redis.user = {{ .Values.redis.user }}
|
||||
user: {{ .Values.redis.user }}
|
||||
{{- else if index .Values "open-match-core" "redis" "user" }}
|
||||
# source value: open-match-core.redis.user = {{ index .Values "open-match-core" "redis" "user"}}
|
||||
user: {{ index .Values "open-match-core" "redis" "user"}}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
{{- else }}
|
||||
# BYO Redis setups
|
||||
@ -117,15 +133,6 @@ data:
|
||||
traceSamplingFraction: "{{ .Values.global.telemetry.traceSamplingFraction }}"
|
||||
zpages:
|
||||
enable: "{{ .Values.global.telemetry.zpages.enabled }}"
|
||||
jaeger:
|
||||
enable: "{{ .Values.global.telemetry.jaeger.enabled }}"
|
||||
{{- if .Values.global.telemetry.jaeger.enabled }}
|
||||
agentEndpoint: "{{ tpl .Values.global.telemetry.jaeger.agentEndpoint . }}"
|
||||
collectorEndpoint: "{{ tpl .Values.global.telemetry.jaeger.collectorEndpoint . }}"
|
||||
{{- else }}
|
||||
agentEndpoint: ""
|
||||
collectorEndpoint: ""
|
||||
{{- end }}
|
||||
prometheus:
|
||||
enable: "{{ .Values.global.telemetry.prometheus.enabled }}"
|
||||
endpoint: "{{ .Values.global.telemetry.prometheus.endpoint }}"
|
||||
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if index .Values "open-match-override" }}
|
||||
{{- if index .Values "open-match-override" "enabled" }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
@ -1,140 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if index .Values "open-match-core" "enabled" }}
|
||||
{{- if empty .Values.ci }}
|
||||
# This is the least restricted PSP used to create privileged pods to disable THP in host kernel.
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-redis-podsecuritypolicy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*'
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
privileged: true
|
||||
allowPrivilegeEscalation: true
|
||||
allowedCapabilities:
|
||||
- '*'
|
||||
volumes:
|
||||
- '*'
|
||||
hostNetwork: true
|
||||
hostPorts:
|
||||
# Redis
|
||||
- min: 6379
|
||||
max: 6379
|
||||
- min: 9121
|
||||
max: 9121
|
||||
hostIPC: true
|
||||
hostPID: true
|
||||
runAsUser:
|
||||
rule: 'RunAsAny'
|
||||
seLinux:
|
||||
rule: 'RunAsAny'
|
||||
supplementalGroups:
|
||||
rule: 'RunAsAny'
|
||||
fsGroup:
|
||||
rule: 'RunAsAny'
|
||||
---
|
||||
# This does not allow creating privileged pods and restrict binded pods to use the specified port ranges.
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-core-podsecuritypolicy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
allowPrivilegeEscalation: false
|
||||
defaultAllowPrivilegeEscalation: false
|
||||
forbiddenSysctls:
|
||||
- "*"
|
||||
fsGroup:
|
||||
rule: "MustRunAs"
|
||||
ranges:
|
||||
- min: 1
|
||||
max: 65535
|
||||
hostIPC: false
|
||||
hostNetwork: false
|
||||
hostPID: false
|
||||
hostPorts:
|
||||
# Open Match Services
|
||||
- min: 50500
|
||||
max: 50510
|
||||
- min: 51500
|
||||
max: 51510
|
||||
# Cassandra
|
||||
- min: 7000
|
||||
max: 7001
|
||||
- min: 7199
|
||||
max: 7199
|
||||
- min: 9042
|
||||
max: 9042
|
||||
- min: 9160
|
||||
max: 9160
|
||||
# Grafana
|
||||
- min: 3000
|
||||
max: 3000
|
||||
# Jaeger
|
||||
- min: 5775
|
||||
max: 5778
|
||||
- min: 6831
|
||||
max: 6832
|
||||
- min: 14267
|
||||
max: 14268
|
||||
- min: 9411
|
||||
max: 9411
|
||||
- min: 16686
|
||||
max: 16686
|
||||
# Prometheus
|
||||
- min: 9090
|
||||
max: 9093
|
||||
- min: 9100
|
||||
max: 9100
|
||||
- min: 8080
|
||||
max: 8080
|
||||
privileged: false # Prevents creation of privileged Pods
|
||||
readOnlyRootFilesystem: false
|
||||
# Capabilities Reference: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities
|
||||
# TODO: Open Match itself doesn't need any capabilties but its dependencies do. We should split out the service accounts later.
|
||||
allowedCapabilities:
|
||||
- CHOWN
|
||||
#requiredDropCapabilities:
|
||||
#- ALL
|
||||
runAsUser:
|
||||
rule: "RunAsAny"
|
||||
# Blocked on isolating the open match services from dependencies (Redis, Prometheus, etc.)
|
||||
# Require the container to run without root privileges.
|
||||
#rule: 'MustRunAsNonRoot'
|
||||
seLinux:
|
||||
# This policy assumes the nodes are using AppArmor rather than SELinux.
|
||||
rule: 'RunAsAny'
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
volumes:
|
||||
- 'configMap'
|
||||
- 'emptyDir'
|
||||
- 'projected'
|
||||
- 'secret'
|
||||
- 'downwardAPI'
|
||||
# Assume that persistentVolumes set up by the cluster admin are safe to use.
|
||||
- 'persistentVolumeClaim'
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -51,7 +51,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "openmatch.query.hostName" . }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.query.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
|
@ -23,6 +23,8 @@ metadata:
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
pod-security.kubernetes.io/enforce: baseline
|
||||
pod-security.kubernetes.io/warn: baseline
|
||||
{{- end }}
|
||||
---
|
||||
# Create a universal service account for open-match-core services.
|
||||
@ -39,79 +41,4 @@ metadata:
|
||||
release: {{ .Release.Name }}
|
||||
automountServiceAccountToken: true
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-service-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
- {{ include "openmatch.fullname" . }}-core-podsecuritypolicy
|
||||
verbs:
|
||||
- use
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-service-role-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
subjects:
|
||||
- kind: Group
|
||||
name: system:authenticated # All authenticated users
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "openmatch.fullname" . }}-service-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
{{- if index .Values "open-match-core" "redis" "enabled" }}
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-redis-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
- {{ include "openmatch.fullname" . }}-redis-podsecuritypolicy
|
||||
verbs:
|
||||
- use
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "openmatch.fullname" . }}-redis-role-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "call-nested" (list . "redis" "redis.serviceAccountName") }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "openmatch.fullname" . }}-redis-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -24,14 +24,6 @@ metadata:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- extensions
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
- {{ include "openmatch.fullname" . }}-core-podsecuritypolicy
|
||||
verbs:
|
||||
- use
|
||||
# Grant this role get & list permission for k8s endpoints and pods resources
|
||||
# Required for e2e in-cluster testing.
|
||||
- apiGroups:
|
||||
|
@ -91,7 +91,7 @@ spec:
|
||||
command: ["go"]
|
||||
args:
|
||||
- "test"
|
||||
- "./internal/testing/e2e"
|
||||
- "./testing/e2e"
|
||||
- "-v"
|
||||
- "-timeout"
|
||||
- "150s"
|
||||
|
@ -106,19 +106,12 @@ configs:
|
||||
# https://hub.helm.sh/charts/stable/redis
|
||||
# https://github.com/helm/charts/tree/master/stable/redis
|
||||
redis:
|
||||
redisPort: 6379
|
||||
architecture: standalone
|
||||
auth:
|
||||
enabled: false
|
||||
sentinel: false
|
||||
usePasswordFiles: false
|
||||
secretMountPath: /opt/bitnami/redis/secrets
|
||||
configmap: |
|
||||
maxclients 100000
|
||||
maxmemory 500000000
|
||||
sentinel:
|
||||
enabled: true
|
||||
masterSet: om-redis-master
|
||||
port: 26379
|
||||
master:
|
||||
disableCommands: [] # don't disable 'FLUSH-' commands
|
||||
resources:
|
||||
@ -132,20 +125,6 @@ redis:
|
||||
enabled: false
|
||||
metrics:
|
||||
enabled: true
|
||||
serviceAccount:
|
||||
create: true
|
||||
replica:
|
||||
disableCommands: [] # don't disable 'FLUSH-' commands
|
||||
replicaCount: 3
|
||||
persistence:
|
||||
enabled: false
|
||||
resources:
|
||||
requests:
|
||||
memory: 1Gi
|
||||
cpu: 1
|
||||
limits:
|
||||
memory: 2Gi
|
||||
cpu: 2
|
||||
sysctlImage:
|
||||
# Enable this setting in production if you are running Open Match under Linux environment
|
||||
enabled: true
|
||||
@ -230,6 +209,10 @@ open-match-customize:
|
||||
# function:
|
||||
# image: [YOUR_MMF_IMAGE]
|
||||
|
||||
# Controls if users need to install open-match-override ConfigMap.
|
||||
open-match-override:
|
||||
enabled: false
|
||||
|
||||
# Global configurations that are visible to all subcharts
|
||||
global:
|
||||
kubernetes:
|
||||
@ -240,9 +223,26 @@ global:
|
||||
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
horizontalPodAutoScaler:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
frontend:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
backend:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
query:
|
||||
minReplicas: 5
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
evaluator:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
matchfunction:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 60
|
||||
resources:
|
||||
requests:
|
||||
memory: 1.5Gi
|
||||
@ -286,10 +286,6 @@ global:
|
||||
traceSamplingFraction: 0.005 # What fraction of traces to sample.
|
||||
zpages:
|
||||
enabled: true
|
||||
jaeger:
|
||||
enabled: false
|
||||
agentEndpoint: '{{ include "openmatch.jaeger.agent" . }}'
|
||||
collectorEndpoint: '{{ include "openmatch.jaeger.collector" . }}'
|
||||
prometheus:
|
||||
enabled: false
|
||||
endpoint: "/metrics"
|
||||
|
@ -103,28 +103,18 @@ configs:
|
||||
configName: '{{ include "openmatch.configmap.override" . }}'
|
||||
|
||||
# Override Redis settings
|
||||
# https://hub.helm.sh/charts/stable/redis
|
||||
# https://github.com/helm/charts/tree/master/stable/redis
|
||||
# https://github.com/bitnami/charts/tree/ba40e46ec6831e039f5bf213ab10e9748603ce6c/bitnami/redis
|
||||
redis:
|
||||
redisPort: 6379
|
||||
architecture: standalone
|
||||
auth:
|
||||
enabled: false
|
||||
sentinel: false
|
||||
usePasswordFiles: false
|
||||
secretMountPath: /opt/bitnami/redis/secrets
|
||||
configmap: |
|
||||
commonConfiguration: |
|
||||
maxclients 100000
|
||||
maxmemory 300000000
|
||||
sentinel:
|
||||
enabled: true
|
||||
masterSet: om-redis-master
|
||||
port: 26379
|
||||
resources:
|
||||
requests:
|
||||
memory: 300Mi
|
||||
cpu: 0.5
|
||||
master:
|
||||
disableCommands: [] # don't disable 'FLUSH-' commands
|
||||
persistence:
|
||||
enabled: false
|
||||
resources:
|
||||
requests:
|
||||
memory: 300Mi
|
||||
@ -138,19 +128,13 @@ redis:
|
||||
cpu: 0.5
|
||||
metrics:
|
||||
enabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 300Mi
|
||||
cpu: 0.5
|
||||
serviceAccount:
|
||||
create: true
|
||||
sysctlImage:
|
||||
# Enable this setting in production if you are running Open Match under Linux environment
|
||||
enabled: false
|
||||
# Disable this setting in production if you are not running Redis in Linux
|
||||
enabled: true
|
||||
mountHostSys: true
|
||||
# Redis may require some changes in the kernel of the host machine to work as expected,
|
||||
# in particular increasing the somaxconn value and disabling transparent huge pages.
|
||||
# https://github.com/helm/charts/tree/master/stable/redis#host-kernel-settings
|
||||
# https://docs.bitnami.com/kubernetes/infrastructure/redis/administration/configure-kernel-settings/
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
@ -228,6 +212,10 @@ open-match-customize:
|
||||
# function:
|
||||
# image: [YOUR_MMF_IMAGE]
|
||||
|
||||
# Controls if users need to install open-match-override ConfigMap.
|
||||
open-match-override:
|
||||
enabled: false
|
||||
|
||||
# Global configurations that are visible to all subcharts
|
||||
global:
|
||||
kubernetes:
|
||||
@ -238,9 +226,26 @@ global:
|
||||
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
affinity: {}
|
||||
horizontalPodAutoScaler:
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
frontend:
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
backend:
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
query:
|
||||
minReplicas: 3
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
evaluator:
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
matchfunction:
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 80
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
@ -273,7 +278,7 @@ global:
|
||||
# Use this field if you need to override the image registry and image tag for all services defined in this chart
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.0.0-dev
|
||||
tag: 1.8.1
|
||||
pullPolicy: Always
|
||||
|
||||
# Expose the telemetry configurations to all subcharts because prometheus, for example,
|
||||
@ -284,10 +289,6 @@ global:
|
||||
traceSamplingFraction: 0.01 # What fraction of traces to sample.
|
||||
zpages:
|
||||
enabled: true
|
||||
jaeger:
|
||||
enabled: false
|
||||
agentEndpoint: '{{ include "openmatch.jaeger.agent" . }}'
|
||||
collectorEndpoint: '{{ include "openmatch.jaeger.collector" . }}'
|
||||
prometheus:
|
||||
enabled: false
|
||||
endpoint: "/metrics"
|
||||
|
@ -27,7 +27,6 @@ admissionWhitelistPatterns:
|
||||
- namePattern: docker.io/bitnami/redis:*
|
||||
- namePattern: docker.io/oliver006/redis_exporter:*
|
||||
- namePattern: registry.hub.docker.com/grafana/*
|
||||
- namePattern: registry.hub.docker.com/jaegertracing/*
|
||||
- namePattern: registry.hub.docker.com/jimmidyson/configmap-reload:*
|
||||
- namePattern: registry.hub.docker.com/kiwigrid/k8s-sidecar:*
|
||||
- namePattern: registry.hub.docker.com/prom/*
|
||||
|
@ -96,11 +96,6 @@ resource "google_container_cluster" "ci_cluster" {
|
||||
identity_namespace = "${var.gcp_project_id}.svc.id.goog"
|
||||
}
|
||||
|
||||
# Enable PodSecurityPolicy
|
||||
pod_security_policy_config {
|
||||
enabled = "true"
|
||||
}
|
||||
|
||||
node_config {
|
||||
oauth_scopes = [
|
||||
"https://www.googleapis.com/auth/devstorage.read_only",
|
||||
|
@ -27,8 +27,6 @@ import (
|
||||
"go.opencensus.io/stats"
|
||||
|
||||
"github.com/golang/protobuf/jsonpb"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/xid"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -36,6 +34,8 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/internal/appmain/contextcause"
|
||||
"open-match.dev/open-match/internal/ipb"
|
||||
"open-match.dev/open-match/internal/rpc"
|
||||
@ -279,6 +279,8 @@ func callHTTPMmf(ctx context.Context, cc *rpc.ClientCache, profile *pb.MatchProf
|
||||
if err != nil {
|
||||
return status.Errorf(codes.FailedPrecondition, "failed to create mmf http request for profile %s: %s", profile.GetName(), err.Error())
|
||||
}
|
||||
req.Header.Set("Content-Type", "application/json")
|
||||
req.Header.Set("Transfer-Encoding", "chunked")
|
||||
|
||||
resp, err := client.Do(req.WithContext(ctx))
|
||||
if err != nil {
|
||||
@ -369,7 +371,7 @@ func (s *backendService) AssignTickets(ctx context.Context, req *pb.AssignTicket
|
||||
func createOrUpdateBackfill(ctx context.Context, backfill *pb.Backfill, ticketIds []string, store statestore.Service) error {
|
||||
if backfill.Id == "" {
|
||||
backfill.Id = xid.New().String()
|
||||
backfill.CreateTime = ptypes.TimestampNow()
|
||||
backfill.CreateTime = timestamppb.Now()
|
||||
backfill.Generation = 1
|
||||
err := store.CreateBackfill(ctx, backfill, ticketIds)
|
||||
if err != nil {
|
||||
@ -386,7 +388,7 @@ func createOrUpdateBackfill(ctx context.Context, backfill *pb.Backfill, ticketId
|
||||
}
|
||||
|
||||
defer func() {
|
||||
_, unlockErr := m.Unlock(ctx)
|
||||
_, unlockErr := m.Unlock(context.Background())
|
||||
if unlockErr != nil {
|
||||
logger.WithFields(logrus.Fields{"backfill_id": backfill.Id}).WithError(unlockErr).Error("failed to make unlock")
|
||||
}
|
||||
@ -459,10 +461,7 @@ func recordTimeToAssignment(ctx context.Context, ticket *pb.Ticket) error {
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
created, err := ptypes.Timestamp(ticket.CreateTime)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
created := ticket.CreateTime.AsTime()
|
||||
|
||||
stats.Record(ctx, ticketsTimeToAssignment.M(now.Sub(created).Milliseconds()))
|
||||
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
|
||||
"go.opencensus.io/stats"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/stats/view"
|
||||
"open-match.dev/open-match/internal/app/evaluator"
|
||||
@ -73,7 +72,7 @@ func evaluate(ctx context.Context, in <-chan *pb.Match, out chan<- string) error
|
||||
}
|
||||
|
||||
if a, ok := m.Extensions["evaluation_input"]; ok {
|
||||
err := ptypes.UnmarshalAny(a, inp)
|
||||
err := a.UnmarshalTo(inp)
|
||||
if err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"match_id": m.MatchId,
|
||||
|
@ -18,15 +18,14 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
func mustAny(m proto.Message) *any.Any {
|
||||
result, err := ptypes.MarshalAny(m)
|
||||
func mustAny(m proto.Message) *anypb.Any {
|
||||
result, err := anypb.New(m)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -44,7 +43,7 @@ func TestEvaluate(t *testing.T) {
|
||||
ticket12Score1 := &pb.Match{
|
||||
MatchId: "ticket12Score1",
|
||||
Tickets: []*pb.Ticket{ticket1, ticket2},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 1,
|
||||
}),
|
||||
@ -54,7 +53,7 @@ func TestEvaluate(t *testing.T) {
|
||||
ticket12Score10 := &pb.Match{
|
||||
MatchId: "ticket12Score10",
|
||||
Tickets: []*pb.Ticket{ticket2, ticket1},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 10,
|
||||
}),
|
||||
@ -64,7 +63,7 @@ func TestEvaluate(t *testing.T) {
|
||||
ticket123Score5 := &pb.Match{
|
||||
MatchId: "ticket123Score5",
|
||||
Tickets: []*pb.Ticket{ticket1, ticket2, ticket3},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 5,
|
||||
}),
|
||||
@ -74,7 +73,7 @@ func TestEvaluate(t *testing.T) {
|
||||
ticket3Score50 := &pb.Match{
|
||||
MatchId: "ticket3Score50",
|
||||
Tickets: []*pb.Ticket{ticket3},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 50,
|
||||
}),
|
||||
@ -85,7 +84,7 @@ func TestEvaluate(t *testing.T) {
|
||||
MatchId: "ticket1Backfill0Score1",
|
||||
Tickets: []*pb.Ticket{ticket1},
|
||||
Backfill: backfill0,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 1,
|
||||
}),
|
||||
@ -96,7 +95,7 @@ func TestEvaluate(t *testing.T) {
|
||||
MatchId: "ticket2Backfill0Score1",
|
||||
Tickets: []*pb.Ticket{ticket2},
|
||||
Backfill: backfill0,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 1,
|
||||
}),
|
||||
@ -107,7 +106,7 @@ func TestEvaluate(t *testing.T) {
|
||||
MatchId: "ticket12Bacfill1Score1",
|
||||
Tickets: []*pb.Ticket{ticket1, ticket2},
|
||||
Backfill: backfill1,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 1,
|
||||
}),
|
||||
@ -118,7 +117,7 @@ func TestEvaluate(t *testing.T) {
|
||||
MatchId: "ticket12Bacfill1Score1",
|
||||
Tickets: []*pb.Ticket{ticket1, ticket2},
|
||||
Backfill: backfill1,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 10,
|
||||
}),
|
||||
@ -129,7 +128,7 @@ func TestEvaluate(t *testing.T) {
|
||||
MatchId: "ticket12Backfill2Score5",
|
||||
Tickets: []*pb.Ticket{ticket1, ticket2},
|
||||
Backfill: backfill2,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 5,
|
||||
}),
|
||||
|
@ -46,7 +46,7 @@ var (
|
||||
func BindServiceFor(eval Evaluator) appmain.Bind {
|
||||
return func(p *appmain.Params, b *appmain.Bindings) error {
|
||||
b.AddHandleFunc(func(s *grpc.Server) {
|
||||
pb.RegisterEvaluatorServer(s, &evaluatorService{eval})
|
||||
pb.RegisterEvaluatorServer(s, &evaluatorService{evaluate: eval})
|
||||
}, pb.RegisterEvaluatorHandlerFromEndpoint)
|
||||
b.RegisterViews(
|
||||
matchesPerEvaluateRequestView,
|
||||
|
@ -17,15 +17,15 @@ package frontend
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/rs/xid"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/stats"
|
||||
"go.opencensus.io/trace"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/statestore"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
@ -72,7 +72,7 @@ func doCreateTicket(ctx context.Context, req *pb.CreateTicketRequest, store stat
|
||||
}
|
||||
|
||||
ticket.Id = xid.New().String()
|
||||
ticket.CreateTime = ptypes.TimestampNow()
|
||||
ticket.CreateTime = timestamppb.Now()
|
||||
|
||||
sfCount := 0
|
||||
sfCount += len(ticket.GetSearchFields().GetDoubleArgs())
|
||||
@ -122,7 +122,7 @@ func doCreateBackfill(ctx context.Context, req *pb.CreateBackfillRequest, store
|
||||
}
|
||||
|
||||
backfill.Id = xid.New().String()
|
||||
backfill.CreateTime = ptypes.TimestampNow()
|
||||
backfill.CreateTime = timestamppb.Now()
|
||||
backfill.Generation = 1
|
||||
|
||||
sfCount := 0
|
||||
@ -171,7 +171,7 @@ func (s *frontendService) UpdateBackfill(ctx context.Context, req *pb.UpdateBack
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if _, err = m.Unlock(ctx); err != nil {
|
||||
if _, err = m.Unlock(context.Background()); err != nil {
|
||||
logger.WithError(err).Error("error on mutex unlock")
|
||||
}
|
||||
}()
|
||||
@ -209,7 +209,7 @@ func (s *frontendService) UpdateBackfill(ctx context.Context, req *pb.UpdateBack
|
||||
}
|
||||
|
||||
// DeleteBackfill deletes a Backfill by its ID.
|
||||
func (s *frontendService) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*empty.Empty, error) {
|
||||
func (s *frontendService) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*emptypb.Empty, error) {
|
||||
bfID := req.GetBackfillId()
|
||||
if bfID == "" {
|
||||
return nil, status.Errorf(codes.InvalidArgument, ".BackfillId is required")
|
||||
@ -222,7 +222,7 @@ func (s *frontendService) DeleteBackfill(ctx context.Context, req *pb.DeleteBack
|
||||
"error": err.Error(),
|
||||
}).Error("error on DeleteBackfill")
|
||||
}
|
||||
return &empty.Empty{}, nil
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
// DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage.
|
||||
@ -230,12 +230,12 @@ func (s *frontendService) DeleteBackfill(ctx context.Context, req *pb.DeleteBack
|
||||
// - If SearchFields exist in a Ticket, DeleteTicket will deindex the fields lazily.
|
||||
//
|
||||
// Users may still be able to assign/get a ticket after calling DeleteTicket on it.
|
||||
func (s *frontendService) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*empty.Empty, error) {
|
||||
func (s *frontendService) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*emptypb.Empty, error) {
|
||||
err := doDeleteTicket(ctx, req.GetTicketId(), s.store)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &empty.Empty{}, nil
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func doDeleteTicket(ctx context.Context, id string, store statestore.Service) error {
|
||||
@ -332,7 +332,7 @@ func (s *frontendService) AcknowledgeBackfill(ctx context.Context, req *pb.Ackno
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if _, err = m.Unlock(ctx); err != nil {
|
||||
if _, err = m.Unlock(context.Background()); err != nil {
|
||||
logger.WithError(err).Error("error on mutex unlock")
|
||||
}
|
||||
}()
|
||||
|
@ -22,11 +22,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/internal/statestore"
|
||||
statestoreTesting "open-match.dev/open-match/internal/statestore/testing"
|
||||
utilTesting "open-match.dev/open-match/internal/util/testing"
|
||||
@ -94,7 +94,7 @@ func TestCreateBackfill(t *testing.T) {
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
ctx := utilTesting.NewContext(t)
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
var testCases = []struct {
|
||||
description string
|
||||
request *pb.CreateBackfillRequest
|
||||
@ -116,7 +116,7 @@ func TestCreateBackfill(t *testing.T) {
|
||||
},
|
||||
{
|
||||
description: "createTime should not exist in input",
|
||||
request: &pb.CreateBackfillRequest{Backfill: &pb.Backfill{CreateTime: ptypes.TimestampNow()}},
|
||||
request: &pb.CreateBackfillRequest{Backfill: &pb.Backfill{CreateTime: timestamppb.Now()}},
|
||||
expectedCode: codes.InvalidArgument,
|
||||
expectedMessage: "backfills cannot be created with create time set",
|
||||
},
|
||||
@ -157,7 +157,7 @@ func TestCreateBackfill(t *testing.T) {
|
||||
// expect error with canceled context
|
||||
store, closer = statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
fs = frontendService{cfg, store}
|
||||
fs = frontendService{cfg: cfg, store: store}
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
|
||||
@ -178,7 +178,7 @@ func TestUpdateBackfill(t *testing.T) {
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
ctx := utilTesting.NewContext(t)
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
res, err := fs.CreateBackfill(ctx, &pb.CreateBackfillRequest{
|
||||
Backfill: &pb.Backfill{
|
||||
SearchFields: &pb.SearchFields{
|
||||
@ -248,7 +248,7 @@ func TestUpdateBackfill(t *testing.T) {
|
||||
|
||||
// expect error with canceled context
|
||||
store, closer = statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
fs = frontendService{cfg, store}
|
||||
fs = frontendService{cfg: cfg, store: store}
|
||||
defer closer()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
@ -370,7 +370,7 @@ func TestAcknowledgeBackfillValidation(t *testing.T) {
|
||||
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, cfg)
|
||||
defer closer()
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
bf, err := fs.AcknowledgeBackfill(ctx, test.request)
|
||||
require.Equal(t, codes.InvalidArgument.String(), status.Convert(err).Code().String())
|
||||
require.Equal(t, test.expectedMessage, status.Convert(err).Message())
|
||||
@ -399,7 +399,7 @@ func TestAcknowledgeBackfill(t *testing.T) {
|
||||
}
|
||||
err := store.CreateBackfill(ctx, fakeBackfill, []string{})
|
||||
require.NoError(t, err)
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
|
||||
resp, err := fs.AcknowledgeBackfill(ctx, &pb.AcknowledgeBackfillRequest{BackfillId: fakeBackfill.Id, Assignment: &pb.Assignment{Connection: "10.0.0.1"}})
|
||||
require.NoError(t, err)
|
||||
@ -580,7 +580,7 @@ func TestGetBackfill(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(utilTesting.NewContext(t))
|
||||
store, closer := statestoreTesting.NewStoreServiceForTesting(t, viper.New())
|
||||
defer closer()
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
|
||||
test.preAction(ctx, cancel, store)
|
||||
|
||||
@ -613,7 +613,7 @@ func TestDoDeleteBackfill(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
cfg := viper.New()
|
||||
fs := frontendService{cfg, store}
|
||||
fs := frontendService{cfg: cfg, store: store}
|
||||
|
||||
tests := []struct {
|
||||
description string
|
||||
|
@ -177,7 +177,7 @@ func updateTicketCache(store statestore.Service, value interface{}) error {
|
||||
}
|
||||
|
||||
stats.Record(context.Background(), cacheTotalItems.M(int64(previousCount)))
|
||||
stats.Record(context.Background(), totalActiveTickets.M(int64(len(tickets)-len(toFetch))))
|
||||
stats.Record(context.Background(), totalActiveTickets.M(int64(len(currentAll))))
|
||||
stats.Record(context.Background(), cacheFetchedItems.M(int64(len(toFetch))))
|
||||
stats.Record(context.Background(), cacheUpdateLatency.M(float64(time.Since(t))/float64(time.Millisecond)))
|
||||
stats.Record(context.Background(), totalPendingTickets.M(int64(len(toFetch))))
|
||||
|
@ -48,7 +48,7 @@ var (
|
||||
Aggregation: view.LastValue(),
|
||||
}
|
||||
backfillsPerQueryView = &view.View{
|
||||
Measure: ticketsPerQuery,
|
||||
Measure: backfillsPerQuery,
|
||||
Name: "open-match.dev/query/backfills_per_query",
|
||||
Description: "Backfills per query",
|
||||
Aggregation: telemetry.DefaultCountDistribution,
|
||||
|
@ -133,7 +133,7 @@ var getTests = []struct {
|
||||
},
|
||||
}
|
||||
|
||||
//nolint: gocritic, staticcheck
|
||||
// nolint: gocritic, staticcheck
|
||||
func Test_Get(t *testing.T) {
|
||||
for _, tt := range getTests {
|
||||
tt := tt
|
||||
|
@ -58,6 +58,30 @@ func Read() (*viper.Viper, error) {
|
||||
return nil, fmt.Errorf("fatal error reading override config file, desc: %s", err.Error())
|
||||
}
|
||||
|
||||
if !cfg.IsSet("registrationInterval") {
|
||||
log.Printf("config: registrationInterval is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
if !cfg.IsSet("proposalCollectionInterval") {
|
||||
log.Printf("config: proposalCollectionInterval is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
if !cfg.IsSet("pendingReleaseTimeout") {
|
||||
log.Printf("config: pendingReleaseTimeout is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
if !cfg.IsSet("assignedDeleteTimeout") {
|
||||
log.Printf("config: assignedDeleteTimeout is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
if !cfg.IsSet("queryPageSize") {
|
||||
log.Printf("config: queryPageSize is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
if !cfg.IsSet("backfillLockTimeout") {
|
||||
log.Printf("config: backfillLockTimeout is not set in matchmaker_config_override.yaml")
|
||||
}
|
||||
|
||||
// Look for updates to the config; in Kubernetes, this is implemented using
|
||||
// a ConfigMap that is written to the matchmaker_config_override.yaml file, which is
|
||||
// what the Open Match components using Viper monitor for changes.
|
||||
|
@ -1,3 +1,4 @@
|
||||
//go:build !race
|
||||
// +build !race
|
||||
|
||||
// Copyright 2019 Google LLC
|
||||
|
@ -20,11 +20,10 @@ package filter
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -53,15 +52,17 @@ func NewPoolFilter(pool *pb.Pool) (*PoolFilter, error) {
|
||||
var err error
|
||||
|
||||
if pool.GetCreatedBefore() != nil {
|
||||
if cb, err = ptypes.Timestamp(pool.GetCreatedBefore()); err != nil {
|
||||
if err = pool.GetCreatedBefore().CheckValid(); err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, ".invalid created_before value")
|
||||
}
|
||||
cb = pool.GetCreatedBefore().AsTime()
|
||||
}
|
||||
|
||||
if pool.GetCreatedAfter() != nil {
|
||||
if ca, err = ptypes.Timestamp(pool.GetCreatedAfter()); err != nil {
|
||||
if err = pool.GetCreatedAfter().CheckValid(); err != nil {
|
||||
return nil, status.Error(codes.InvalidArgument, ".invalid created_after value")
|
||||
}
|
||||
ca = pool.GetCreatedAfter().AsTime()
|
||||
}
|
||||
|
||||
return &PoolFilter{
|
||||
@ -76,7 +77,7 @@ func NewPoolFilter(pool *pb.Pool) (*PoolFilter, error) {
|
||||
type filteredEntity interface {
|
||||
GetId() string
|
||||
GetSearchFields() *pb.SearchFields
|
||||
GetCreateTime() *timestamp.Timestamp
|
||||
GetCreateTime() *timestamppb.Timestamp
|
||||
}
|
||||
|
||||
// In returns true if the Ticket meets all the criteria for this PoolFilter.
|
||||
@ -89,7 +90,8 @@ func (pf *PoolFilter) In(entity filteredEntity) bool {
|
||||
|
||||
if !pf.CreatedAfter.IsZero() || !pf.CreatedBefore.IsZero() {
|
||||
// CreateTime is only populated by Open Match and hence expected to be valid.
|
||||
if ct, err := ptypes.Timestamp(entity.GetCreateTime()); err == nil {
|
||||
if err := entity.GetCreateTime().CheckValid(); err == nil {
|
||||
ct := entity.GetCreateTime().AsTime()
|
||||
if !pf.CreatedAfter.IsZero() {
|
||||
if !ct.After(pf.CreatedAfter) {
|
||||
return false
|
||||
|
@ -17,11 +17,10 @@ package filter
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/internal/filter/testcases"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
@ -43,11 +42,11 @@ func TestMeetsCriteria(t *testing.T) {
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
testInclusion(t, tc.Pool, &pb.Ticket{
|
||||
SearchFields: tc.SearchFields,
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
})
|
||||
testInclusion(t, tc.Pool, &pb.Backfill{
|
||||
SearchFields: tc.SearchFields,
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -68,11 +67,11 @@ func TestMeetsCriteria(t *testing.T) {
|
||||
t.Run(tc.Name, func(t *testing.T) {
|
||||
testExclusion(t, tc.Pool, &pb.Ticket{
|
||||
SearchFields: tc.SearchFields,
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
})
|
||||
testExclusion(t, tc.Pool, &pb.Backfill{
|
||||
SearchFields: tc.SearchFields,
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -88,7 +87,7 @@ func TestValidPoolFilter(t *testing.T) {
|
||||
{
|
||||
"invalid create before",
|
||||
&pb.Pool{
|
||||
CreatedBefore: ×tamp.Timestamp{Nanos: -1},
|
||||
CreatedBefore: ×tamppb.Timestamp{Nanos: -1},
|
||||
},
|
||||
codes.InvalidArgument,
|
||||
".invalid created_before value",
|
||||
@ -96,7 +95,7 @@ func TestValidPoolFilter(t *testing.T) {
|
||||
{
|
||||
"invalid create after",
|
||||
&pb.Pool{
|
||||
CreatedAfter: ×tamp.Timestamp{Nanos: -1},
|
||||
CreatedAfter: ×tamppb.Timestamp{Nanos: -1},
|
||||
},
|
||||
codes.InvalidArgument,
|
||||
".invalid created_after value",
|
||||
|
@ -20,8 +20,7 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
tspb "github.com/golang/protobuf/ptypes/timestamp"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -447,9 +446,9 @@ func multipleFilters(doubleRange, stringEquals, tagPresent bool) TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func timestamp(t time.Time) *tspb.Timestamp {
|
||||
tsp, err := ptypes.TimestampProto(t)
|
||||
if err != nil {
|
||||
func timestamp(t time.Time) *timestamppb.Timestamp {
|
||||
tsp := timestamppb.New(t)
|
||||
if err := tsp.CheckValid(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: internal/api/messages.proto
|
||||
|
||||
package ipb
|
||||
|
@ -14,17 +14,13 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: internal/api/synchronizer.proto
|
||||
|
||||
package ipb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
pb "open-match.dev/open-match/pkg/pb"
|
||||
@ -266,119 +262,3 @@ func file_internal_api_synchronizer_proto_init() {
|
||||
file_internal_api_synchronizer_proto_goTypes = nil
|
||||
file_internal_api_synchronizer_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// SynchronizerClient is the client API for Synchronizer service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type SynchronizerClient interface {
|
||||
// Synchronize signals the caller when it is safe to run mmfs, collects the
|
||||
// mmfs' proposals, and returns the evaluated matches.
|
||||
Synchronize(ctx context.Context, opts ...grpc.CallOption) (Synchronizer_SynchronizeClient, error)
|
||||
}
|
||||
|
||||
type synchronizerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSynchronizerClient(cc grpc.ClientConnInterface) SynchronizerClient {
|
||||
return &synchronizerClient{cc}
|
||||
}
|
||||
|
||||
func (c *synchronizerClient) Synchronize(ctx context.Context, opts ...grpc.CallOption) (Synchronizer_SynchronizeClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Synchronizer_serviceDesc.Streams[0], "/openmatch.internal.Synchronizer/Synchronize", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &synchronizerSynchronizeClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Synchronizer_SynchronizeClient interface {
|
||||
Send(*SynchronizeRequest) error
|
||||
Recv() (*SynchronizeResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type synchronizerSynchronizeClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeClient) Send(m *SynchronizeRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeClient) Recv() (*SynchronizeResponse, error) {
|
||||
m := new(SynchronizeResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SynchronizerServer is the server API for Synchronizer service.
|
||||
type SynchronizerServer interface {
|
||||
// Synchronize signals the caller when it is safe to run mmfs, collects the
|
||||
// mmfs' proposals, and returns the evaluated matches.
|
||||
Synchronize(Synchronizer_SynchronizeServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSynchronizerServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSynchronizerServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSynchronizerServer) Synchronize(Synchronizer_SynchronizeServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Synchronize not implemented")
|
||||
}
|
||||
|
||||
func RegisterSynchronizerServer(s *grpc.Server, srv SynchronizerServer) {
|
||||
s.RegisterService(&_Synchronizer_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Synchronizer_Synchronize_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SynchronizerServer).Synchronize(&synchronizerSynchronizeServer{stream})
|
||||
}
|
||||
|
||||
type Synchronizer_SynchronizeServer interface {
|
||||
Send(*SynchronizeResponse) error
|
||||
Recv() (*SynchronizeRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type synchronizerSynchronizeServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeServer) Send(m *SynchronizeResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeServer) Recv() (*SynchronizeRequest, error) {
|
||||
m := new(SynchronizeRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _Synchronizer_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.internal.Synchronizer",
|
||||
HandlerType: (*SynchronizerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Synchronize",
|
||||
Handler: _Synchronizer_Synchronize_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "internal/api/synchronizer.proto",
|
||||
}
|
||||
|
157
internal/ipb/synchronizer_grpc.pb.go
Normal file
157
internal/ipb/synchronizer_grpc.pb.go
Normal file
@ -0,0 +1,157 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: internal/api/synchronizer.proto
|
||||
|
||||
package ipb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Synchronizer_Synchronize_FullMethodName = "/openmatch.internal.Synchronizer/Synchronize"
|
||||
)
|
||||
|
||||
// SynchronizerClient is the client API for Synchronizer service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type SynchronizerClient interface {
|
||||
// Synchronize signals the caller when it is safe to run mmfs, collects the
|
||||
// mmfs' proposals, and returns the evaluated matches.
|
||||
Synchronize(ctx context.Context, opts ...grpc.CallOption) (Synchronizer_SynchronizeClient, error)
|
||||
}
|
||||
|
||||
type synchronizerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewSynchronizerClient(cc grpc.ClientConnInterface) SynchronizerClient {
|
||||
return &synchronizerClient{cc}
|
||||
}
|
||||
|
||||
func (c *synchronizerClient) Synchronize(ctx context.Context, opts ...grpc.CallOption) (Synchronizer_SynchronizeClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Synchronizer_ServiceDesc.Streams[0], Synchronizer_Synchronize_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &synchronizerSynchronizeClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Synchronizer_SynchronizeClient interface {
|
||||
Send(*SynchronizeRequest) error
|
||||
Recv() (*SynchronizeResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type synchronizerSynchronizeClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeClient) Send(m *SynchronizeRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeClient) Recv() (*SynchronizeResponse, error) {
|
||||
m := new(SynchronizeResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SynchronizerServer is the server API for Synchronizer service.
|
||||
// All implementations should embed UnimplementedSynchronizerServer
|
||||
// for forward compatibility
|
||||
type SynchronizerServer interface {
|
||||
// Synchronize signals the caller when it is safe to run mmfs, collects the
|
||||
// mmfs' proposals, and returns the evaluated matches.
|
||||
Synchronize(Synchronizer_SynchronizeServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSynchronizerServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedSynchronizerServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSynchronizerServer) Synchronize(Synchronizer_SynchronizeServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Synchronize not implemented")
|
||||
}
|
||||
|
||||
// UnsafeSynchronizerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SynchronizerServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeSynchronizerServer interface {
|
||||
mustEmbedUnimplementedSynchronizerServer()
|
||||
}
|
||||
|
||||
func RegisterSynchronizerServer(s grpc.ServiceRegistrar, srv SynchronizerServer) {
|
||||
s.RegisterService(&Synchronizer_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Synchronizer_Synchronize_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SynchronizerServer).Synchronize(&synchronizerSynchronizeServer{stream})
|
||||
}
|
||||
|
||||
type Synchronizer_SynchronizeServer interface {
|
||||
Send(*SynchronizeResponse) error
|
||||
Recv() (*SynchronizeRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type synchronizerSynchronizeServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeServer) Send(m *SynchronizeResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *synchronizerSynchronizeServer) Recv() (*SynchronizeRequest, error) {
|
||||
m := new(SynchronizeRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Synchronizer_ServiceDesc is the grpc.ServiceDesc for Synchronizer service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Synchronizer_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.internal.Synchronizer",
|
||||
HandlerType: (*SynchronizerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Synchronize",
|
||||
Handler: _Synchronizer_Synchronize_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "internal/api/synchronizer.proto",
|
||||
}
|
@ -24,8 +24,8 @@ import (
|
||||
)
|
||||
|
||||
// ConfigureLogging sets up open match logrus instance using the logging section of the matchmaker_config.json
|
||||
// - log line format (text[default] or json)
|
||||
// - min log level to include (debug, info [default], warn, error, fatal, panic)
|
||||
// - log line format (text[default] or json)
|
||||
// - min log level to include (debug, info [default], warn, error, fatal, panic)
|
||||
func ConfigureLogging(cfg config.View) {
|
||||
logrus.SetFormatter(newFormatter(cfg.GetString("logging.format")))
|
||||
level := toLevel(cfg.GetString("logging.level"))
|
||||
|
@ -37,6 +37,7 @@ import (
|
||||
"go.opencensus.io/plugin/ochttp"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
@ -134,7 +135,7 @@ func GRPCClientFromEndpoint(cfg config.View, address string) (*grpc.ClientConn,
|
||||
|
||||
grpcOptions = append(grpcOptions, grpc.WithTransportCredentials(tc))
|
||||
} else {
|
||||
grpcOptions = append(grpcOptions, grpc.WithInsecure())
|
||||
grpcOptions = append(grpcOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
}
|
||||
|
||||
return grpc.Dial(address, grpcOptions...)
|
||||
@ -152,7 +153,7 @@ func GRPCClientFromParams(params *ClientParams) (*grpc.ClientConn, error) {
|
||||
}
|
||||
grpcOptions = append(grpcOptions, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(trustedCertPool, "")))
|
||||
} else {
|
||||
grpcOptions = append(grpcOptions, grpc.WithInsecure())
|
||||
grpcOptions = append(grpcOptions, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
}
|
||||
|
||||
return grpc.Dial(params.Address, grpcOptions...)
|
||||
|
@ -30,9 +30,9 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/telemetry"
|
||||
shellTesting "open-match.dev/open-match/internal/testing"
|
||||
utilTesting "open-match.dev/open-match/internal/util/testing"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
shellTesting "open-match.dev/open-match/testing"
|
||||
certgenTesting "open-match.dev/open-match/tools/certgen/testing"
|
||||
)
|
||||
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"open-match.dev/open-match/internal/telemetry"
|
||||
)
|
||||
@ -73,7 +74,7 @@ func (s *insecureServer) start(params *ServerParams) error {
|
||||
|
||||
for _, handlerFunc := range params.handlersForGrpcProxy {
|
||||
dialOpts := newGRPCDialOptions(params.enableMetrics, params.enableRPCLogging, params.enableRPCPayloadLogging)
|
||||
dialOpts = append(dialOpts, grpc.WithInsecure())
|
||||
dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
if err := handlerFunc(ctx, s.proxyMux, s.grpcListener.Addr().String(), dialOpts); err != nil {
|
||||
cancel()
|
||||
return errors.WithStack(err)
|
||||
|
@ -24,7 +24,8 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
shellTesting "open-match.dev/open-match/internal/testing"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
shellTesting "open-match.dev/open-match/testing"
|
||||
)
|
||||
|
||||
func TestInsecureStartStop(t *testing.T) {
|
||||
@ -42,7 +43,7 @@ func TestInsecureStartStop(t *testing.T) {
|
||||
err := s.start(params)
|
||||
require.Nil(err)
|
||||
|
||||
conn, err := grpc.Dial(fmt.Sprintf(":%s", MustGetPortNumber(grpcL)), grpc.WithInsecure())
|
||||
conn, err := grpc.Dial(fmt.Sprintf(":%s", MustGetPortNumber(grpcL)), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
require.Nil(err)
|
||||
defer conn.Close()
|
||||
|
||||
|
@ -24,10 +24,11 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"open-match.dev/open-match/internal/telemetry"
|
||||
shellTesting "open-match.dev/open-match/internal/testing"
|
||||
utilTesting "open-match.dev/open-match/internal/util/testing"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
shellTesting "open-match.dev/open-match/testing"
|
||||
)
|
||||
|
||||
func TestStartStopServer(t *testing.T) {
|
||||
@ -46,7 +47,7 @@ func TestStartStopServer(t *testing.T) {
|
||||
err := s.Start(params)
|
||||
require.Nil(err)
|
||||
|
||||
conn, err := grpc.Dial(fmt.Sprintf(":%s", MustGetPortNumber(grpcL)), grpc.WithInsecure())
|
||||
conn, err := grpc.Dial(fmt.Sprintf(":%s", MustGetPortNumber(grpcL)), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
require.Nil(err)
|
||||
|
||||
endpoint := fmt.Sprintf("http://localhost:%s", MustGetPortNumber(httpL))
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
shellTesting "open-match.dev/open-match/internal/testing"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
shellTesting "open-match.dev/open-match/testing"
|
||||
certgenTesting "open-match.dev/open-match/tools/certgen/testing"
|
||||
)
|
||||
|
||||
|
@ -20,12 +20,12 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/gomodule/redigo/redis"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/ipb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
@ -193,7 +193,7 @@ func (rb *redisBackend) UpdateBackfill(ctx context.Context, backfill *pb.Backfil
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
expired, err := isBackfillExpired(redisConn, backfill.Id, getBackfillReleaseTimeout(rb.cfg))
|
||||
expired, err := isBackfillExpired(redisConn, backfill.Id, getBackfillReleaseTimeoutFraction(rb.cfg))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -242,7 +242,7 @@ func (rb *redisBackend) DeleteBackfillCompletely(ctx context.Context, id string)
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if _, err = m.Unlock(ctx); err != nil {
|
||||
if _, err = m.Unlock(context.Background()); err != nil {
|
||||
logger.WithError(err).Error("error on mutex unlock")
|
||||
}
|
||||
}()
|
||||
@ -332,7 +332,7 @@ func (rb *redisBackend) UpdateAcknowledgmentTimestamp(ctx context.Context, id st
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
expired, err := isBackfillExpired(redisConn, id, getBackfillReleaseTimeout(rb.cfg))
|
||||
expired, err := isBackfillExpired(redisConn, id, getBackfillReleaseTimeoutFraction(rb.cfg))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -364,7 +364,7 @@ func (rb *redisBackend) GetExpiredBackfillIDs(ctx context.Context) ([]string, er
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
ttl := getBackfillReleaseTimeout(rb.cfg)
|
||||
ttl := getBackfillReleaseTimeoutFraction(rb.cfg)
|
||||
curTime := time.Now()
|
||||
endTimeInt := curTime.Add(-ttl).UnixNano()
|
||||
startTimeInt := 0
|
||||
@ -431,7 +431,7 @@ func (rb *redisBackend) GetIndexedBackfills(ctx context.Context) (map[string]int
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
ttl := getBackfillReleaseTimeout(rb.cfg)
|
||||
ttl := getBackfillReleaseTimeoutFraction(rb.cfg)
|
||||
curTime := time.Now()
|
||||
endTimeInt := curTime.Add(time.Hour).UnixNano()
|
||||
startTimeInt := curTime.Add(-ttl).UnixNano()
|
||||
@ -463,7 +463,22 @@ func (rb *redisBackend) GetIndexedBackfills(ctx context.Context) (map[string]int
|
||||
}
|
||||
|
||||
func getBackfillReleaseTimeout(cfg config.View) time.Duration {
|
||||
const (
|
||||
name = "pendingReleaseTimeout"
|
||||
// Default timeout to release backfill. This value
|
||||
// will be used if pendingReleaseTimeout is not configured.
|
||||
defaultpendingReleaseTimeout time.Duration = 1 * time.Minute
|
||||
)
|
||||
|
||||
if !cfg.IsSet(name) {
|
||||
return defaultpendingReleaseTimeout
|
||||
}
|
||||
|
||||
return cfg.GetDuration(name)
|
||||
}
|
||||
|
||||
func getBackfillReleaseTimeoutFraction(cfg config.View) time.Duration {
|
||||
// Use a fraction 80% of pendingRelease Tickets TTL
|
||||
ttl := cfg.GetDuration("pendingReleaseTimeout") / 5 * 4
|
||||
ttl := getBackfillReleaseTimeout(cfg) / 5 * 4
|
||||
return ttl
|
||||
}
|
||||
|
@ -21,14 +21,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/golang/protobuf/ptypes/wrappers"
|
||||
"github.com/gomodule/redigo/redis"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/wrapperspb"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
utilTesting "open-match.dev/open-match/internal/util/testing"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
@ -127,8 +126,8 @@ func TestUpdateExistingBackfillNoError(t *testing.T) {
|
||||
ctx := utilTesting.NewContext(t)
|
||||
|
||||
// ARRANGE
|
||||
v := &wrappers.DoubleValue{Value: 123}
|
||||
a, err := ptypes.MarshalAny(v)
|
||||
v := &wrapperspb.DoubleValue{Value: 123}
|
||||
a, err := anypb.New(v)
|
||||
require.NoError(t, err)
|
||||
|
||||
existingBF := pb.Backfill{
|
||||
@ -137,7 +136,7 @@ func TestUpdateExistingBackfillNoError(t *testing.T) {
|
||||
SearchFields: &pb.SearchFields{
|
||||
Tags: []string{"123"},
|
||||
},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"qwe": a,
|
||||
},
|
||||
}
|
||||
@ -151,7 +150,7 @@ func TestUpdateExistingBackfillNoError(t *testing.T) {
|
||||
SearchFields: &pb.SearchFields{
|
||||
Tags: []string{"456"},
|
||||
},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"xyz": a,
|
||||
},
|
||||
}
|
||||
@ -172,8 +171,8 @@ func TestUpdateExistingBackfillNoError(t *testing.T) {
|
||||
require.NotNil(t, backfillActual.SearchFields)
|
||||
require.Equal(t, updateBF.SearchFields.Tags, backfillActual.SearchFields.Tags)
|
||||
|
||||
res := &wrappers.DoubleValue{}
|
||||
err = ptypes.UnmarshalAny(backfillActual.Extensions["xyz"], res)
|
||||
res := &wrapperspb.DoubleValue{}
|
||||
err = backfillActual.Extensions["xyz"].UnmarshalTo(res)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, v.Value, res.Value)
|
||||
}
|
||||
@ -186,8 +185,8 @@ func TestUpdateBackfillDoNotExistCanNotUpdate(t *testing.T) {
|
||||
defer service.Close()
|
||||
ctx := utilTesting.NewContext(t)
|
||||
|
||||
v := &wrappers.DoubleValue{Value: 123}
|
||||
a, err := ptypes.MarshalAny(v)
|
||||
v := &wrapperspb.DoubleValue{Value: 123}
|
||||
a, err := anypb.New(v)
|
||||
require.NoError(t, err)
|
||||
|
||||
updateBF := pb.Backfill{
|
||||
@ -196,7 +195,7 @@ func TestUpdateBackfillDoNotExistCanNotUpdate(t *testing.T) {
|
||||
SearchFields: &pb.SearchFields{
|
||||
Tags: []string{"456"},
|
||||
},
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"xyz": a,
|
||||
},
|
||||
}
|
||||
|
@ -41,11 +41,11 @@ var (
|
||||
|
||||
// NewMutex returns a new distributed mutex with given name
|
||||
func (rb *redisBackend) NewMutex(key string) RedisLocker {
|
||||
m := redsync.NewMutex(fmt.Sprintf("lock/%s", key), rs.WithExpiry(rb.cfg.GetDuration("backfillLockTimeout")))
|
||||
m := redsync.NewMutex(fmt.Sprintf("lock/%s", key), rs.WithExpiry(getBackfillLockTimeout(rb.cfg)))
|
||||
return redisBackend{mutex: m}
|
||||
}
|
||||
|
||||
//Lock locks r. In case it returns an error on failure, you may retry to acquire the lock by calling this method again.
|
||||
// Lock locks r. In case it returns an error on failure, you may retry to acquire the lock by calling this method again.
|
||||
func (rb redisBackend) Lock(ctx context.Context) error {
|
||||
return rb.mutex.LockContext(ctx)
|
||||
}
|
||||
@ -246,3 +246,18 @@ func handleConnectionClose(conn *redis.Conn) {
|
||||
}).Debug("failed to close redis client connection.")
|
||||
}
|
||||
}
|
||||
|
||||
func getBackfillLockTimeout(cfg config.View) time.Duration {
|
||||
const (
|
||||
name = "backfillLockTimeout"
|
||||
// Default timeout to lock backfill. This value
|
||||
// will be used if backfillLockTimeout is not configured.
|
||||
defaultBackfillLockTimeout time.Duration = 1 * time.Minute
|
||||
)
|
||||
|
||||
if !cfg.IsSet(name) {
|
||||
return defaultBackfillLockTimeout
|
||||
}
|
||||
|
||||
return cfg.GetDuration(name)
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cenkalti/backoff"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/gomodule/redigo/redis"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
@ -36,6 +36,7 @@ const (
|
||||
|
||||
// CreateTicket creates a new Ticket in the state storage. If the id already exists, it will be overwritten.
|
||||
func (rb *redisBackend) CreateTicket(ctx context.Context, ticket *pb.Ticket) error {
|
||||
|
||||
redisConn, err := rb.redisPool.GetContext(ctx)
|
||||
if err != nil {
|
||||
return status.Errorf(codes.Unavailable, "CreateTicket, id: %s, failed to connect to redis: %v", ticket.GetId(), err)
|
||||
@ -48,6 +49,10 @@ func (rb *redisBackend) CreateTicket(ctx context.Context, ticket *pb.Ticket) err
|
||||
return status.Errorf(codes.Internal, "%v", err)
|
||||
}
|
||||
|
||||
if value == nil {
|
||||
return status.Errorf(codes.Internal, "failed to marshal the ticket proto, id: %s: proto: Marshal called with nil", ticket.GetId())
|
||||
}
|
||||
|
||||
_, err = redisConn.Do("SET", ticket.GetId(), value)
|
||||
if err != nil {
|
||||
err = errors.Wrapf(err, "failed to set the value for ticket, id: %s", ticket.GetId())
|
||||
@ -155,7 +160,7 @@ func (rb *redisBackend) GetIndexedIDSet(ctx context.Context) (map[string]struct{
|
||||
}
|
||||
defer handleConnectionClose(&redisConn)
|
||||
|
||||
ttl := rb.cfg.GetDuration("pendingReleaseTimeout")
|
||||
ttl := getBackfillReleaseTimeout(rb.cfg)
|
||||
curTime := time.Now()
|
||||
endTimeInt := curTime.Add(time.Hour).UnixNano()
|
||||
startTimeInt := curTime.Add(-ttl).UnixNano()
|
||||
|
@ -974,7 +974,7 @@ func createRedis(t *testing.T, withSentinel bool, withPassword string) (config.V
|
||||
}
|
||||
}
|
||||
|
||||
//nolint: unparam
|
||||
// nolint: unparam
|
||||
// generateTickets creates a proper amount of ticket, returns a slice of tickets and a slice of tickets ids
|
||||
func generateTickets(ctx context.Context, t *testing.T, service Service, amount int) ([]*pb.Ticket, []string) {
|
||||
tickets := make([]*pb.Ticket, 0, amount)
|
||||
|
@ -1,57 +0,0 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package telemetry
|
||||
|
||||
import (
|
||||
"contrib.go.opencensus.io/exporter/jaeger"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
|
||||
func bindJaeger(p Params, b Bindings) error {
|
||||
cfg := p.Config()
|
||||
|
||||
if !cfg.GetBool("telemetry.jaeger.enable") {
|
||||
logger.Info("Jaeger Tracing: Disabled")
|
||||
return nil
|
||||
}
|
||||
|
||||
agentEndpointURI := cfg.GetString("telemetry.jaeger.agentEndpoint")
|
||||
collectorEndpointURI := cfg.GetString("telemetry.jaeger.collectorEndpoint")
|
||||
serviceName := p.ServiceName()
|
||||
|
||||
logger.WithFields(logrus.Fields{
|
||||
"agentEndpoint": agentEndpointURI,
|
||||
"collectorEndpoint": collectorEndpointURI,
|
||||
"serviceName": serviceName,
|
||||
}).Info("Jaeger Tracing: ENABLED")
|
||||
|
||||
je, err := jaeger.NewExporter(jaeger.Options{
|
||||
AgentEndpoint: agentEndpointURI,
|
||||
CollectorEndpoint: collectorEndpointURI,
|
||||
ServiceName: serviceName,
|
||||
})
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "Failed to create the Jaeger exporter")
|
||||
}
|
||||
|
||||
trace.RegisterExporter(je)
|
||||
b.AddCloser(func() {
|
||||
trace.UnregisterExporter(je)
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
@ -36,7 +36,6 @@ var (
|
||||
func Setup(p Params, b Bindings) error {
|
||||
bindings := []func(p Params, b Bindings) error{
|
||||
configureOpenCensus,
|
||||
bindJaeger,
|
||||
bindPrometheus,
|
||||
bindStackDriverMetrics,
|
||||
bindOpenCensusAgent,
|
||||
|
@ -24,6 +24,7 @@ import (
|
||||
grpc_validator "github.com/grpc-ecosystem/go-grpc-middleware/validator"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"google.golang.org/grpc/resolver"
|
||||
)
|
||||
@ -50,7 +51,7 @@ func NewGRPCDialOptions(grpcLogger *logrus.Entry) []grpc.DialOption {
|
||||
grpc_tracing.UnaryClientInterceptor(),
|
||||
}
|
||||
opts := []grpc.DialOption{
|
||||
grpc.WithInsecure(),
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithStreamInterceptor(grpc_middleware.ChainStreamClient(si...)),
|
||||
grpc.WithUnaryInterceptor(grpc_middleware.ChainUnaryClient(ui...)),
|
||||
grpc.WithDefaultServiceConfig(`{"loadBalancingPolicy":"round_robin"}`),
|
||||
|
@ -14,19 +14,15 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/backend.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -748,60 +744,60 @@ var file_api_backend_proto_rawDesc = []byte{
|
||||
0x74, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x46, 0x65,
|
||||
0x74, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x30,
|
||||
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x30,
|
||||
0x01, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e,
|
||||
0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x22, 0x21,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x61, 0x73, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x3a, 0x01,
|
||||
0x2a, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x61, 0x73,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
|
||||
0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65,
|
||||
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x69, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e,
|
||||
0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73,
|
||||
0x3a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x90, 0x01, 0x0a, 0x11,
|
||||
0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x73, 0x3a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x11,
|
||||
0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x73, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x52, 0x65,
|
||||
0x6c, 0x65, 0x61, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x41, 0x6c, 0x6c, 0x54, 0x69, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e,
|
||||
0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73,
|
||||
0x3a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x61, 0x6c, 0x6c, 0x3a, 0x01, 0x2a, 0x42, 0x8a,
|
||||
0x03, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65,
|
||||
0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67,
|
||||
0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x92,
|
||||
0x41, 0xd8, 0x02, 0x12, 0xb1, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x22,
|
||||
0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68,
|
||||
0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70,
|
||||
0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62,
|
||||
0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e,
|
||||
0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52,
|
||||
0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e,
|
||||
0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78,
|
||||
0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18,
|
||||
0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d,
|
||||
0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
|
||||
0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76,
|
||||
0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x73, 0x3a, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x61, 0x6c, 0x6c, 0x42, 0x8a,
|
||||
0x03, 0x92, 0x41, 0xd8, 0x02, 0x12, 0xb1, 0x01, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e,
|
||||
0x64, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12,
|
||||
0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12,
|
||||
0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72,
|
||||
0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43,
|
||||
0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
||||
0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f,
|
||||
0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20,
|
||||
0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d,
|
||||
0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63,
|
||||
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70,
|
||||
0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x5a, 0x20, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa,
|
||||
0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
@ -1021,249 +1017,3 @@ func file_api_backend_proto_init() {
|
||||
file_api_backend_proto_goTypes = nil
|
||||
file_api_backend_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// BackendServiceClient is the client API for BackendService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type BackendServiceClient interface {
|
||||
// FetchMatches triggers a MatchFunction with the specified MatchProfile and
|
||||
// returns a set of matches generated by the Match Making Function, and
|
||||
// accepted by the evaluator.
|
||||
// Tickets in matches returned by FetchMatches are moved from active to
|
||||
// pending, and will not be returned by query.
|
||||
FetchMatches(ctx context.Context, in *FetchMatchesRequest, opts ...grpc.CallOption) (BackendService_FetchMatchesClient, error)
|
||||
// AssignTickets overwrites the Assignment field of the input TicketIds.
|
||||
AssignTickets(ctx context.Context, in *AssignTicketsRequest, opts ...grpc.CallOption) (*AssignTicketsResponse, error)
|
||||
// ReleaseTickets moves tickets from the pending state, to the active state.
|
||||
// This enables them to be returned by query, and find different matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseTickets(ctx context.Context, in *ReleaseTicketsRequest, opts ...grpc.CallOption) (*ReleaseTicketsResponse, error)
|
||||
// ReleaseAllTickets moves all tickets from the pending state, to the active
|
||||
// state. This enables them to be returned by query, and find different
|
||||
// matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseAllTickets(ctx context.Context, in *ReleaseAllTicketsRequest, opts ...grpc.CallOption) (*ReleaseAllTicketsResponse, error)
|
||||
}
|
||||
|
||||
type backendServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackendServiceClient(cc grpc.ClientConnInterface) BackendServiceClient {
|
||||
return &backendServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) FetchMatches(ctx context.Context, in *FetchMatchesRequest, opts ...grpc.CallOption) (BackendService_FetchMatchesClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_BackendService_serviceDesc.Streams[0], "/openmatch.BackendService/FetchMatches", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &backendServiceFetchMatchesClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type BackendService_FetchMatchesClient interface {
|
||||
Recv() (*FetchMatchesResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type backendServiceFetchMatchesClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *backendServiceFetchMatchesClient) Recv() (*FetchMatchesResponse, error) {
|
||||
m := new(FetchMatchesResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) AssignTickets(ctx context.Context, in *AssignTicketsRequest, opts ...grpc.CallOption) (*AssignTicketsResponse, error) {
|
||||
out := new(AssignTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.BackendService/AssignTickets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) ReleaseTickets(ctx context.Context, in *ReleaseTicketsRequest, opts ...grpc.CallOption) (*ReleaseTicketsResponse, error) {
|
||||
out := new(ReleaseTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.BackendService/ReleaseTickets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) ReleaseAllTickets(ctx context.Context, in *ReleaseAllTicketsRequest, opts ...grpc.CallOption) (*ReleaseAllTicketsResponse, error) {
|
||||
out := new(ReleaseAllTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.BackendService/ReleaseAllTickets", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackendServiceServer is the server API for BackendService service.
|
||||
type BackendServiceServer interface {
|
||||
// FetchMatches triggers a MatchFunction with the specified MatchProfile and
|
||||
// returns a set of matches generated by the Match Making Function, and
|
||||
// accepted by the evaluator.
|
||||
// Tickets in matches returned by FetchMatches are moved from active to
|
||||
// pending, and will not be returned by query.
|
||||
FetchMatches(*FetchMatchesRequest, BackendService_FetchMatchesServer) error
|
||||
// AssignTickets overwrites the Assignment field of the input TicketIds.
|
||||
AssignTickets(context.Context, *AssignTicketsRequest) (*AssignTicketsResponse, error)
|
||||
// ReleaseTickets moves tickets from the pending state, to the active state.
|
||||
// This enables them to be returned by query, and find different matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseTickets(context.Context, *ReleaseTicketsRequest) (*ReleaseTicketsResponse, error)
|
||||
// ReleaseAllTickets moves all tickets from the pending state, to the active
|
||||
// state. This enables them to be returned by query, and find different
|
||||
// matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseAllTickets(context.Context, *ReleaseAllTicketsRequest) (*ReleaseAllTicketsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackendServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackendServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedBackendServiceServer) FetchMatches(*FetchMatchesRequest, BackendService_FetchMatchesServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method FetchMatches not implemented")
|
||||
}
|
||||
func (*UnimplementedBackendServiceServer) AssignTickets(context.Context, *AssignTicketsRequest) (*AssignTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AssignTickets not implemented")
|
||||
}
|
||||
func (*UnimplementedBackendServiceServer) ReleaseTickets(context.Context, *ReleaseTicketsRequest) (*ReleaseTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseTickets not implemented")
|
||||
}
|
||||
func (*UnimplementedBackendServiceServer) ReleaseAllTickets(context.Context, *ReleaseAllTicketsRequest) (*ReleaseAllTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseAllTickets not implemented")
|
||||
}
|
||||
|
||||
func RegisterBackendServiceServer(s *grpc.Server, srv BackendServiceServer) {
|
||||
s.RegisterService(&_BackendService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackendService_FetchMatches_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(FetchMatchesRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(BackendServiceServer).FetchMatches(m, &backendServiceFetchMatchesServer{stream})
|
||||
}
|
||||
|
||||
type BackendService_FetchMatchesServer interface {
|
||||
Send(*FetchMatchesResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type backendServiceFetchMatchesServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *backendServiceFetchMatchesServer) Send(m *FetchMatchesResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _BackendService_AssignTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AssignTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).AssignTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.BackendService/AssignTickets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).AssignTickets(ctx, req.(*AssignTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackendService_ReleaseTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).ReleaseTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.BackendService/ReleaseTickets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).ReleaseTickets(ctx, req.(*ReleaseTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackendService_ReleaseAllTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseAllTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).ReleaseAllTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.BackendService/ReleaseAllTickets",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).ReleaseAllTickets(ctx, req.(*ReleaseAllTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BackendService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.BackendService",
|
||||
HandlerType: (*BackendServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AssignTickets",
|
||||
Handler: _BackendService_AssignTickets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseTickets",
|
||||
Handler: _BackendService_ReleaseTickets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseAllTickets",
|
||||
Handler: _BackendService_ReleaseAllTickets_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "FetchMatches",
|
||||
Handler: _BackendService_FetchMatches_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/backend.proto",
|
||||
}
|
||||
|
@ -177,20 +177,22 @@ func RegisterBackendServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/AssignTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/AssignTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:assign"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_BackendService_AssignTickets_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_BackendService_AssignTickets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_AssignTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_AssignTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -200,20 +202,22 @@ func RegisterBackendServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/ReleaseTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/ReleaseTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:release"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_BackendService_ReleaseTickets_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_BackendService_ReleaseTickets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_ReleaseTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_ReleaseTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -223,20 +227,22 @@ func RegisterBackendServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/ReleaseAllTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.BackendService/ReleaseAllTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:releaseall"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_BackendService_ReleaseAllTickets_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_BackendService_ReleaseAllTickets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_ReleaseAllTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_ReleaseAllTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -246,7 +252,7 @@ func RegisterBackendServiceHandlerServer(ctx context.Context, mux *runtime.Serve
|
||||
// RegisterBackendServiceHandlerFromEndpoint is same as RegisterBackendServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterBackendServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -285,19 +291,21 @@ func RegisterBackendServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/FetchMatches")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/FetchMatches", runtime.WithHTTPPathPattern("/v1/backendservice/matches:fetch"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BackendService_FetchMatches_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_BackendService_FetchMatches_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_FetchMatches_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_FetchMatches_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -305,19 +313,21 @@ func RegisterBackendServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/AssignTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/AssignTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:assign"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BackendService_AssignTickets_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_BackendService_AssignTickets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_AssignTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_AssignTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -325,19 +335,21 @@ func RegisterBackendServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/ReleaseTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/ReleaseTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:release"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BackendService_ReleaseTickets_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_BackendService_ReleaseTickets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_ReleaseTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_ReleaseTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -345,19 +357,21 @@ func RegisterBackendServiceHandlerClient(ctx context.Context, mux *runtime.Serve
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/ReleaseAllTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.BackendService/ReleaseAllTickets", runtime.WithHTTPPathPattern("/v1/backendservice/tickets:releaseall"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_BackendService_ReleaseAllTickets_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_BackendService_ReleaseAllTickets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_BackendService_ReleaseAllTickets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_BackendService_ReleaseAllTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
290
pkg/pb/backend_grpc.pb.go
Normal file
290
pkg/pb/backend_grpc.pb.go
Normal file
@ -0,0 +1,290 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: api/backend.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
BackendService_FetchMatches_FullMethodName = "/openmatch.BackendService/FetchMatches"
|
||||
BackendService_AssignTickets_FullMethodName = "/openmatch.BackendService/AssignTickets"
|
||||
BackendService_ReleaseTickets_FullMethodName = "/openmatch.BackendService/ReleaseTickets"
|
||||
BackendService_ReleaseAllTickets_FullMethodName = "/openmatch.BackendService/ReleaseAllTickets"
|
||||
)
|
||||
|
||||
// BackendServiceClient is the client API for BackendService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type BackendServiceClient interface {
|
||||
// FetchMatches triggers a MatchFunction with the specified MatchProfile and
|
||||
// returns a set of matches generated by the Match Making Function, and
|
||||
// accepted by the evaluator.
|
||||
// Tickets in matches returned by FetchMatches are moved from active to
|
||||
// pending, and will not be returned by query.
|
||||
FetchMatches(ctx context.Context, in *FetchMatchesRequest, opts ...grpc.CallOption) (BackendService_FetchMatchesClient, error)
|
||||
// AssignTickets overwrites the Assignment field of the input TicketIds.
|
||||
AssignTickets(ctx context.Context, in *AssignTicketsRequest, opts ...grpc.CallOption) (*AssignTicketsResponse, error)
|
||||
// ReleaseTickets moves tickets from the pending state, to the active state.
|
||||
// This enables them to be returned by query, and find different matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseTickets(ctx context.Context, in *ReleaseTicketsRequest, opts ...grpc.CallOption) (*ReleaseTicketsResponse, error)
|
||||
// ReleaseAllTickets moves all tickets from the pending state, to the active
|
||||
// state. This enables them to be returned by query, and find different
|
||||
// matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseAllTickets(ctx context.Context, in *ReleaseAllTicketsRequest, opts ...grpc.CallOption) (*ReleaseAllTicketsResponse, error)
|
||||
}
|
||||
|
||||
type backendServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackendServiceClient(cc grpc.ClientConnInterface) BackendServiceClient {
|
||||
return &backendServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) FetchMatches(ctx context.Context, in *FetchMatchesRequest, opts ...grpc.CallOption) (BackendService_FetchMatchesClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &BackendService_ServiceDesc.Streams[0], BackendService_FetchMatches_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &backendServiceFetchMatchesClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type BackendService_FetchMatchesClient interface {
|
||||
Recv() (*FetchMatchesResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type backendServiceFetchMatchesClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *backendServiceFetchMatchesClient) Recv() (*FetchMatchesResponse, error) {
|
||||
m := new(FetchMatchesResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) AssignTickets(ctx context.Context, in *AssignTicketsRequest, opts ...grpc.CallOption) (*AssignTicketsResponse, error) {
|
||||
out := new(AssignTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, BackendService_AssignTickets_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) ReleaseTickets(ctx context.Context, in *ReleaseTicketsRequest, opts ...grpc.CallOption) (*ReleaseTicketsResponse, error) {
|
||||
out := new(ReleaseTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, BackendService_ReleaseTickets_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backendServiceClient) ReleaseAllTickets(ctx context.Context, in *ReleaseAllTicketsRequest, opts ...grpc.CallOption) (*ReleaseAllTicketsResponse, error) {
|
||||
out := new(ReleaseAllTicketsResponse)
|
||||
err := c.cc.Invoke(ctx, BackendService_ReleaseAllTickets_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackendServiceServer is the server API for BackendService service.
|
||||
// All implementations should embed UnimplementedBackendServiceServer
|
||||
// for forward compatibility
|
||||
type BackendServiceServer interface {
|
||||
// FetchMatches triggers a MatchFunction with the specified MatchProfile and
|
||||
// returns a set of matches generated by the Match Making Function, and
|
||||
// accepted by the evaluator.
|
||||
// Tickets in matches returned by FetchMatches are moved from active to
|
||||
// pending, and will not be returned by query.
|
||||
FetchMatches(*FetchMatchesRequest, BackendService_FetchMatchesServer) error
|
||||
// AssignTickets overwrites the Assignment field of the input TicketIds.
|
||||
AssignTickets(context.Context, *AssignTicketsRequest) (*AssignTicketsResponse, error)
|
||||
// ReleaseTickets moves tickets from the pending state, to the active state.
|
||||
// This enables them to be returned by query, and find different matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseTickets(context.Context, *ReleaseTicketsRequest) (*ReleaseTicketsResponse, error)
|
||||
// ReleaseAllTickets moves all tickets from the pending state, to the active
|
||||
// state. This enables them to be returned by query, and find different
|
||||
// matches.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
ReleaseAllTickets(context.Context, *ReleaseAllTicketsRequest) (*ReleaseAllTicketsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackendServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackendServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedBackendServiceServer) FetchMatches(*FetchMatchesRequest, BackendService_FetchMatchesServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method FetchMatches not implemented")
|
||||
}
|
||||
func (UnimplementedBackendServiceServer) AssignTickets(context.Context, *AssignTicketsRequest) (*AssignTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AssignTickets not implemented")
|
||||
}
|
||||
func (UnimplementedBackendServiceServer) ReleaseTickets(context.Context, *ReleaseTicketsRequest) (*ReleaseTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseTickets not implemented")
|
||||
}
|
||||
func (UnimplementedBackendServiceServer) ReleaseAllTickets(context.Context, *ReleaseAllTicketsRequest) (*ReleaseAllTicketsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseAllTickets not implemented")
|
||||
}
|
||||
|
||||
// UnsafeBackendServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BackendServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeBackendServiceServer interface {
|
||||
mustEmbedUnimplementedBackendServiceServer()
|
||||
}
|
||||
|
||||
func RegisterBackendServiceServer(s grpc.ServiceRegistrar, srv BackendServiceServer) {
|
||||
s.RegisterService(&BackendService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackendService_FetchMatches_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(FetchMatchesRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(BackendServiceServer).FetchMatches(m, &backendServiceFetchMatchesServer{stream})
|
||||
}
|
||||
|
||||
type BackendService_FetchMatchesServer interface {
|
||||
Send(*FetchMatchesResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type backendServiceFetchMatchesServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *backendServiceFetchMatchesServer) Send(m *FetchMatchesResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _BackendService_AssignTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AssignTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).AssignTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackendService_AssignTickets_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).AssignTickets(ctx, req.(*AssignTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackendService_ReleaseTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).ReleaseTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackendService_ReleaseTickets_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).ReleaseTickets(ctx, req.(*ReleaseTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackendService_ReleaseAllTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseAllTicketsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackendServiceServer).ReleaseAllTickets(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackendService_ReleaseAllTickets_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackendServiceServer).ReleaseAllTickets(ctx, req.(*ReleaseAllTicketsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// BackendService_ServiceDesc is the grpc.ServiceDesc for BackendService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var BackendService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.BackendService",
|
||||
HandlerType: (*BackendServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AssignTickets",
|
||||
Handler: _BackendService_AssignTickets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseTickets",
|
||||
Handler: _BackendService_ReleaseTickets_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseAllTickets",
|
||||
Handler: _BackendService_ReleaseAllTickets_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "FetchMatches",
|
||||
Handler: _BackendService_FetchMatches_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/backend.proto",
|
||||
}
|
@ -14,19 +14,15 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/evaluator.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -159,35 +155,35 @@ var file_api_evaluator_proto_rawDesc = []byte{
|
||||
0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x65, 0x73, 0x3a, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x28,
|
||||
0x01, 0x30, 0x01, 0x42, 0x8c, 0x03, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x92, 0x41, 0xda, 0x02, 0x12, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x61,
|
||||
0x6c, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73,
|
||||
0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x20,
|
||||
0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f,
|
||||
0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d,
|
||||
0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65,
|
||||
0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02,
|
||||
0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f,
|
||||
0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a,
|
||||
0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73,
|
||||
0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a,
|
||||
0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f, 0x63,
|
||||
0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22,
|
||||
0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x3a, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x65, 0x28,
|
||||
0x01, 0x30, 0x01, 0x42, 0x8c, 0x03, 0x92, 0x41, 0xda, 0x02, 0x12, 0xb3, 0x01, 0x0a, 0x09, 0x45,
|
||||
0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e,
|
||||
0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f,
|
||||
0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23,
|
||||
0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75,
|
||||
0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e,
|
||||
0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73,
|
||||
0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73,
|
||||
0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30,
|
||||
0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12,
|
||||
0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e,
|
||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f,
|
||||
0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a,
|
||||
0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d,
|
||||
0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64,
|
||||
0x6f, 0x63, 0x73, 0x2f, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f,
|
||||
0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -270,117 +266,3 @@ func file_api_evaluator_proto_init() {
|
||||
file_api_evaluator_proto_goTypes = nil
|
||||
file_api_evaluator_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// EvaluatorClient is the client API for Evaluator service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type EvaluatorClient interface {
|
||||
// Evaluate evaluates a list of proposed matches based on quality, collision status, and etc, then shortlist the matches and returns the final results.
|
||||
Evaluate(ctx context.Context, opts ...grpc.CallOption) (Evaluator_EvaluateClient, error)
|
||||
}
|
||||
|
||||
type evaluatorClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewEvaluatorClient(cc grpc.ClientConnInterface) EvaluatorClient {
|
||||
return &evaluatorClient{cc}
|
||||
}
|
||||
|
||||
func (c *evaluatorClient) Evaluate(ctx context.Context, opts ...grpc.CallOption) (Evaluator_EvaluateClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Evaluator_serviceDesc.Streams[0], "/openmatch.Evaluator/Evaluate", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &evaluatorEvaluateClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Evaluator_EvaluateClient interface {
|
||||
Send(*EvaluateRequest) error
|
||||
Recv() (*EvaluateResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type evaluatorEvaluateClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateClient) Send(m *EvaluateRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateClient) Recv() (*EvaluateResponse, error) {
|
||||
m := new(EvaluateResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// EvaluatorServer is the server API for Evaluator service.
|
||||
type EvaluatorServer interface {
|
||||
// Evaluate evaluates a list of proposed matches based on quality, collision status, and etc, then shortlist the matches and returns the final results.
|
||||
Evaluate(Evaluator_EvaluateServer) error
|
||||
}
|
||||
|
||||
// UnimplementedEvaluatorServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedEvaluatorServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedEvaluatorServer) Evaluate(Evaluator_EvaluateServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Evaluate not implemented")
|
||||
}
|
||||
|
||||
func RegisterEvaluatorServer(s *grpc.Server, srv EvaluatorServer) {
|
||||
s.RegisterService(&_Evaluator_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Evaluator_Evaluate_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(EvaluatorServer).Evaluate(&evaluatorEvaluateServer{stream})
|
||||
}
|
||||
|
||||
type Evaluator_EvaluateServer interface {
|
||||
Send(*EvaluateResponse) error
|
||||
Recv() (*EvaluateRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type evaluatorEvaluateServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateServer) Send(m *EvaluateResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateServer) Recv() (*EvaluateRequest, error) {
|
||||
m := new(EvaluateRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
var _Evaluator_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.Evaluator",
|
||||
HandlerType: (*EvaluatorServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Evaluate",
|
||||
Handler: _Evaluator_Evaluate_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/evaluator.proto",
|
||||
}
|
||||
|
@ -55,15 +55,6 @@ func request_Evaluator_Evaluate_0(ctx context.Context, marshaler runtime.Marshal
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if err := handleSend(); err != nil {
|
||||
if cerr := stream.CloseSend(); cerr != nil {
|
||||
grpclog.Infof("Failed to terminate client stream: %v", cerr)
|
||||
}
|
||||
if err == io.EOF {
|
||||
return stream, metadata, nil
|
||||
}
|
||||
return nil, metadata, err
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
if err := handleSend(); err != nil {
|
||||
@ -102,7 +93,7 @@ func RegisterEvaluatorHandlerServer(ctx context.Context, mux *runtime.ServeMux,
|
||||
// RegisterEvaluatorHandlerFromEndpoint is same as RegisterEvaluatorHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterEvaluatorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -141,19 +132,21 @@ func RegisterEvaluatorHandlerClient(ctx context.Context, mux *runtime.ServeMux,
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.Evaluator/Evaluate")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.Evaluator/Evaluate", runtime.WithHTTPPathPattern("/v1/evaluator/matches:evaluate"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Evaluator_Evaluate_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_Evaluator_Evaluate_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Evaluator_Evaluate_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_Evaluator_Evaluate_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
155
pkg/pb/evaluator_grpc.pb.go
Normal file
155
pkg/pb/evaluator_grpc.pb.go
Normal file
@ -0,0 +1,155 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: api/evaluator.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Evaluator_Evaluate_FullMethodName = "/openmatch.Evaluator/Evaluate"
|
||||
)
|
||||
|
||||
// EvaluatorClient is the client API for Evaluator service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type EvaluatorClient interface {
|
||||
// Evaluate evaluates a list of proposed matches based on quality, collision status, and etc, then shortlist the matches and returns the final results.
|
||||
Evaluate(ctx context.Context, opts ...grpc.CallOption) (Evaluator_EvaluateClient, error)
|
||||
}
|
||||
|
||||
type evaluatorClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewEvaluatorClient(cc grpc.ClientConnInterface) EvaluatorClient {
|
||||
return &evaluatorClient{cc}
|
||||
}
|
||||
|
||||
func (c *evaluatorClient) Evaluate(ctx context.Context, opts ...grpc.CallOption) (Evaluator_EvaluateClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Evaluator_ServiceDesc.Streams[0], Evaluator_Evaluate_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &evaluatorEvaluateClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Evaluator_EvaluateClient interface {
|
||||
Send(*EvaluateRequest) error
|
||||
Recv() (*EvaluateResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type evaluatorEvaluateClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateClient) Send(m *EvaluateRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateClient) Recv() (*EvaluateResponse, error) {
|
||||
m := new(EvaluateResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// EvaluatorServer is the server API for Evaluator service.
|
||||
// All implementations should embed UnimplementedEvaluatorServer
|
||||
// for forward compatibility
|
||||
type EvaluatorServer interface {
|
||||
// Evaluate evaluates a list of proposed matches based on quality, collision status, and etc, then shortlist the matches and returns the final results.
|
||||
Evaluate(Evaluator_EvaluateServer) error
|
||||
}
|
||||
|
||||
// UnimplementedEvaluatorServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedEvaluatorServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedEvaluatorServer) Evaluate(Evaluator_EvaluateServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Evaluate not implemented")
|
||||
}
|
||||
|
||||
// UnsafeEvaluatorServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to EvaluatorServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeEvaluatorServer interface {
|
||||
mustEmbedUnimplementedEvaluatorServer()
|
||||
}
|
||||
|
||||
func RegisterEvaluatorServer(s grpc.ServiceRegistrar, srv EvaluatorServer) {
|
||||
s.RegisterService(&Evaluator_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Evaluator_Evaluate_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(EvaluatorServer).Evaluate(&evaluatorEvaluateServer{stream})
|
||||
}
|
||||
|
||||
type Evaluator_EvaluateServer interface {
|
||||
Send(*EvaluateResponse) error
|
||||
Recv() (*EvaluateRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type evaluatorEvaluateServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateServer) Send(m *EvaluateResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *evaluatorEvaluateServer) Recv() (*EvaluateRequest, error) {
|
||||
m := new(EvaluateRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Evaluator_ServiceDesc is the grpc.ServiceDesc for Evaluator service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Evaluator_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.Evaluator",
|
||||
HandlerType: (*EvaluatorServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Evaluate",
|
||||
Handler: _Evaluator_Evaluate_Handler,
|
||||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/evaluator.proto",
|
||||
}
|
@ -14,8 +14,8 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/extensions.proto
|
||||
|
||||
package pb
|
||||
|
@ -14,22 +14,18 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/frontend.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
@ -670,9 +666,9 @@ var file_api_frontend_proto_rawDesc = []byte{
|
||||
0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
|
||||
0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x22,
|
||||
0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x77, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||
0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x77, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
@ -703,18 +699,18 @@ var file_api_frontend_proto_rawDesc = []byte{
|
||||
0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64,
|
||||
0x67, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x22, 0x37, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x62, 0x61, 0x63, 0x6b, 0x66,
|
||||
0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65,
|
||||
0x64, 0x67, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x73, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3c, 0x3a, 0x01, 0x2a, 0x22, 0x37, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x2f, 0x7b, 0x62, 0x61,
|
||||
0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x6b, 0x6e, 0x6f,
|
||||
0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x12, 0x71, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x66,
|
||||
0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x65,
|
||||
0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x22,
|
||||
0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x7f, 0x0a, 0x0e, 0x44, 0x65, 0x6c,
|
||||
0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x12, 0x20, 0x2e, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61,
|
||||
0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
@ -735,34 +731,34 @@ var file_api_frontend_proto_rawDesc = []byte{
|
||||
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x22, 0x28, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x22, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c,
|
||||
0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x42, 0x8b, 0x03, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65,
|
||||
0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x92, 0x41, 0xd9, 0x02, 0x12, 0xb2, 0x01, 0x0a, 0x08, 0x46,
|
||||
0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20,
|
||||
0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73,
|
||||
0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30,
|
||||
0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
|
||||
0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74,
|
||||
0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a,
|
||||
0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34,
|
||||
0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65,
|
||||
0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04,
|
||||
0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f,
|
||||
0x63, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x72, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x62, 0x61, 0x63, 0x6b,
|
||||
0x66, 0x69, 0x6c, 0x6c, 0x73, 0x42, 0x8b, 0x03, 0x92, 0x41, 0xd9, 0x02, 0x12, 0xb2, 0x01, 0x0a,
|
||||
0x08, 0x46, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65,
|
||||
0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f,
|
||||
0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a,
|
||||
0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63,
|
||||
0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32,
|
||||
0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70,
|
||||
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61,
|
||||
0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e,
|
||||
0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34,
|
||||
0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65,
|
||||
0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64,
|
||||
0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06,
|
||||
0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f,
|
||||
0x64, 0x6f, 0x63, 0x73, 0x2f, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -793,7 +789,7 @@ var file_api_frontend_proto_goTypes = []interface{}{
|
||||
(*Ticket)(nil), // 11: openmatch.Ticket
|
||||
(*Assignment)(nil), // 12: openmatch.Assignment
|
||||
(*Backfill)(nil), // 13: openmatch.Backfill
|
||||
(*empty.Empty)(nil), // 14: google.protobuf.Empty
|
||||
(*emptypb.Empty)(nil), // 14: google.protobuf.Empty
|
||||
}
|
||||
var file_api_frontend_proto_depIdxs = []int32{
|
||||
11, // 0: openmatch.CreateTicketRequest.ticket:type_name -> openmatch.Ticket
|
||||
@ -987,453 +983,3 @@ func file_api_frontend_proto_init() {
|
||||
file_api_frontend_proto_goTypes = nil
|
||||
file_api_frontend_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// FrontendServiceClient is the client API for FrontendService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type FrontendServiceClient interface {
|
||||
// CreateTicket assigns an unique TicketId to the input Ticket and record it in state storage.
|
||||
// A ticket is considered as ready for matchmaking once it is created.
|
||||
// - If a TicketId exists in a Ticket request, an auto-generated TicketId will override this field.
|
||||
// - If SearchFields exist in a Ticket, CreateTicket will also index these fields such that one can query the ticket with query.QueryTickets function.
|
||||
CreateTicket(ctx context.Context, in *CreateTicketRequest, opts ...grpc.CallOption) (*Ticket, error)
|
||||
// DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage.
|
||||
// The client should delete the Ticket when finished matchmaking with it.
|
||||
DeleteTicket(ctx context.Context, in *DeleteTicketRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
// GetTicket get the Ticket associated with the specified TicketId.
|
||||
GetTicket(ctx context.Context, in *GetTicketRequest, opts ...grpc.CallOption) (*Ticket, error)
|
||||
// WatchAssignments stream back Assignment of the specified TicketId if it is updated.
|
||||
// - If the Assignment is not updated, GetAssignment will retry using the configured backoff strategy.
|
||||
WatchAssignments(ctx context.Context, in *WatchAssignmentsRequest, opts ...grpc.CallOption) (FrontendService_WatchAssignmentsClient, error)
|
||||
// AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info
|
||||
// This triggers an assignment process.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
AcknowledgeBackfill(ctx context.Context, in *AcknowledgeBackfillRequest, opts ...grpc.CallOption) (*AcknowledgeBackfillResponse, error)
|
||||
// CreateBackfill creates a new Backfill object.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
CreateBackfill(ctx context.Context, in *CreateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
// DeleteBackfill receives a backfill ID and deletes its resource.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
DeleteBackfill(ctx context.Context, in *DeleteBackfillRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
// GetBackfill returns a backfill object by its ID.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
GetBackfill(ctx context.Context, in *GetBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
// UpdateBackfill updates search_fields and extensions for the backfill with the provided id.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
UpdateBackfill(ctx context.Context, in *UpdateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
}
|
||||
|
||||
type frontendServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewFrontendServiceClient(cc grpc.ClientConnInterface) FrontendServiceClient {
|
||||
return &frontendServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) CreateTicket(ctx context.Context, in *CreateTicketRequest, opts ...grpc.CallOption) (*Ticket, error) {
|
||||
out := new(Ticket)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/CreateTicket", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) DeleteTicket(ctx context.Context, in *DeleteTicketRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/DeleteTicket", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) GetTicket(ctx context.Context, in *GetTicketRequest, opts ...grpc.CallOption) (*Ticket, error) {
|
||||
out := new(Ticket)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/GetTicket", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) WatchAssignments(ctx context.Context, in *WatchAssignmentsRequest, opts ...grpc.CallOption) (FrontendService_WatchAssignmentsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_FrontendService_serviceDesc.Streams[0], "/openmatch.FrontendService/WatchAssignments", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &frontendServiceWatchAssignmentsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type FrontendService_WatchAssignmentsClient interface {
|
||||
Recv() (*WatchAssignmentsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type frontendServiceWatchAssignmentsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *frontendServiceWatchAssignmentsClient) Recv() (*WatchAssignmentsResponse, error) {
|
||||
m := new(WatchAssignmentsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) AcknowledgeBackfill(ctx context.Context, in *AcknowledgeBackfillRequest, opts ...grpc.CallOption) (*AcknowledgeBackfillResponse, error) {
|
||||
out := new(AcknowledgeBackfillResponse)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/AcknowledgeBackfill", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) CreateBackfill(ctx context.Context, in *CreateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/CreateBackfill", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) DeleteBackfill(ctx context.Context, in *DeleteBackfillRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/DeleteBackfill", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) GetBackfill(ctx context.Context, in *GetBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/GetBackfill", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) UpdateBackfill(ctx context.Context, in *UpdateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, "/openmatch.FrontendService/UpdateBackfill", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// FrontendServiceServer is the server API for FrontendService service.
|
||||
type FrontendServiceServer interface {
|
||||
// CreateTicket assigns an unique TicketId to the input Ticket and record it in state storage.
|
||||
// A ticket is considered as ready for matchmaking once it is created.
|
||||
// - If a TicketId exists in a Ticket request, an auto-generated TicketId will override this field.
|
||||
// - If SearchFields exist in a Ticket, CreateTicket will also index these fields such that one can query the ticket with query.QueryTickets function.
|
||||
CreateTicket(context.Context, *CreateTicketRequest) (*Ticket, error)
|
||||
// DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage.
|
||||
// The client should delete the Ticket when finished matchmaking with it.
|
||||
DeleteTicket(context.Context, *DeleteTicketRequest) (*empty.Empty, error)
|
||||
// GetTicket get the Ticket associated with the specified TicketId.
|
||||
GetTicket(context.Context, *GetTicketRequest) (*Ticket, error)
|
||||
// WatchAssignments stream back Assignment of the specified TicketId if it is updated.
|
||||
// - If the Assignment is not updated, GetAssignment will retry using the configured backoff strategy.
|
||||
WatchAssignments(*WatchAssignmentsRequest, FrontendService_WatchAssignmentsServer) error
|
||||
// AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info
|
||||
// This triggers an assignment process.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
AcknowledgeBackfill(context.Context, *AcknowledgeBackfillRequest) (*AcknowledgeBackfillResponse, error)
|
||||
// CreateBackfill creates a new Backfill object.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
CreateBackfill(context.Context, *CreateBackfillRequest) (*Backfill, error)
|
||||
// DeleteBackfill receives a backfill ID and deletes its resource.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
DeleteBackfill(context.Context, *DeleteBackfillRequest) (*empty.Empty, error)
|
||||
// GetBackfill returns a backfill object by its ID.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
GetBackfill(context.Context, *GetBackfillRequest) (*Backfill, error)
|
||||
// UpdateBackfill updates search_fields and extensions for the backfill with the provided id.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
UpdateBackfill(context.Context, *UpdateBackfillRequest) (*Backfill, error)
|
||||
}
|
||||
|
||||
// UnimplementedFrontendServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedFrontendServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedFrontendServiceServer) CreateTicket(context.Context, *CreateTicketRequest) (*Ticket, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTicket not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) DeleteTicket(context.Context, *DeleteTicketRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTicket not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) GetTicket(context.Context, *GetTicketRequest) (*Ticket, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTicket not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) WatchAssignments(*WatchAssignmentsRequest, FrontendService_WatchAssignmentsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method WatchAssignments not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) AcknowledgeBackfill(context.Context, *AcknowledgeBackfillRequest) (*AcknowledgeBackfillResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AcknowledgeBackfill not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) CreateBackfill(context.Context, *CreateBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateBackfill not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) DeleteBackfill(context.Context, *DeleteBackfillRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteBackfill not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) GetBackfill(context.Context, *GetBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBackfill not implemented")
|
||||
}
|
||||
func (*UnimplementedFrontendServiceServer) UpdateBackfill(context.Context, *UpdateBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateBackfill not implemented")
|
||||
}
|
||||
|
||||
func RegisterFrontendServiceServer(s *grpc.Server, srv FrontendServiceServer) {
|
||||
s.RegisterService(&_FrontendService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _FrontendService_CreateTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).CreateTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/CreateTicket",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).CreateTicket(ctx, req.(*CreateTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_DeleteTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).DeleteTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/DeleteTicket",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).DeleteTicket(ctx, req.(*DeleteTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_GetTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).GetTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/GetTicket",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).GetTicket(ctx, req.(*GetTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_WatchAssignments_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(WatchAssignmentsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(FrontendServiceServer).WatchAssignments(m, &frontendServiceWatchAssignmentsServer{stream})
|
||||
}
|
||||
|
||||
type FrontendService_WatchAssignmentsServer interface {
|
||||
Send(*WatchAssignmentsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type frontendServiceWatchAssignmentsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *frontendServiceWatchAssignmentsServer) Send(m *WatchAssignmentsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _FrontendService_AcknowledgeBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AcknowledgeBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).AcknowledgeBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/AcknowledgeBackfill",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).AcknowledgeBackfill(ctx, req.(*AcknowledgeBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_CreateBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).CreateBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/CreateBackfill",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).CreateBackfill(ctx, req.(*CreateBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_DeleteBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).DeleteBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/DeleteBackfill",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).DeleteBackfill(ctx, req.(*DeleteBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_GetBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).GetBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/GetBackfill",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).GetBackfill(ctx, req.(*GetBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_UpdateBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).UpdateBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/openmatch.FrontendService/UpdateBackfill",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).UpdateBackfill(ctx, req.(*UpdateBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _FrontendService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.FrontendService",
|
||||
HandlerType: (*FrontendServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateTicket",
|
||||
Handler: _FrontendService_CreateTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteTicket",
|
||||
Handler: _FrontendService_DeleteTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetTicket",
|
||||
Handler: _FrontendService_GetTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AcknowledgeBackfill",
|
||||
Handler: _FrontendService_AcknowledgeBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateBackfill",
|
||||
Handler: _FrontendService_CreateBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteBackfill",
|
||||
Handler: _FrontendService_DeleteBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBackfill",
|
||||
Handler: _FrontendService_GetBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateBackfill",
|
||||
Handler: _FrontendService_UpdateBackfill_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "WatchAssignments",
|
||||
Handler: _FrontendService_WatchAssignments_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/frontend.proto",
|
||||
}
|
||||
|
@ -455,20 +455,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/CreateTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/CreateTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_CreateTicket_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_CreateTicket_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_CreateTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_CreateTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -478,20 +480,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/DeleteTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/DeleteTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets/{ticket_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_DeleteTicket_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_DeleteTicket_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_DeleteTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_DeleteTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -501,20 +505,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/GetTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/GetTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets/{ticket_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_GetTicket_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_GetTicket_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_GetTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_GetTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -531,20 +537,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/AcknowledgeBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/AcknowledgeBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}/acknowledge"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_AcknowledgeBackfill_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_AcknowledgeBackfill_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_AcknowledgeBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_AcknowledgeBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -554,20 +562,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/CreateBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/CreateBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_CreateBackfill_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_CreateBackfill_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_CreateBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_CreateBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -577,20 +587,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/DeleteBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/DeleteBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_DeleteBackfill_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_DeleteBackfill_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_DeleteBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_DeleteBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -600,20 +612,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/GetBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/GetBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_GetBackfill_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_GetBackfill_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_GetBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_GetBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -623,20 +637,22 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/UpdateBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/openmatch.FrontendService/UpdateBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_FrontendService_UpdateBackfill_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_FrontendService_UpdateBackfill_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_UpdateBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_UpdateBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -646,7 +662,7 @@ func RegisterFrontendServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
// RegisterFrontendServiceHandlerFromEndpoint is same as RegisterFrontendServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterFrontendServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -685,19 +701,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/CreateTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/CreateTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_CreateTicket_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_CreateTicket_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_CreateTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_CreateTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -705,19 +723,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/DeleteTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/DeleteTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets/{ticket_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_DeleteTicket_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_DeleteTicket_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_DeleteTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_DeleteTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -725,19 +745,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/GetTicket")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/GetTicket", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets/{ticket_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_GetTicket_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_GetTicket_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_GetTicket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_GetTicket_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -745,19 +767,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/WatchAssignments")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/WatchAssignments", runtime.WithHTTPPathPattern("/v1/frontendservice/tickets/{ticket_id}/assignments"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_WatchAssignments_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_WatchAssignments_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_WatchAssignments_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_WatchAssignments_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -765,19 +789,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/AcknowledgeBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/AcknowledgeBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}/acknowledge"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_AcknowledgeBackfill_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_AcknowledgeBackfill_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_AcknowledgeBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_AcknowledgeBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -785,19 +811,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/CreateBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/CreateBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_CreateBackfill_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_CreateBackfill_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_CreateBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_CreateBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -805,19 +833,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/DeleteBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/DeleteBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_DeleteBackfill_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_DeleteBackfill_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_DeleteBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_DeleteBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -825,19 +855,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/GetBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/GetBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills/{backfill_id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_GetBackfill_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_GetBackfill_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_GetBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_GetBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -845,19 +877,21 @@ func RegisterFrontendServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/UpdateBackfill")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.FrontendService/UpdateBackfill", runtime.WithHTTPPathPattern("/v1/frontendservice/backfills"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_FrontendService_UpdateBackfill_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_FrontendService_UpdateBackfill_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_FrontendService_UpdateBackfill_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_FrontendService_UpdateBackfill_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
500
pkg/pb/frontend_grpc.pb.go
Normal file
500
pkg/pb/frontend_grpc.pb.go
Normal file
@ -0,0 +1,500 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: api/frontend.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
FrontendService_CreateTicket_FullMethodName = "/openmatch.FrontendService/CreateTicket"
|
||||
FrontendService_DeleteTicket_FullMethodName = "/openmatch.FrontendService/DeleteTicket"
|
||||
FrontendService_GetTicket_FullMethodName = "/openmatch.FrontendService/GetTicket"
|
||||
FrontendService_WatchAssignments_FullMethodName = "/openmatch.FrontendService/WatchAssignments"
|
||||
FrontendService_AcknowledgeBackfill_FullMethodName = "/openmatch.FrontendService/AcknowledgeBackfill"
|
||||
FrontendService_CreateBackfill_FullMethodName = "/openmatch.FrontendService/CreateBackfill"
|
||||
FrontendService_DeleteBackfill_FullMethodName = "/openmatch.FrontendService/DeleteBackfill"
|
||||
FrontendService_GetBackfill_FullMethodName = "/openmatch.FrontendService/GetBackfill"
|
||||
FrontendService_UpdateBackfill_FullMethodName = "/openmatch.FrontendService/UpdateBackfill"
|
||||
)
|
||||
|
||||
// FrontendServiceClient is the client API for FrontendService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type FrontendServiceClient interface {
|
||||
// CreateTicket assigns an unique TicketId to the input Ticket and record it in state storage.
|
||||
// A ticket is considered as ready for matchmaking once it is created.
|
||||
// - If a TicketId exists in a Ticket request, an auto-generated TicketId will override this field.
|
||||
// - If SearchFields exist in a Ticket, CreateTicket will also index these fields such that one can query the ticket with query.QueryTickets function.
|
||||
CreateTicket(ctx context.Context, in *CreateTicketRequest, opts ...grpc.CallOption) (*Ticket, error)
|
||||
// DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage.
|
||||
// The client should delete the Ticket when finished matchmaking with it.
|
||||
DeleteTicket(ctx context.Context, in *DeleteTicketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// GetTicket get the Ticket associated with the specified TicketId.
|
||||
GetTicket(ctx context.Context, in *GetTicketRequest, opts ...grpc.CallOption) (*Ticket, error)
|
||||
// WatchAssignments stream back Assignment of the specified TicketId if it is updated.
|
||||
// - If the Assignment is not updated, GetAssignment will retry using the configured backoff strategy.
|
||||
WatchAssignments(ctx context.Context, in *WatchAssignmentsRequest, opts ...grpc.CallOption) (FrontendService_WatchAssignmentsClient, error)
|
||||
// AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info
|
||||
// This triggers an assignment process.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
AcknowledgeBackfill(ctx context.Context, in *AcknowledgeBackfillRequest, opts ...grpc.CallOption) (*AcknowledgeBackfillResponse, error)
|
||||
// CreateBackfill creates a new Backfill object.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
CreateBackfill(ctx context.Context, in *CreateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
// DeleteBackfill receives a backfill ID and deletes its resource.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
DeleteBackfill(ctx context.Context, in *DeleteBackfillRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// GetBackfill returns a backfill object by its ID.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
GetBackfill(ctx context.Context, in *GetBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
// UpdateBackfill updates search_fields and extensions for the backfill with the provided id.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
UpdateBackfill(ctx context.Context, in *UpdateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error)
|
||||
}
|
||||
|
||||
type frontendServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewFrontendServiceClient(cc grpc.ClientConnInterface) FrontendServiceClient {
|
||||
return &frontendServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) CreateTicket(ctx context.Context, in *CreateTicketRequest, opts ...grpc.CallOption) (*Ticket, error) {
|
||||
out := new(Ticket)
|
||||
err := c.cc.Invoke(ctx, FrontendService_CreateTicket_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) DeleteTicket(ctx context.Context, in *DeleteTicketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, FrontendService_DeleteTicket_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) GetTicket(ctx context.Context, in *GetTicketRequest, opts ...grpc.CallOption) (*Ticket, error) {
|
||||
out := new(Ticket)
|
||||
err := c.cc.Invoke(ctx, FrontendService_GetTicket_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) WatchAssignments(ctx context.Context, in *WatchAssignmentsRequest, opts ...grpc.CallOption) (FrontendService_WatchAssignmentsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &FrontendService_ServiceDesc.Streams[0], FrontendService_WatchAssignments_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &frontendServiceWatchAssignmentsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type FrontendService_WatchAssignmentsClient interface {
|
||||
Recv() (*WatchAssignmentsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type frontendServiceWatchAssignmentsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *frontendServiceWatchAssignmentsClient) Recv() (*WatchAssignmentsResponse, error) {
|
||||
m := new(WatchAssignmentsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) AcknowledgeBackfill(ctx context.Context, in *AcknowledgeBackfillRequest, opts ...grpc.CallOption) (*AcknowledgeBackfillResponse, error) {
|
||||
out := new(AcknowledgeBackfillResponse)
|
||||
err := c.cc.Invoke(ctx, FrontendService_AcknowledgeBackfill_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) CreateBackfill(ctx context.Context, in *CreateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, FrontendService_CreateBackfill_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) DeleteBackfill(ctx context.Context, in *DeleteBackfillRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, FrontendService_DeleteBackfill_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) GetBackfill(ctx context.Context, in *GetBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, FrontendService_GetBackfill_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *frontendServiceClient) UpdateBackfill(ctx context.Context, in *UpdateBackfillRequest, opts ...grpc.CallOption) (*Backfill, error) {
|
||||
out := new(Backfill)
|
||||
err := c.cc.Invoke(ctx, FrontendService_UpdateBackfill_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// FrontendServiceServer is the server API for FrontendService service.
|
||||
// All implementations should embed UnimplementedFrontendServiceServer
|
||||
// for forward compatibility
|
||||
type FrontendServiceServer interface {
|
||||
// CreateTicket assigns an unique TicketId to the input Ticket and record it in state storage.
|
||||
// A ticket is considered as ready for matchmaking once it is created.
|
||||
// - If a TicketId exists in a Ticket request, an auto-generated TicketId will override this field.
|
||||
// - If SearchFields exist in a Ticket, CreateTicket will also index these fields such that one can query the ticket with query.QueryTickets function.
|
||||
CreateTicket(context.Context, *CreateTicketRequest) (*Ticket, error)
|
||||
// DeleteTicket immediately stops Open Match from using the Ticket for matchmaking and removes the Ticket from state storage.
|
||||
// The client should delete the Ticket when finished matchmaking with it.
|
||||
DeleteTicket(context.Context, *DeleteTicketRequest) (*emptypb.Empty, error)
|
||||
// GetTicket get the Ticket associated with the specified TicketId.
|
||||
GetTicket(context.Context, *GetTicketRequest) (*Ticket, error)
|
||||
// WatchAssignments stream back Assignment of the specified TicketId if it is updated.
|
||||
// - If the Assignment is not updated, GetAssignment will retry using the configured backoff strategy.
|
||||
WatchAssignments(*WatchAssignmentsRequest, FrontendService_WatchAssignmentsServer) error
|
||||
// AcknowledgeBackfill is used to notify OpenMatch about GameServer connection info
|
||||
// This triggers an assignment process.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
AcknowledgeBackfill(context.Context, *AcknowledgeBackfillRequest) (*AcknowledgeBackfillResponse, error)
|
||||
// CreateBackfill creates a new Backfill object.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
CreateBackfill(context.Context, *CreateBackfillRequest) (*Backfill, error)
|
||||
// DeleteBackfill receives a backfill ID and deletes its resource.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
DeleteBackfill(context.Context, *DeleteBackfillRequest) (*emptypb.Empty, error)
|
||||
// GetBackfill returns a backfill object by its ID.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
GetBackfill(context.Context, *GetBackfillRequest) (*Backfill, error)
|
||||
// UpdateBackfill updates search_fields and extensions for the backfill with the provided id.
|
||||
// Any tickets waiting for this backfill will be returned to the active pool, no longer pending.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
UpdateBackfill(context.Context, *UpdateBackfillRequest) (*Backfill, error)
|
||||
}
|
||||
|
||||
// UnimplementedFrontendServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedFrontendServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedFrontendServiceServer) CreateTicket(context.Context, *CreateTicketRequest) (*Ticket, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTicket not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) DeleteTicket(context.Context, *DeleteTicketRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteTicket not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) GetTicket(context.Context, *GetTicketRequest) (*Ticket, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTicket not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) WatchAssignments(*WatchAssignmentsRequest, FrontendService_WatchAssignmentsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method WatchAssignments not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) AcknowledgeBackfill(context.Context, *AcknowledgeBackfillRequest) (*AcknowledgeBackfillResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AcknowledgeBackfill not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) CreateBackfill(context.Context, *CreateBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateBackfill not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) DeleteBackfill(context.Context, *DeleteBackfillRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteBackfill not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) GetBackfill(context.Context, *GetBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetBackfill not implemented")
|
||||
}
|
||||
func (UnimplementedFrontendServiceServer) UpdateBackfill(context.Context, *UpdateBackfillRequest) (*Backfill, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateBackfill not implemented")
|
||||
}
|
||||
|
||||
// UnsafeFrontendServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to FrontendServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeFrontendServiceServer interface {
|
||||
mustEmbedUnimplementedFrontendServiceServer()
|
||||
}
|
||||
|
||||
func RegisterFrontendServiceServer(s grpc.ServiceRegistrar, srv FrontendServiceServer) {
|
||||
s.RegisterService(&FrontendService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _FrontendService_CreateTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).CreateTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_CreateTicket_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).CreateTicket(ctx, req.(*CreateTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_DeleteTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).DeleteTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_DeleteTicket_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).DeleteTicket(ctx, req.(*DeleteTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_GetTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetTicketRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).GetTicket(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_GetTicket_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).GetTicket(ctx, req.(*GetTicketRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_WatchAssignments_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(WatchAssignmentsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(FrontendServiceServer).WatchAssignments(m, &frontendServiceWatchAssignmentsServer{stream})
|
||||
}
|
||||
|
||||
type FrontendService_WatchAssignmentsServer interface {
|
||||
Send(*WatchAssignmentsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type frontendServiceWatchAssignmentsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *frontendServiceWatchAssignmentsServer) Send(m *WatchAssignmentsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _FrontendService_AcknowledgeBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AcknowledgeBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).AcknowledgeBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_AcknowledgeBackfill_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).AcknowledgeBackfill(ctx, req.(*AcknowledgeBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_CreateBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).CreateBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_CreateBackfill_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).CreateBackfill(ctx, req.(*CreateBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_DeleteBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).DeleteBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_DeleteBackfill_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).DeleteBackfill(ctx, req.(*DeleteBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_GetBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).GetBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_GetBackfill_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).GetBackfill(ctx, req.(*GetBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _FrontendService_UpdateBackfill_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateBackfillRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(FrontendServiceServer).UpdateBackfill(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: FrontendService_UpdateBackfill_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(FrontendServiceServer).UpdateBackfill(ctx, req.(*UpdateBackfillRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// FrontendService_ServiceDesc is the grpc.ServiceDesc for FrontendService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var FrontendService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.FrontendService",
|
||||
HandlerType: (*FrontendServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateTicket",
|
||||
Handler: _FrontendService_CreateTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteTicket",
|
||||
Handler: _FrontendService_DeleteTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetTicket",
|
||||
Handler: _FrontendService_GetTicket_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AcknowledgeBackfill",
|
||||
Handler: _FrontendService_AcknowledgeBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateBackfill",
|
||||
Handler: _FrontendService_CreateBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteBackfill",
|
||||
Handler: _FrontendService_DeleteBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetBackfill",
|
||||
Handler: _FrontendService_GetBackfill_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateBackfill",
|
||||
Handler: _FrontendService_UpdateBackfill_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "WatchAssignments",
|
||||
Handler: _FrontendService_WatchAssignments_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/frontend.proto",
|
||||
}
|
@ -14,19 +14,15 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/matchfunction.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -161,34 +157,34 @@ var file_api_matchfunction_proto_rawDesc = []byte{
|
||||
0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e,
|
||||
0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x66, 0x75,
|
||||
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x72, 0x75, 0x6e, 0x3a, 0x01, 0x2a, 0x30, 0x01, 0x42,
|
||||
0x91, 0x03, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64,
|
||||
0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x70, 0x6b,
|
||||
0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x92, 0x41, 0xdf, 0x02, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x46,
|
||||
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20,
|
||||
0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73,
|
||||
0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30,
|
||||
0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
|
||||
0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74,
|
||||
0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a,
|
||||
0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34,
|
||||
0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65,
|
||||
0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04,
|
||||
0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f,
|
||||
0x63, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x72, 0x75, 0x6e, 0x30, 0x01, 0x42,
|
||||
0x91, 0x03, 0x92, 0x41, 0xdf, 0x02, 0x12, 0xb8, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x20, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65,
|
||||
0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f,
|
||||
0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a,
|
||||
0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63,
|
||||
0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32,
|
||||
0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70,
|
||||
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61,
|
||||
0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e,
|
||||
0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34,
|
||||
0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65,
|
||||
0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64,
|
||||
0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06,
|
||||
0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
||||
0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f,
|
||||
0x64, 0x6f, 0x63, 0x73, 0x2f, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61,
|
||||
0x74, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -273,118 +269,3 @@ func file_api_matchfunction_proto_init() {
|
||||
file_api_matchfunction_proto_goTypes = nil
|
||||
file_api_matchfunction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// MatchFunctionClient is the client API for MatchFunction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type MatchFunctionClient interface {
|
||||
// DO NOT CALL THIS FUNCTION MANUALLY. USE backend.FetchMatches INSTEAD.
|
||||
// Run pulls Tickets that satisfy Profile constraints from QueryService,
|
||||
// runs matchmaking logic against them, then constructs and streams back
|
||||
// match candidates to the Backend service.
|
||||
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (MatchFunction_RunClient, error)
|
||||
}
|
||||
|
||||
type matchFunctionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMatchFunctionClient(cc grpc.ClientConnInterface) MatchFunctionClient {
|
||||
return &matchFunctionClient{cc}
|
||||
}
|
||||
|
||||
func (c *matchFunctionClient) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (MatchFunction_RunClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_MatchFunction_serviceDesc.Streams[0], "/openmatch.MatchFunction/Run", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &matchFunctionRunClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type MatchFunction_RunClient interface {
|
||||
Recv() (*RunResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type matchFunctionRunClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *matchFunctionRunClient) Recv() (*RunResponse, error) {
|
||||
m := new(RunResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// MatchFunctionServer is the server API for MatchFunction service.
|
||||
type MatchFunctionServer interface {
|
||||
// DO NOT CALL THIS FUNCTION MANUALLY. USE backend.FetchMatches INSTEAD.
|
||||
// Run pulls Tickets that satisfy Profile constraints from QueryService,
|
||||
// runs matchmaking logic against them, then constructs and streams back
|
||||
// match candidates to the Backend service.
|
||||
Run(*RunRequest, MatchFunction_RunServer) error
|
||||
}
|
||||
|
||||
// UnimplementedMatchFunctionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedMatchFunctionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedMatchFunctionServer) Run(*RunRequest, MatchFunction_RunServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Run not implemented")
|
||||
}
|
||||
|
||||
func RegisterMatchFunctionServer(s *grpc.Server, srv MatchFunctionServer) {
|
||||
s.RegisterService(&_MatchFunction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _MatchFunction_Run_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(RunRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(MatchFunctionServer).Run(m, &matchFunctionRunServer{stream})
|
||||
}
|
||||
|
||||
type MatchFunction_RunServer interface {
|
||||
Send(*RunResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type matchFunctionRunServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *matchFunctionRunServer) Send(m *RunResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
var _MatchFunction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.MatchFunction",
|
||||
HandlerType: (*MatchFunctionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Run",
|
||||
Handler: _MatchFunction_Run_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/matchfunction.proto",
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func RegisterMatchFunctionHandlerServer(ctx context.Context, mux *runtime.ServeM
|
||||
// RegisterMatchFunctionHandlerFromEndpoint is same as RegisterMatchFunctionHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterMatchFunctionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -114,19 +114,21 @@ func RegisterMatchFunctionHandlerClient(ctx context.Context, mux *runtime.ServeM
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.MatchFunction/Run")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.MatchFunction/Run", runtime.WithHTTPPathPattern("/v1/matchfunction:run"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_MatchFunction_Run_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_MatchFunction_Run_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_MatchFunction_Run_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_MatchFunction_Run_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
156
pkg/pb/matchfunction_grpc.pb.go
Normal file
156
pkg/pb/matchfunction_grpc.pb.go
Normal file
@ -0,0 +1,156 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: api/matchfunction.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
MatchFunction_Run_FullMethodName = "/openmatch.MatchFunction/Run"
|
||||
)
|
||||
|
||||
// MatchFunctionClient is the client API for MatchFunction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type MatchFunctionClient interface {
|
||||
// DO NOT CALL THIS FUNCTION MANUALLY. USE backend.FetchMatches INSTEAD.
|
||||
// Run pulls Tickets that satisfy Profile constraints from QueryService,
|
||||
// runs matchmaking logic against them, then constructs and streams back
|
||||
// match candidates to the Backend service.
|
||||
Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (MatchFunction_RunClient, error)
|
||||
}
|
||||
|
||||
type matchFunctionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMatchFunctionClient(cc grpc.ClientConnInterface) MatchFunctionClient {
|
||||
return &matchFunctionClient{cc}
|
||||
}
|
||||
|
||||
func (c *matchFunctionClient) Run(ctx context.Context, in *RunRequest, opts ...grpc.CallOption) (MatchFunction_RunClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &MatchFunction_ServiceDesc.Streams[0], MatchFunction_Run_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &matchFunctionRunClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type MatchFunction_RunClient interface {
|
||||
Recv() (*RunResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type matchFunctionRunClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *matchFunctionRunClient) Recv() (*RunResponse, error) {
|
||||
m := new(RunResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// MatchFunctionServer is the server API for MatchFunction service.
|
||||
// All implementations should embed UnimplementedMatchFunctionServer
|
||||
// for forward compatibility
|
||||
type MatchFunctionServer interface {
|
||||
// DO NOT CALL THIS FUNCTION MANUALLY. USE backend.FetchMatches INSTEAD.
|
||||
// Run pulls Tickets that satisfy Profile constraints from QueryService,
|
||||
// runs matchmaking logic against them, then constructs and streams back
|
||||
// match candidates to the Backend service.
|
||||
Run(*RunRequest, MatchFunction_RunServer) error
|
||||
}
|
||||
|
||||
// UnimplementedMatchFunctionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedMatchFunctionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedMatchFunctionServer) Run(*RunRequest, MatchFunction_RunServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Run not implemented")
|
||||
}
|
||||
|
||||
// UnsafeMatchFunctionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MatchFunctionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMatchFunctionServer interface {
|
||||
mustEmbedUnimplementedMatchFunctionServer()
|
||||
}
|
||||
|
||||
func RegisterMatchFunctionServer(s grpc.ServiceRegistrar, srv MatchFunctionServer) {
|
||||
s.RegisterService(&MatchFunction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _MatchFunction_Run_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(RunRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(MatchFunctionServer).Run(m, &matchFunctionRunServer{stream})
|
||||
}
|
||||
|
||||
type MatchFunction_RunServer interface {
|
||||
Send(*RunResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type matchFunctionRunServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *matchFunctionRunServer) Send(m *RunResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
// MatchFunction_ServiceDesc is the grpc.ServiceDesc for MatchFunction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var MatchFunction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.MatchFunction",
|
||||
HandlerType: (*MatchFunctionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Run",
|
||||
Handler: _MatchFunction_Run_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/matchfunction.proto",
|
||||
}
|
@ -14,18 +14,18 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/messages.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
any "github.com/golang/protobuf/ptypes/any"
|
||||
timestamp "github.com/golang/protobuf/ptypes/timestamp"
|
||||
_ "google.golang.org/genproto/googleapis/rpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
anypb "google.golang.org/protobuf/types/known/anypb"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
@ -116,14 +116,14 @@ type Ticket struct {
|
||||
// Customized information not inspected by Open Match, to be used by the match
|
||||
// making function, evaluator, and components making calls to Open Match.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
Extensions map[string]*any.Any `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Extensions map[string]*anypb.Any `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Customized information not inspected by Open Match, to be kept persistent
|
||||
// throughout the life-cycle of a ticket.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
PersistentField map[string]*any.Any `protobuf:"bytes,6,rep,name=persistent_field,json=persistentField,proto3" json:"persistent_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
PersistentField map[string]*anypb.Any `protobuf:"bytes,6,rep,name=persistent_field,json=persistentField,proto3" json:"persistent_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Create time is the time the Ticket was created. It is populated by Open
|
||||
// Match at the time of Ticket creation.
|
||||
CreateTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Ticket) Reset() {
|
||||
@ -179,21 +179,21 @@ func (x *Ticket) GetSearchFields() *SearchFields {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Ticket) GetExtensions() map[string]*any.Any {
|
||||
func (x *Ticket) GetExtensions() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Ticket) GetPersistentField() map[string]*any.Any {
|
||||
func (x *Ticket) GetPersistentField() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.PersistentField
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Ticket) GetCreateTime() *timestamp.Timestamp {
|
||||
func (x *Ticket) GetCreateTime() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreateTime
|
||||
}
|
||||
@ -280,7 +280,7 @@ type Assignment struct {
|
||||
// Customized information not inspected by Open Match, to be used by the match
|
||||
// making function, evaluator, and components making calls to Open Match.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
Extensions map[string]*any.Any `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Extensions map[string]*anypb.Any `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *Assignment) Reset() {
|
||||
@ -322,7 +322,7 @@ func (x *Assignment) GetConnection() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Assignment) GetExtensions() map[string]*any.Any {
|
||||
func (x *Assignment) GetExtensions() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
@ -569,9 +569,9 @@ type Pool struct {
|
||||
StringEqualsFilters []*StringEqualsFilter `protobuf:"bytes,4,rep,name=string_equals_filters,json=stringEqualsFilters,proto3" json:"string_equals_filters,omitempty"`
|
||||
TagPresentFilters []*TagPresentFilter `protobuf:"bytes,5,rep,name=tag_present_filters,json=tagPresentFilters,proto3" json:"tag_present_filters,omitempty"`
|
||||
// If specified, only Tickets created before the specified time are selected.
|
||||
CreatedBefore *timestamp.Timestamp `protobuf:"bytes,6,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"`
|
||||
CreatedBefore *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_before,json=createdBefore,proto3" json:"created_before,omitempty"`
|
||||
// If specified, only Tickets created after the specified time are selected.
|
||||
CreatedAfter *timestamp.Timestamp `protobuf:"bytes,7,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"`
|
||||
CreatedAfter *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_after,json=createdAfter,proto3" json:"created_after,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Pool) Reset() {
|
||||
@ -634,14 +634,14 @@ func (x *Pool) GetTagPresentFilters() []*TagPresentFilter {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Pool) GetCreatedBefore() *timestamp.Timestamp {
|
||||
func (x *Pool) GetCreatedBefore() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedBefore
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Pool) GetCreatedAfter() *timestamp.Timestamp {
|
||||
func (x *Pool) GetCreatedAfter() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreatedAfter
|
||||
}
|
||||
@ -665,7 +665,7 @@ type MatchProfile struct {
|
||||
// Customized information not inspected by Open Match, to be used by the match
|
||||
// making function, evaluator, and components making calls to Open Match.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
Extensions map[string]*any.Any `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Extensions map[string]*anypb.Any `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *MatchProfile) Reset() {
|
||||
@ -714,7 +714,7 @@ func (x *MatchProfile) GetPools() []*Pool {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *MatchProfile) GetExtensions() map[string]*any.Any {
|
||||
func (x *MatchProfile) GetExtensions() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
@ -742,7 +742,7 @@ type Match struct {
|
||||
// Customized information not inspected by Open Match, to be used by the match
|
||||
// making function, evaluator, and components making calls to Open Match.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
Extensions map[string]*any.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Extensions map[string]*anypb.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Backfill request which contains additional information to the match
|
||||
// and contains an association to a GameServer.
|
||||
// BETA FEATURE WARNING: This field is not finalized and still subject
|
||||
@ -815,7 +815,7 @@ func (x *Match) GetTickets() []*Ticket {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Match) GetExtensions() map[string]*any.Any {
|
||||
func (x *Match) GetExtensions() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
@ -853,14 +853,14 @@ type Backfill struct {
|
||||
// Customized information not inspected by Open Match, to be used by
|
||||
// the Match Function, evaluator, and components making calls to Open Match.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
Extensions map[string]*any.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Extensions map[string]*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Customized information not inspected by Open Match, to be kept persistent
|
||||
// throughout the life-cycle of a backfill.
|
||||
// Optional, depending on the requirements of the connected systems.
|
||||
PersistentField map[string]*any.Any `protobuf:"bytes,4,rep,name=persistent_field,json=persistentField,proto3" json:"persistent_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
PersistentField map[string]*anypb.Any `protobuf:"bytes,4,rep,name=persistent_field,json=persistentField,proto3" json:"persistent_field,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Create time is the time the Ticket was created. It is populated by Open
|
||||
// Match at the time of Ticket creation.
|
||||
CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
|
||||
// Generation gets incremented on GameServers update operations.
|
||||
// Prevents the MMF from overriding a newer version from the game server.
|
||||
// Do NOT read or write to this field, it is for internal tracking, and changing the value will cause bugs.
|
||||
@ -913,21 +913,21 @@ func (x *Backfill) GetSearchFields() *SearchFields {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Backfill) GetExtensions() map[string]*any.Any {
|
||||
func (x *Backfill) GetExtensions() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.Extensions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Backfill) GetPersistentField() map[string]*any.Any {
|
||||
func (x *Backfill) GetPersistentField() map[string]*anypb.Any {
|
||||
if x != nil {
|
||||
return x.PersistentField
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Backfill) GetCreateTime() *timestamp.Timestamp {
|
||||
func (x *Backfill) GetCreateTime() *timestamppb.Timestamp {
|
||||
if x != nil {
|
||||
return x.CreateTime
|
||||
}
|
||||
@ -1177,8 +1177,8 @@ var file_api_messages_proto_goTypes = []interface{}{
|
||||
nil, // 17: openmatch.Match.ExtensionsEntry
|
||||
nil, // 18: openmatch.Backfill.ExtensionsEntry
|
||||
nil, // 19: openmatch.Backfill.PersistentFieldEntry
|
||||
(*timestamp.Timestamp)(nil), // 20: google.protobuf.Timestamp
|
||||
(*any.Any)(nil), // 21: google.protobuf.Any
|
||||
(*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp
|
||||
(*anypb.Any)(nil), // 21: google.protobuf.Any
|
||||
}
|
||||
var file_api_messages_proto_depIdxs = []int32{
|
||||
3, // 0: openmatch.Ticket.assignment:type_name -> openmatch.Assignment
|
||||
|
@ -14,19 +14,15 @@
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.31.0
|
||||
// protoc v4.24.0
|
||||
// source: api/query.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
@ -372,52 +368,52 @@ var file_api_query_proto_rawDesc = []byte{
|
||||
0x68, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x01,
|
||||
0x2a, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01,
|
||||
0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x3a, 0x71, 0x75, 0x65, 0x72,
|
||||
0x79, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63,
|
||||
0x6b, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x64,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
|
||||
0x49, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x69, 0x64, 0x73, 0x3a,
|
||||
0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x01, 0x2a, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x51,
|
||||
0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72,
|
||||
0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x69,
|
||||
0x64, 0x73, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x30, 0x01, 0x12, 0x84, 0x01, 0x0a, 0x0e, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x12, 0x20, 0x2e,
|
||||
0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42,
|
||||
0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x42, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x62, 0x61, 0x63,
|
||||
0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x01, 0x2a, 0x30,
|
||||
0x01, 0x42, 0x98, 0x03, 0x5a, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f,
|
||||
0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x92, 0x41, 0xe6, 0x02, 0x12, 0xbf, 0x01, 0x0a, 0x15, 0x4d, 0x4d, 0x20, 0x4c, 0x6f,
|
||||
0x67, 0x69, 0x63, 0x20, 0x28, 0x44, 0x61, 0x74, 0x61, 0x20, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x29,
|
||||
0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16,
|
||||
0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74,
|
||||
0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a, 0x12, 0x41,
|
||||
0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75,
|
||||
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x67,
|
||||
0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f,
|
||||
0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45,
|
||||
0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70,
|
||||
0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10,
|
||||
0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
|
||||
0x62, 0x61, 0x63, 0x6b, 0x66, 0x69, 0x6c, 0x6c, 0x73, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x30,
|
||||
0x01, 0x42, 0x98, 0x03, 0x92, 0x41, 0xe6, 0x02, 0x12, 0xbf, 0x01, 0x0a, 0x15, 0x4d, 0x4d, 0x20,
|
||||
0x4c, 0x6f, 0x67, 0x69, 0x63, 0x20, 0x28, 0x44, 0x61, 0x74, 0x61, 0x20, 0x4c, 0x61, 0x79, 0x65,
|
||||
0x72, 0x29, 0x22, 0x49, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68,
|
||||
0x12, 0x16, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x1a, 0x23, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d,
|
||||
0x61, 0x74, 0x63, 0x68, 0x2d, 0x64, 0x69, 0x73, 0x63, 0x75, 0x73, 0x73, 0x40, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x56, 0x0a,
|
||||
0x12, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x4c, 0x69, 0x63, 0x65,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x40, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x66, 0x6f,
|
||||
0x72, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63,
|
||||
0x68, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49,
|
||||
0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x03, 0x31, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10,
|
||||
0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e,
|
||||
0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72,
|
||||
0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65,
|
||||
0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72, 0x3d, 0x0a,
|
||||
0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f, 0x63, 0x75,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74, 0x70, 0x73,
|
||||
0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65,
|
||||
0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72,
|
||||
0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73,
|
||||
0x6f, 0x6e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, 0x2a, 0x52, 0x65, 0x74,
|
||||
0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74,
|
||||
0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, 0x02, 0x01, 0x07, 0x72,
|
||||
0x3d, 0x0a, 0x18, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x44, 0x6f,
|
||||
0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x68, 0x74, 0x74,
|
||||
0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e,
|
||||
0x64, 0x65, 0x76, 0x2f, 0x73, 0x69, 0x74, 0x65, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x5a, 0x20,
|
||||
0x6f, 0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x6f,
|
||||
0x70, 0x65, 0x6e, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62,
|
||||
0xaa, 0x02, 0x09, 0x4f, 0x70, 0x65, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
@ -563,258 +559,3 @@ func file_api_query_proto_init() {
|
||||
file_api_query_proto_goTypes = nil
|
||||
file_api_query_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// QueryServiceClient is the client API for QueryService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type QueryServiceClient interface {
|
||||
// QueryTickets gets a list of Tickets that match all Filters of the input Pool.
|
||||
// - If the Pool contains no Filters, QueryTickets will return all Tickets in the state storage.
|
||||
// QueryTickets pages the Tickets by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTickets(ctx context.Context, in *QueryTicketsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketsClient, error)
|
||||
// QueryTicketIds gets the list of TicketIDs that meet all the filtering criteria requested by the pool.
|
||||
// - If the Pool contains no Filters, QueryTicketIds will return all TicketIDs in the state storage.
|
||||
// QueryTicketIds pages the TicketIDs by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTicketIds(ctx context.Context, in *QueryTicketIdsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketIdsClient, error)
|
||||
// QueryBackfills gets a list of Backfills.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
QueryBackfills(ctx context.Context, in *QueryBackfillsRequest, opts ...grpc.CallOption) (QueryService_QueryBackfillsClient, error)
|
||||
}
|
||||
|
||||
type queryServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
|
||||
return &queryServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryTickets(ctx context.Context, in *QueryTicketsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[0], "/openmatch.QueryService/QueryTickets", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryTicketsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketsClient interface {
|
||||
Recv() (*QueryTicketsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketsClient) Recv() (*QueryTicketsResponse, error) {
|
||||
m := new(QueryTicketsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryTicketIds(ctx context.Context, in *QueryTicketIdsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketIdsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[1], "/openmatch.QueryService/QueryTicketIds", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryTicketIdsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketIdsClient interface {
|
||||
Recv() (*QueryTicketIdsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketIdsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketIdsClient) Recv() (*QueryTicketIdsResponse, error) {
|
||||
m := new(QueryTicketIdsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryBackfills(ctx context.Context, in *QueryBackfillsRequest, opts ...grpc.CallOption) (QueryService_QueryBackfillsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_QueryService_serviceDesc.Streams[2], "/openmatch.QueryService/QueryBackfills", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryBackfillsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryBackfillsClient interface {
|
||||
Recv() (*QueryBackfillsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryBackfillsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryBackfillsClient) Recv() (*QueryBackfillsResponse, error) {
|
||||
m := new(QueryBackfillsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// QueryServiceServer is the server API for QueryService service.
|
||||
type QueryServiceServer interface {
|
||||
// QueryTickets gets a list of Tickets that match all Filters of the input Pool.
|
||||
// - If the Pool contains no Filters, QueryTickets will return all Tickets in the state storage.
|
||||
// QueryTickets pages the Tickets by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTickets(*QueryTicketsRequest, QueryService_QueryTicketsServer) error
|
||||
// QueryTicketIds gets the list of TicketIDs that meet all the filtering criteria requested by the pool.
|
||||
// - If the Pool contains no Filters, QueryTicketIds will return all TicketIDs in the state storage.
|
||||
// QueryTicketIds pages the TicketIDs by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTicketIds(*QueryTicketIdsRequest, QueryService_QueryTicketIdsServer) error
|
||||
// QueryBackfills gets a list of Backfills.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
QueryBackfills(*QueryBackfillsRequest, QueryService_QueryBackfillsServer) error
|
||||
}
|
||||
|
||||
// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedQueryServiceServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedQueryServiceServer) QueryTickets(*QueryTicketsRequest, QueryService_QueryTicketsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryTickets not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServiceServer) QueryTicketIds(*QueryTicketIdsRequest, QueryService_QueryTicketIdsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryTicketIds not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServiceServer) QueryBackfills(*QueryBackfillsRequest, QueryService_QueryBackfillsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryBackfills not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServiceServer(s *grpc.Server, srv QueryServiceServer) {
|
||||
s.RegisterService(&_QueryService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _QueryService_QueryTickets_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryTicketsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryTickets(m, &queryServiceQueryTicketsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketsServer interface {
|
||||
Send(*QueryTicketsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketsServer) Send(m *QueryTicketsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _QueryService_QueryTicketIds_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryTicketIdsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryTicketIds(m, &queryServiceQueryTicketIdsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketIdsServer interface {
|
||||
Send(*QueryTicketIdsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketIdsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketIdsServer) Send(m *QueryTicketIdsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _QueryService_QueryBackfills_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryBackfillsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryBackfills(m, &queryServiceQueryBackfillsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryBackfillsServer interface {
|
||||
Send(*QueryBackfillsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryBackfillsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryBackfillsServer) Send(m *QueryBackfillsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
var _QueryService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.QueryService",
|
||||
HandlerType: (*QueryServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "QueryTickets",
|
||||
Handler: _QueryService_QueryTickets_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "QueryTicketIds",
|
||||
Handler: _QueryService_QueryTicketIds_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "QueryBackfills",
|
||||
Handler: _QueryService_QueryBackfills_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/query.proto",
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
||||
// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -178,19 +178,21 @@ func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryTickets")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryTickets", runtime.WithHTTPPathPattern("/v1/queryservice/tickets:query"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_QueryService_QueryTickets_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_QueryService_QueryTickets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_QueryService_QueryTickets_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_QueryService_QueryTickets_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -198,19 +200,21 @@ func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryTicketIds")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryTicketIds", runtime.WithHTTPPathPattern("/v1/queryservice/ticketids:query"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_QueryService_QueryTicketIds_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_QueryService_QueryTicketIds_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_QueryService_QueryTicketIds_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_QueryService_QueryTicketIds_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@ -218,19 +222,21 @@ func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryBackfills")
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/openmatch.QueryService/QueryBackfills", runtime.WithHTTPPathPattern("/v1/queryservice/backfills:query"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_QueryService_QueryBackfills_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
resp, md, err := request_QueryService_QueryBackfills_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_QueryService_QueryBackfills_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
forward_QueryService_QueryBackfills_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
|
302
pkg/pb/query_grpc.pb.go
Normal file
302
pkg/pb/query_grpc.pb.go
Normal file
@ -0,0 +1,302 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.0
|
||||
// source: api/query.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
QueryService_QueryTickets_FullMethodName = "/openmatch.QueryService/QueryTickets"
|
||||
QueryService_QueryTicketIds_FullMethodName = "/openmatch.QueryService/QueryTicketIds"
|
||||
QueryService_QueryBackfills_FullMethodName = "/openmatch.QueryService/QueryBackfills"
|
||||
)
|
||||
|
||||
// QueryServiceClient is the client API for QueryService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type QueryServiceClient interface {
|
||||
// QueryTickets gets a list of Tickets that match all Filters of the input Pool.
|
||||
// - If the Pool contains no Filters, QueryTickets will return all Tickets in the state storage.
|
||||
//
|
||||
// QueryTickets pages the Tickets by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTickets(ctx context.Context, in *QueryTicketsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketsClient, error)
|
||||
// QueryTicketIds gets the list of TicketIDs that meet all the filtering criteria requested by the pool.
|
||||
// - If the Pool contains no Filters, QueryTicketIds will return all TicketIDs in the state storage.
|
||||
//
|
||||
// QueryTicketIds pages the TicketIDs by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTicketIds(ctx context.Context, in *QueryTicketIdsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketIdsClient, error)
|
||||
// QueryBackfills gets a list of Backfills.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
QueryBackfills(ctx context.Context, in *QueryBackfillsRequest, opts ...grpc.CallOption) (QueryService_QueryBackfillsClient, error)
|
||||
}
|
||||
|
||||
type queryServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient {
|
||||
return &queryServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryTickets(ctx context.Context, in *QueryTicketsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &QueryService_ServiceDesc.Streams[0], QueryService_QueryTickets_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryTicketsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketsClient interface {
|
||||
Recv() (*QueryTicketsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketsClient) Recv() (*QueryTicketsResponse, error) {
|
||||
m := new(QueryTicketsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryTicketIds(ctx context.Context, in *QueryTicketIdsRequest, opts ...grpc.CallOption) (QueryService_QueryTicketIdsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &QueryService_ServiceDesc.Streams[1], QueryService_QueryTicketIds_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryTicketIdsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketIdsClient interface {
|
||||
Recv() (*QueryTicketIdsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketIdsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketIdsClient) Recv() (*QueryTicketIdsResponse, error) {
|
||||
m := new(QueryTicketIdsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *queryServiceClient) QueryBackfills(ctx context.Context, in *QueryBackfillsRequest, opts ...grpc.CallOption) (QueryService_QueryBackfillsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &QueryService_ServiceDesc.Streams[2], QueryService_QueryBackfills_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &queryServiceQueryBackfillsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type QueryService_QueryBackfillsClient interface {
|
||||
Recv() (*QueryBackfillsResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type queryServiceQueryBackfillsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryBackfillsClient) Recv() (*QueryBackfillsResponse, error) {
|
||||
m := new(QueryBackfillsResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// QueryServiceServer is the server API for QueryService service.
|
||||
// All implementations should embed UnimplementedQueryServiceServer
|
||||
// for forward compatibility
|
||||
type QueryServiceServer interface {
|
||||
// QueryTickets gets a list of Tickets that match all Filters of the input Pool.
|
||||
// - If the Pool contains no Filters, QueryTickets will return all Tickets in the state storage.
|
||||
//
|
||||
// QueryTickets pages the Tickets by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTickets(*QueryTicketsRequest, QueryService_QueryTicketsServer) error
|
||||
// QueryTicketIds gets the list of TicketIDs that meet all the filtering criteria requested by the pool.
|
||||
// - If the Pool contains no Filters, QueryTicketIds will return all TicketIDs in the state storage.
|
||||
//
|
||||
// QueryTicketIds pages the TicketIDs by `queryPageSize` and stream back responses.
|
||||
// - queryPageSize is default to 1000 if not set, and has a minimum of 10 and maximum of 10000.
|
||||
QueryTicketIds(*QueryTicketIdsRequest, QueryService_QueryTicketIdsServer) error
|
||||
// QueryBackfills gets a list of Backfills.
|
||||
// BETA FEATURE WARNING: This call and the associated Request and Response
|
||||
// messages are not finalized and still subject to possible change or removal.
|
||||
QueryBackfills(*QueryBackfillsRequest, QueryService_QueryBackfillsServer) error
|
||||
}
|
||||
|
||||
// UnimplementedQueryServiceServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedQueryServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedQueryServiceServer) QueryTickets(*QueryTicketsRequest, QueryService_QueryTicketsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryTickets not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServiceServer) QueryTicketIds(*QueryTicketIdsRequest, QueryService_QueryTicketIdsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryTicketIds not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServiceServer) QueryBackfills(*QueryBackfillsRequest, QueryService_QueryBackfillsServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method QueryBackfills not implemented")
|
||||
}
|
||||
|
||||
// UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to QueryServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeQueryServiceServer interface {
|
||||
mustEmbedUnimplementedQueryServiceServer()
|
||||
}
|
||||
|
||||
func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) {
|
||||
s.RegisterService(&QueryService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _QueryService_QueryTickets_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryTicketsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryTickets(m, &queryServiceQueryTicketsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketsServer interface {
|
||||
Send(*QueryTicketsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketsServer) Send(m *QueryTicketsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _QueryService_QueryTicketIds_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryTicketIdsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryTicketIds(m, &queryServiceQueryTicketIdsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryTicketIdsServer interface {
|
||||
Send(*QueryTicketIdsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryTicketIdsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryTicketIdsServer) Send(m *QueryTicketIdsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _QueryService_QueryBackfills_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(QueryBackfillsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(QueryServiceServer).QueryBackfills(m, &queryServiceQueryBackfillsServer{stream})
|
||||
}
|
||||
|
||||
type QueryService_QueryBackfillsServer interface {
|
||||
Send(*QueryBackfillsResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type queryServiceQueryBackfillsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *queryServiceQueryBackfillsServer) Send(m *QueryBackfillsResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
// QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var QueryService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "openmatch.QueryService",
|
||||
HandlerType: (*QueryServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "QueryTickets",
|
||||
Handler: _QueryService_QueryTickets_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "QueryTicketIds",
|
||||
Handler: _QueryService_QueryTicketIds_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "QueryBackfills",
|
||||
Handler: _QueryService_QueryBackfills_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "api/query.proto",
|
||||
}
|
@ -17,8 +17,8 @@ of running the tests in a realistic setting where requests may not be routed to
|
||||
|
||||
For a new test package under test/e2e/ do the following:
|
||||
|
||||
Copy the contents of internal/testing/e2e/main_test.go and change the package name and add
|
||||
the `open-match.dev/open-match/internal/testing/e2e` import.
|
||||
Copy the contents of testing/e2e/main_test.go and change the package name and add
|
||||
the `open-match.dev/open-match/testing/e2e` import.
|
||||
|
||||
Example (may be out of date):
|
||||
```golang
|
||||
@ -39,7 +39,7 @@ Example (may be out of date):
|
||||
package tickets
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/testing/e2e"
|
||||
"open-match.dev/open-match/testing/e2e"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@ -61,10 +61,10 @@ Minimatch mode essentially binds all the services that Open Match provides
|
||||
into a single gRPC/HTTP server. The magic happens in the `internal/app/minimatch/minimatch.go`'s
|
||||
`BindService()` method.
|
||||
|
||||
In addition, there's an in-memory Redis instance that's initialized and bound in `internal/testing/e2e/in_memory.go`.
|
||||
In addition, there's an in-memory Redis instance that's initialized and bound in `testing/e2e/in_memory.go`.
|
||||
|
||||
From here the `OM` instance encapsulates the details of communicating with these components.
|
||||
|
||||
## Kubernetes Cluster
|
||||
|
||||
Kubernetes cluster mode is managed via `internal/testing/e2e/cluster.go`
|
||||
Kubernetes cluster mode is managed via `testing/e2e/cluster.go`
|
@ -20,15 +20,13 @@ import (
|
||||
"io"
|
||||
"regexp"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/any"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -91,13 +89,13 @@ func TestBackfillFrontendLifecycle(t *testing.T) {
|
||||
createdBf.SearchFields.StringArgs["key"] = "val"
|
||||
|
||||
orig := &anypb.Any{Value: []byte("test")}
|
||||
val, err := ptypes.MarshalAny(orig)
|
||||
val, err := anypb.New(orig)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Create a different Backfill, but with the same ID
|
||||
// Pass different time
|
||||
bf2 := &pb.Backfill{
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
Id: createdBf.Id,
|
||||
SearchFields: &pb.SearchFields{
|
||||
StringArgs: map[string]string{
|
||||
@ -106,7 +104,7 @@ func TestBackfillFrontendLifecycle(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Generation: 42,
|
||||
Extensions: map[string]*any.Any{"key": val},
|
||||
Extensions: map[string]*anypb.Any{"key": val},
|
||||
}
|
||||
updatedBf, err := om.Frontend().UpdateBackfill(ctx, &pb.UpdateBackfillRequest{Backfill: bf2})
|
||||
require.NoError(t, err)
|
||||
@ -120,7 +118,7 @@ func TestBackfillFrontendLifecycle(t *testing.T) {
|
||||
require.Equal(t, bf2.SearchFields.StringArgs, get.SearchFields.StringArgs)
|
||||
|
||||
unpacked := &anypb.Any{}
|
||||
err = ptypes.UnmarshalAny(get.Extensions["key"], unpacked)
|
||||
err = get.Extensions["key"].UnmarshalTo(unpacked)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, unpacked.Value, orig.Value)
|
||||
@ -154,7 +152,7 @@ func TestAcknowledgeBackfill(t *testing.T) {
|
||||
BackfillId: createdBf.Id,
|
||||
Assignment: &pb.Assignment{
|
||||
Connection: conn,
|
||||
Extensions: map[string]*any.Any{
|
||||
Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 10,
|
||||
}),
|
||||
@ -203,7 +201,7 @@ func TestAcknowledgeBackfillDeletedTicket(t *testing.T) {
|
||||
// Delete 1st ticket
|
||||
om.Frontend().DeleteTicket(ctx, &pb.DeleteTicketRequest{TicketId: ticketIDs[0]})
|
||||
conn := "127.0.0.1:4242"
|
||||
getResp, err := om.Frontend().AcknowledgeBackfill(ctx, &pb.AcknowledgeBackfillRequest{BackfillId: createdBf.Id, Assignment: &pb.Assignment{Connection: conn, Extensions: map[string]*any.Any{
|
||||
getResp, err := om.Frontend().AcknowledgeBackfill(ctx, &pb.AcknowledgeBackfillRequest{BackfillId: createdBf.Id, Assignment: &pb.Assignment{Connection: conn, Extensions: map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 10,
|
||||
}),
|
||||
@ -415,7 +413,7 @@ func TestProposedBackfillUpdate(t *testing.T) {
|
||||
},
|
||||
}
|
||||
//using DefaultEvaluationCriteria just for testing purposes only
|
||||
b.Extensions = map[string]*any.Any{
|
||||
b.Extensions = map[string]*anypb.Any{
|
||||
"evaluation_input": mustAny(&pb.DefaultEvaluationCriteria{
|
||||
Score: 10,
|
||||
}),
|
||||
@ -560,62 +558,6 @@ func TestBackfillGenerationMismatch(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCleanUpExpiredBackfills(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
om := newOM(t)
|
||||
|
||||
t1, err := om.Frontend().CreateTicket(ctx, &pb.CreateTicketRequest{Ticket: &pb.Ticket{}})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, t1)
|
||||
|
||||
b1, err := om.Frontend().CreateBackfill(ctx, &pb.CreateBackfillRequest{Backfill: &pb.Backfill{
|
||||
SearchFields: &pb.SearchFields{
|
||||
StringArgs: map[string]string{
|
||||
"search": "me",
|
||||
},
|
||||
}}})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, b1)
|
||||
|
||||
om.SetMMF(func(ctx context.Context, profile *pb.MatchProfile, out chan<- *pb.Match) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
om.SetEvaluator(func(ctx context.Context, in <-chan *pb.Match, out chan<- string) error {
|
||||
return nil
|
||||
})
|
||||
|
||||
// wait until backfill is expired, then try to get it
|
||||
time.Sleep(pendingReleaseTimeout * 2)
|
||||
|
||||
// statestore.CleanupBackfills is called at the end of each synchronizer cycle after fetch matches call, so expired backfill will be removed
|
||||
stream, err := om.Backend().FetchMatches(ctx, &pb.FetchMatchesRequest{
|
||||
Config: om.MMFConfigGRPC(),
|
||||
Profile: &pb.MatchProfile{},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
resp, err := stream.Recv()
|
||||
require.Nil(t, resp)
|
||||
require.Error(t, err)
|
||||
require.Equal(t, io.EOF.Error(), err.Error())
|
||||
|
||||
// call FetchMatches twice in order to give backfills time to be completely cleaned up
|
||||
stream, err = om.Backend().FetchMatches(ctx, &pb.FetchMatchesRequest{
|
||||
Config: om.MMFConfigGRPC(),
|
||||
Profile: &pb.MatchProfile{},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
resp, err = stream.Recv()
|
||||
require.Nil(t, resp)
|
||||
require.Error(t, err)
|
||||
require.Equal(t, io.EOF.Error(), err.Error())
|
||||
|
||||
_, err = om.Frontend().GetBackfill(ctx, &pb.GetBackfillRequest{BackfillId: b1.Id})
|
||||
require.Error(t, err)
|
||||
require.Equal(t, fmt.Sprintf("rpc error: code = NotFound desc = Backfill id: %s not found", b1.Id), err.Error())
|
||||
}
|
||||
|
||||
func TestBackfillSkipNotfoundError(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
om := newOM(t)
|
||||
@ -671,8 +613,8 @@ func TestBackfillSkipNotfoundError(t *testing.T) {
|
||||
require.Equal(t, fmt.Sprintf("rpc error: code = NotFound desc = Backfill id: %s not found", b1.Id), err.Error())
|
||||
}
|
||||
|
||||
func mustAny(m proto.Message) *any.Any {
|
||||
result, err := ptypes.MarshalAny(m)
|
||||
func mustAny(m proto.Message) *anypb.Any {
|
||||
result, err := anypb.New(m)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
//go:build e2ecluster
|
||||
// +build e2ecluster
|
||||
|
||||
// Copyright 2019 Google LLC
|
||||
@ -25,7 +26,7 @@ import (
|
||||
"open-match.dev/open-match/internal/app/evaluator"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/statestore"
|
||||
mmfService "open-match.dev/open-match/internal/testing/mmf"
|
||||
mmfService "open-match.dev/open-match/testing/mmf"
|
||||
)
|
||||
|
||||
func start(t *testing.T, eval evaluator.Evaluator, mmf mmfService.MatchFunction) (config.View, func(time.Duration)) {
|
@ -1,3 +1,4 @@
|
||||
//go:build e2ecluster
|
||||
// +build e2ecluster
|
||||
|
||||
// Copyright 2019 Google LLC
|
||||
@ -20,20 +21,16 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
"open-match.dev/open-match/internal/app/evaluator"
|
||||
"open-match.dev/open-match/internal/appmain/apptest"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
mmfService "open-match.dev/open-match/internal/testing/mmf"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
mmfService "open-match.dev/open-match/testing/mmf"
|
||||
)
|
||||
|
||||
func TestServiceHealth(t *testing.T) {
|
||||
@ -49,7 +46,7 @@ func TestServiceHealth(t *testing.T) {
|
||||
|
||||
namespace := os.Getenv("NAMESPACE")
|
||||
|
||||
podList, err := kubeClient.CoreV1().Pods(namespace).List(metav1.ListOptions{})
|
||||
podList, err := kubeClient.CoreV1().Pods(namespace).List(context.Background(), metav1.ListOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@ -86,21 +83,3 @@ func TestMain(m *testing.M) {
|
||||
|
||||
os.Exit(exitCode)
|
||||
}
|
||||
|
||||
// TestConfigMatch covers that the config file used for local in memory e2e
|
||||
// tests matches the configs used for the in cluster tests, to avoid drift.
|
||||
func TestConfigMatch(t *testing.T) {
|
||||
cfg, err := config.Read()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
cfgMemory := viper.New()
|
||||
cfgMemory.SetConfigType("yaml")
|
||||
err = cfgMemory.ReadConfig(strings.NewReader(configFile))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
require.Equal(t, cfgMemory.AllSettings(), cfg.AllSettings())
|
||||
}
|
@ -25,8 +25,8 @@ import (
|
||||
"open-match.dev/open-match/internal/app/evaluator"
|
||||
"open-match.dev/open-match/internal/appmain/apptest"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
mmfService "open-match.dev/open-match/internal/testing/mmf"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
mmfService "open-match.dev/open-match/testing/mmf"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -219,12 +219,9 @@ api:
|
||||
httpport: "51509"
|
||||
|
||||
redis:
|
||||
sentinelPort: 26379
|
||||
sentinelMaster: om-redis-master
|
||||
sentinelHostname: open-match-redis
|
||||
sentinelUsePassword: false
|
||||
port: 6379
|
||||
usePassword: false
|
||||
passwordPath: /opt/bitnami/redis/secrets/redis-password
|
||||
passwordPath: /redis-password
|
||||
pool:
|
||||
maxIdle: 200
|
||||
maxActive: 0
|
||||
@ -236,10 +233,6 @@ telemetry:
|
||||
traceSamplingFraction: "0.01"
|
||||
zpages:
|
||||
enable: "true"
|
||||
jaeger:
|
||||
enable: "false"
|
||||
agentEndpoint: ""
|
||||
collectorEndpoint: ""
|
||||
prometheus:
|
||||
enable: "false"
|
||||
endpoint: "/metrics"
|
@ -21,11 +21,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"open-match.dev/open-match/pkg/matchfunction"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
@ -1,3 +1,4 @@
|
||||
//go:build !e2ecluster
|
||||
// +build !e2ecluster
|
||||
|
||||
// Copyright 2019 Google LLC
|
||||
@ -31,7 +32,7 @@ import (
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/rpc"
|
||||
"open-match.dev/open-match/internal/telemetry"
|
||||
mmfService "open-match.dev/open-match/internal/testing/mmf"
|
||||
mmfService "open-match.dev/open-match/testing/mmf"
|
||||
)
|
||||
|
||||
func start(t *testing.T, eval evaluator.Evaluator, mmf mmfService.MatchFunction) (config.View, func(time.Duration)) {
|
||||
@ -42,12 +43,12 @@ func start(t *testing.T, eval evaluator.Evaluator, mmf mmfService.MatchFunction)
|
||||
}
|
||||
t.Cleanup(mredis.Close)
|
||||
|
||||
msentinal := minisentinel.NewSentinel(mredis)
|
||||
err = msentinal.StartAddr("localhost:0")
|
||||
msentinel := minisentinel.NewSentinel(mredis)
|
||||
err = msentinel.StartAddr("localhost:0")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to start minisentinel, %v", err)
|
||||
}
|
||||
t.Cleanup(msentinal.Close)
|
||||
t.Cleanup(msentinel.Close)
|
||||
|
||||
grpcListener, err := net.Listen("tcp", ":0")
|
||||
if err != nil {
|
||||
@ -74,9 +75,9 @@ func start(t *testing.T, eval evaluator.Evaluator, mmf mmfService.MatchFunction)
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
cfg.Set("redis.sentinelHostname", msentinal.Host())
|
||||
cfg.Set("redis.sentinelPort", msentinal.Port())
|
||||
cfg.Set("redis.sentinelMaster", msentinal.MasterInfo().Name)
|
||||
cfg.Set("redis.sentinelHostname", msentinel.Host())
|
||||
cfg.Set("redis.sentinelPort", msentinel.Port())
|
||||
cfg.Set("redis.sentinelMaster", msentinel.MasterInfo().Name)
|
||||
services := []string{apptest.ServiceName, "synchronizer", "backend", "frontend", "query", "evaluator"}
|
||||
for _, name := range services {
|
||||
cfg.Set("api."+name+".hostname", "localhost")
|
@ -19,10 +19,10 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"time"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -429,6 +429,7 @@ func TestTicketReleaseByTimeout(t *testing.T) {
|
||||
{ // Create ticket
|
||||
var err error
|
||||
ticket, err = om.Frontend().CreateTicket(ctx, &pb.CreateTicketRequest{Ticket: &pb.Ticket{}})
|
||||
fmt.Println("------------------- ", err)
|
||||
require.Nil(t, err)
|
||||
require.NotEmpty(t, ticket.Id)
|
||||
}
|
||||
@ -539,7 +540,7 @@ func TestCreateTicketErrors(t *testing.T) {
|
||||
"already has create time",
|
||||
&pb.CreateTicketRequest{
|
||||
Ticket: &pb.Ticket{
|
||||
CreateTime: ptypes.TimestampNow(),
|
||||
CreateTime: timestamppb.Now(),
|
||||
},
|
||||
},
|
||||
"tickets cannot be created with create time set",
|
@ -18,9 +18,9 @@ package testing
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
@ -40,7 +40,7 @@ func (s *FakeFrontend) CreateTicket(ctx context.Context, req *pb.CreateTicketReq
|
||||
// DeleteTicket removes the Ticket from state storage and from corresponding
|
||||
// configured indices. Deleting the ticket stops the ticket from being
|
||||
// considered for future matchmaking requests.
|
||||
func (s *FakeFrontend) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*empty.Empty, error) {
|
||||
func (s *FakeFrontend) DeleteTicket(ctx context.Context, req *pb.DeleteTicketRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "not implemented")
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ func (s *FakeFrontend) CreateBackfill(ctx context.Context, req *pb.CreateBackfil
|
||||
}
|
||||
|
||||
// DeleteBackfill deletes a Backfill by its ID.
|
||||
func (s *FakeFrontend) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*empty.Empty, error) {
|
||||
func (s *FakeFrontend) DeleteBackfill(ctx context.Context, req *pb.DeleteBackfillRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "not implemented")
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user