database

package
v0.0.0-...-4418bfd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2019 License: GPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	WorkingSetKey    = "working"
	NotWorkingSetKey = "not_working"
	UnionSetKey      = "union"
)

Variables

This section is empty.

Functions

func AddSetChanValue

func AddSetChanValue(key string, valueChan <-chan string)

Fills Redis Set by values from valueChan

func AddSetValue

func AddSetValue(key, value string) error

Adds record to Set with 'key' name

func GetSetCard

func GetSetCard(key string) (int, error)

Gets a number of elements of the set

func InitDatabase

func InitDatabase()

Creates connection to Redis database. Must be run before working with DB.

func PopAllUnionSet

func PopAllUnionSet(hostChan chan<- string)

Sends all records from the Union Set to hostChan

func PopSetValue

func PopSetValue(key string) (string, error)

Pops a value from set

func UniteSetsToUnionSet

func UniteSetsToUnionSet() error

Unites Working and NotWorking sets to Union. Working and NotWorking sets will be deleted.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL