redis

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

type Redis struct {
	storage.AbstractUnit
	// contains filtered or unexported fields
}

func (*Redis) Add

func (s *Redis) Add(i sdk.CDNItemUnit, score uint, since uint, value string) error

func (*Redis) BufferType

func (s *Redis) BufferType() storage.CDNBufferType

func (*Redis) Card

func (s *Redis) Card(i sdk.CDNItemUnit) (int, error)

func (*Redis) GetDriverName

func (s *Redis) GetDriverName() string

func (*Redis) Init

func (s *Redis) Init(_ context.Context, cfg interface{}, bufferType storage.CDNBufferType) error

func (*Redis) ItemExists

func (s *Redis) ItemExists(_ context.Context, _ *gorpmapper.Mapper, _ gorp.SqlExecutor, i sdk.CDNItem) (bool, error)

func (*Redis) Keys

func (s *Redis) Keys() ([]string, error)

func (*Redis) NewAdvancedReader

func (s *Redis) NewAdvancedReader(_ context.Context, i sdk.CDNItemUnit, format sdk.CDNReaderFormat, from int64, size uint, sort int64) (io.ReadCloser, error)

NewAdvancedReader instanciate a reader from given option, format can be JSON or Text. If from is < 0, read end lines (ex: from=-100 size=0 means read the last 100 lines)

func (*Redis) NewReader

func (s *Redis) NewReader(_ context.Context, i sdk.CDNItemUnit) (io.ReadCloser, error)

NewReader instanciate a reader that it able to iterate over Redis storage unit with a score step of 100.0, starting at score 0

func (*Redis) Read

func (s *Redis) Read(_ sdk.CDNItemUnit, r io.Reader, w io.Writer) error

func (*Redis) Remove

func (s *Redis) Remove(_ context.Context, i sdk.CDNItemUnit) error

func (*Redis) ResyncWithDatabase

func (s *Redis) ResyncWithDatabase(ctx context.Context, _ gorp.SqlExecutor, _ sdk.CDNItemType, _ bool)

func (*Redis) Size

func (s *Redis) Size(i sdk.CDNItemUnit) (int64, error)

func (*Redis) Status

func (s *Redis) Status(_ context.Context) []sdk.MonitoringStatusLine

Jump to

Keyboard shortcuts

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