store

package
v0.0.0-...-de99981 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2014 License: GPL-3.0 Imports: 12 Imported by: 12

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

func (m *MemStore) Now() time.Time

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)

func (*MemStore) ServeHTTP

func (m *MemStore) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RedisStore

type RedisStore struct {
	Mchan *metchan.Channel
	// contains filtered or unexported fields
}

func NewRedisStore

func NewRedisStore(cfg *conf.D) *RedisStore

func (*RedisStore) Flush

func (s *RedisStore) Flush()

func (*RedisStore) Get

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

func (*RedisStore) Health

func (s *RedisStore) Health() bool

Sends a PING request to Redis.

func (*RedisStore) MaxPartitions

func (s *RedisStore) MaxPartitions() uint64

func (*RedisStore) Now

func (s *RedisStore) Now() time.Time

Reads the TIME from Redis.

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)

func (*RedisStore) ServeHTTP

func (s *RedisStore) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Store

type Store interface {
	MaxPartitions() uint64
	Put(*bucket.Bucket) error
	Get(*bucket.Bucket) error
	Scan(time.Time) (<-chan *bucket.Bucket, error)
	Now() time.Time
	ServeHTTP(w http.ResponseWriter, r *http.Request)
}

Jump to

Keyboard shortcuts

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