Documentation ¶
Index ¶
- Constants
- Variables
- type Panda
- type PandaPosting
- type PandaStorage
- func (s *PandaStorage) Get(tag *[common.PandaTagLength]byte) (*PandaPosting, error)
- func (s *PandaStorage) Put(tag *[common.PandaTagLength]byte, posting *PandaPosting) error
- func (s *PandaStorage) Replace(tag *[common.PandaTagLength]byte, posting *PandaPosting) error
- func (s *PandaStorage) Shutdown()
- func (s *PandaStorage) Vacuum() error
Constants ¶
View Source
const (
// PandaStorageVersion is the version of our on disk format.
PandaStorageVersion = 0
)
Variables ¶
View Source
var ErrNoSURBRequest = errors.New("Request received without SURB")
ErrNoSURBRequest is the error returned when no SURB accompanies a query.
Functions ¶
This section is empty.
Types ¶
type Panda ¶
type Panda struct {
// contains filtered or unexported fields
}
Panda is the PANDA server type.
type PandaPosting ¶
PandaPosting is the data structure stored on Panda server with each client interaction.
type PandaStorage ¶
PandaStorage handles the on disk persistence for the PANDA server.
func NewPandaStorage ¶
func NewPandaStorage(fileStore string, dwellDuration time.Duration, writeBackInterval time.Duration) (*PandaStorage, error)
NewPandaStorage creates an in memory store for Panda postings
func (*PandaStorage) Get ¶
func (s *PandaStorage) Get(tag *[common.PandaTagLength]byte) (*PandaPosting, error)
Get returns a posting from the data store that is referenced by the given tag.
func (*PandaStorage) Put ¶
func (s *PandaStorage) Put(tag *[common.PandaTagLength]byte, posting *PandaPosting) error
Put stores a posting in the data store such that it is referenced by the given tag.
func (*PandaStorage) Replace ¶
func (s *PandaStorage) Replace(tag *[common.PandaTagLength]byte, posting *PandaPosting) error
Replace replaces the stored posting.
func (*PandaStorage) Shutdown ¶
func (s *PandaStorage) Shutdown()
Shutdown stops the worker thread and sync the db.
func (*PandaStorage) Vacuum ¶
func (s *PandaStorage) Vacuum() error
Vacuum removes the postings that have expired.
Click to show internal directories.
Click to hide internal directories.