cache

package
v1.4.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 9 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
	// contains filtered or unexported fields
}

func NewCache

func NewCache(log *logger.Logger) *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)

type CacheDev added in v1.4.0

type CacheDev struct {
	// contains filtered or unexported fields
}

func NewDevCache added in v1.4.0

func NewDevCache() *CacheDev

func (*CacheDev) Dec added in v1.4.0

func (d *CacheDev) Dec(key string, by int64) (int64, error)

func (*CacheDev) DequeueWork added in v1.4.0

func (d *CacheDev) DequeueWork(key string) (val string, err error)

func (*CacheDev) Get added in v1.4.0

func (d *CacheDev) Get(key string) (val string, err error)

func (*CacheDev) GetTyped added in v1.4.0

func (d *CacheDev) GetTyped(key string, v any) error

func (*CacheDev) Inc added in v1.4.0

func (d *CacheDev) Inc(key string, by int64) (n int64, err error)

func (*CacheDev) Publish added in v1.4.0

func (d *CacheDev) Publish(msg internal.Command) error

func (*CacheDev) PublishDocument added in v1.4.0

func (d *CacheDev) PublishDocument(channel, typ string, v any)

func (*CacheDev) QueueWork added in v1.4.0

func (d *CacheDev) QueueWork(key, value string) error

func (*CacheDev) Set added in v1.4.0

func (d *CacheDev) Set(key string, value string) error

func (*CacheDev) SetTyped added in v1.4.0

func (d *CacheDev) SetTyped(key string, v any) error

func (*CacheDev) Subscribe added in v1.4.0

func (d *CacheDev) 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