Documentation ¶
Overview ¶
Package playerq is a player queue specific redis implementation and will be removed 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) error
- func Deindex(redisConn redis.Conn, BLARGID 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 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. If you're trying to index a boolean, just use the epoch timestamp of the request as the value; the existance of that value for this group/player can be considered a 'true' value. 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 Deindex ¶
Deindex a BLARG without deleting there JSON object representation from state storage. Unindexing is done in two stages: first the BLARG is added to an ignore list, which 'atomically' removes them from consideration. A Goroutine is then kicked off to 'lazily' remove them from any field indicies that contain them.
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.