Documentation ¶
Overview ¶
Package playerq does CRUD operations on the player pool in state storage. It is deprecated and will be folded into a more general internal Redis module in a future version.
Copyright 2018 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
https://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.
Index ¶
- func Create(redisConn redis.Conn, playerID string, playerData string) (err error)
- func Delete(redisConn redis.Conn, playerID string) (err error)
- func Retrieve(redisConn redis.Conn, playerID string) (results map[string]interface{}, err error)
- func Unindex(redisConn redis.Conn, playerID string) (err error)
- func Update(redisConn redis.Conn, playerID string, playerData string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create adds a player's JSON representation to the current matchmaker state storage, and indexes all fields in that player's JSON object. All values in the JSON should be integers. Example:
player { "ping.us-east": 70, "ping.eu-central": 120, "map.sunsetvalley": "123456782", // TRUE flag key, epoch timestamp value "mode.ctf" // TRUE flag key, epoch timestamp value }
func Delete ¶
Delete a player's JSON object representation from state storage, and attempt to remove the player's presence in any indexes.
Types ¶
This section is empty.