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 Line

type Line struct {
	Number int64  `json:"number"`
	Value  string `json:"value"`
	Since  int64  `json:"since,omitempty"`
}

func (Line) Format

func (l Line) Format(f sdk.CDNReaderFormat) ([]byte, error)

type Reader

type Reader struct {
	Store      cache.ScoredSetStore
	ApiRefHash string
	ItemID     string
	PrefixKey  string

	From int64 // the offset that we want to use when reading lines from Redis, allows negative value to get last lines
	Size uint  // the count of lines that we want to read (0 means to the end)

	Format sdk.CDNReaderFormat

	Sort int64 // < 0 for latest logs first, >= 0 for older logs first
	// contains filtered or unexported fields
}

func (*Reader) Close

func (r *Reader) Close() error

Close is declared ot match buffer unit interface

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	Store     cache.ScoredSetStore
	ItemID    string
	PrefixKey string
	// contains filtered or unexported fields
}

func (*Writer) Close

func (w *Writer) Close() error

Close will write the end of the buffer to store in case the last line is not ended by \n

func (*Writer) Write

func (w *Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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