store

package
v0.0.0-...-31f1108 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PartitionTable = crc64.MakeTable(crc64.ISO)

Functions

This section is empty.

Types

type MemStore

type MemStore struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMemStore

func NewMemStore() *MemStore

func (*MemStore) Get

func (m *MemStore) Get(b *bucket.Bucket) error

func (*MemStore) Health

func (s *MemStore) Health() bool

func (*MemStore) MaxPartitions

func (m *MemStore) MaxPartitions() uint64

func (*MemStore) Put

func (m *MemStore) Put(b *bucket.Bucket) error

func (*MemStore) Scan

func (m *MemStore) Scan(schedule time.Time) (<-chan *bucket.Bucket, error)

type RedisStore

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

func NewRedisStore

func NewRedisStore(server, pass string, maxPartitions uint64, maxConn int) *RedisStore

func (*RedisStore) Get

func (s *RedisStore) Get(b *bucket.Bucket) error

func (*RedisStore) Health

func (s *RedisStore) Health() bool

func (*RedisStore) MaxPartitions

func (s *RedisStore) MaxPartitions() uint64

func (*RedisStore) Put

func (s *RedisStore) Put(b *bucket.Bucket) error

func (*RedisStore) Scan

func (s *RedisStore) Scan(schedule time.Time) (<-chan *bucket.Bucket, error)

type Store

type Store interface {
	MaxPartitions() uint64
	Put(*bucket.Bucket) error
	Get(*bucket.Bucket) error
	Scan(time.Time) (<-chan *bucket.Bucket, error)
	Health() bool
}

Jump to

Keyboard shortcuts

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