Documentation ¶
Overview ¶
Package ignorelist is an ignore list 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.
Ignorelists are modeled in redis as sorted sets. Participant IDs are the elements, and the values are the epoch timestamp in seconds of when the element was added to the list.
Index ¶
- func Add(redisConn redis.Conn, ignorelistID string, playerIDs []string) error
- func Create(redisConn redis.Conn, ignorelistID string, playerIDs []string) error
- func Move(ctx context.Context, pool *redis.Pool, playerIDs []string, src string, ...) error
- func Remove(redisConn redis.Conn, ignorelistID string, playerIDs []string) error
- func Retrieve(redisConn redis.Conn, cfg *viper.Viper, il string) ([]string, error)
- func SendAdd(redisConn redis.Conn, ignorelistID string, playerIDs []string)
- func SendRemove(redisConn redis.Conn, ignorelistID string, playerIDs []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create generates an ignorelist in redis by ZADD'ing elements with a score of the current time in seconds since the epoch
func Move ¶
Move moves a list of players from one ignorelist to another. TODO: Make cancellable with context
func Retrieve ¶
Retrieve returns a list of playerIDs in the ignorelist 'cfg' is a viper.Sub sub-tree of the config file with just the parameters for this ignorelist.
Types ¶
This section is empty.