store

package
v0.0.0-...-8965fb6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2013 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

The store pkg is responsible for coordinating bucket transfer between the receivers (front-end) and readers & outlets (back-end).

Index

Constants

This section is empty.

Variables

This section is empty.

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) *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