go_redis_ringbuffer

package module
v0.0.0-...-ae549b3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2017 License: MIT Imports: 2 Imported by: 1

README

go-redis-ringbuffer

Interface for creating in memory ring buffers quickly in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingBuffer

type RingBuffer struct {
	Capacity int64
	Name     string
	// contains filtered or unexported fields
}

func NewRingBuffer

func NewRingBuffer(name string, capacity int64, client *redis.Client) *RingBuffer

func (*RingBuffer) GetRange

func (rb *RingBuffer) GetRange(start int64, stop int64) ([]string, error)

func (*RingBuffer) Pop

func (rb *RingBuffer) Pop() (string, error)

Pop the last element added to the ring

func (*RingBuffer) Push

func (rb *RingBuffer) Push(item string) error

Insert into the ring

Jump to

Keyboard shortcuts

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