cache

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Rdb *redis.Client
	Ctx context.Context
}

func NewCache

func NewCache() *Cache

NewCache returns an initiated Redis client

func (*Cache) Dec

func (c *Cache) Dec(key string, by int64) (int64, error)

func (*Cache) DequeueWork

func (c *Cache) DequeueWork(key string) (string, error)

func (*Cache) Get

func (c *Cache) Get(key string) (string, error)

func (*Cache) GetTyped

func (c *Cache) GetTyped(key string, v interface{}) error

func (*Cache) HasPermission

func (c *Cache) HasPermission(token, repo, payload string) bool

func (*Cache) Inc

func (c *Cache) Inc(key string, by int64) (int64, error)

func (*Cache) Publish

func (c *Cache) Publish(msg internal.Command) error

func (*Cache) PublishDocument

func (c *Cache) PublishDocument(channel, typ string, v interface{})

func (*Cache) QueueWork

func (c *Cache) QueueWork(key, value string) error

func (*Cache) Set

func (c *Cache) Set(key string, value string) error

func (*Cache) SetTyped

func (c *Cache) SetTyped(key string, v interface{}) error

func (*Cache) Subscribe

func (c *Cache) Subscribe(send chan internal.Command, token, channel string, close chan bool)

Jump to

Keyboard shortcuts

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