rdb

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 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 AuxFieldEvent

type AuxFieldEvent struct {
	Filed string
	Value string
}

func (*AuxFieldEvent) Debug

func (e *AuxFieldEvent) Debug()

type Event

type Event interface {
	Debug()
}

type EventStreamer

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

func (*EventStreamer) Err

func (s *EventStreamer) Err() error

func (*EventStreamer) HasNext

func (s *EventStreamer) HasNext() bool

func (*EventStreamer) Next

func (s *EventStreamer) Next() *RedisRdbEvent

type EventType

type EventType uint8
const (
	EventTypeMagicNumber EventType = iota
	EventTypeVersion
	EventTypeAuxField
	EventTypeSelectDb
	EventTypeResizeDb
	EventTypeStringObject
	EventTypeListObject
	EventTypeSetObject
	EventTypeZSetObject
	EventTypeHashObject
	EventTypeStreamObject
)

type HashField

type HashField struct {
	Field string
	Value string
}

type HashObjectEvent

type HashObjectEvent struct {
	Key    string
	Fields []HashField
}

func (*HashObjectEvent) Debug

func (e *HashObjectEvent) Debug()

type ListObjectEvent

type ListObjectEvent struct {
	Key     string
	Members []string
}

func (*ListObjectEvent) Debug

func (e *ListObjectEvent) Debug()

type MagicNumberEvent

type MagicNumberEvent struct {
	MagicNumber []byte
}

func (*MagicNumberEvent) Debug

func (e *MagicNumberEvent) Debug()

type ModuleObjectEvent

type ModuleObjectEvent struct{}

type Parser

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

func NewParser

func NewParser(name string) (*Parser, error)

func NewReaderParser

func NewReaderParser(r io.Reader) (*Parser, error)

func (*Parser) Parse

func (p *Parser) Parse() (*EventStreamer, error)

type RedisRdbEvent

type RedisRdbEvent struct {
	EventType EventType
	Event     Event
}

type ResizeDbEvent

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

func (*ResizeDbEvent) Debug

func (e *ResizeDbEvent) Debug()

type SelectDbEvent

type SelectDbEvent struct {
	Db int
}

func (*SelectDbEvent) Debug

func (e *SelectDbEvent) Debug()

type SetObjectEvent

type SetObjectEvent struct {
	Key     string
	Members []string
}

func (*SetObjectEvent) Debug

func (e *SetObjectEvent) Debug()

type StreamConsumer

type StreamConsumer struct {
	// Last time this consumer was active.
	SeenTime uint64

	Name string

	// Consumer specific pending entries list: all the pending messages delivered to this
	// consumer not yet acknowledged.
	PEL []*StreamNAck
}

type StreamConsumerGroup

type StreamConsumerGroup struct {
	Name string

	// Last delivered (not acknowledged) ID for this group.
	// Consumers that will just ask for more messages will served with IDs > than this.
	LastId StreamId

	PEL       []*StreamNAck
	Consumers []*StreamConsumer
}

type StreamEntry

type StreamEntry struct {
	Id     StreamId
	Fields map[string]string
}

type StreamId

type StreamId struct {
	Ms  uint64
	Seq uint64
}

type StreamNAck

type StreamNAck struct {
	Id StreamId

	// Last time this message was delivered.
	DeliveryTime uint64

	// Number of times this message was delivered.
	DeliveryCount uint64

	// The consumer this message was delivered to in the last delivery.
	Consumer *StreamConsumer
}

type StreamObjectEvent

type StreamObjectEvent struct {
	Key     string
	Entries []*StreamEntry
	Groups  []*StreamConsumerGroup
}

func (*StreamObjectEvent) Debug

func (e *StreamObjectEvent) Debug()

type StringObjectEvent

type StringObjectEvent struct {
	Key   string
	Value string
}

func (*StringObjectEvent) Debug

func (e *StringObjectEvent) Debug()

type VersionEvent

type VersionEvent struct {
	Version int
}

func (*VersionEvent) Debug

func (e *VersionEvent) Debug()

type ZSetMember

type ZSetMember struct {
	Value string
	Score float64
}

type ZSetObjectEvent

type ZSetObjectEvent struct {
	Key     string
	Members []ZSetMember
}

func (*ZSetObjectEvent) Debug

func (e *ZSetObjectEvent) Debug()

Jump to

Keyboard shortcuts

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