store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressedEncryptedStore

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

func NewCompressedEncryptedStore

func NewCompressedEncryptedStore(confCtx *config.Context) *CompressedEncryptedStore

func (*CompressedEncryptedStore) DownloadFromS3

func (c *CompressedEncryptedStore) DownloadFromS3(cur *cursor.Cursor, s3Manager *scalablestore.S3Manager) bool

func (*CompressedEncryptedStore) ExtractToSeekableStore

func (c *CompressedEncryptedStore) ExtractToSeekableStore(cur *cursor.Cursor, seekableStore *SeekableStore) bool

extracts compressed file first to temporary filename and then atomically moves it to SeekableStore

func (*CompressedEncryptedStore) Has

TODO: this has a race condition. remove this

func (*CompressedEncryptedStore) SaveFromLiveFile

func (c *CompressedEncryptedStore) SaveFromLiveFile(cur *cursor.Cursor, fromFd *os.File) error

stores the file as compressed & encrypted file from WAL's live file. when passing the FD, make sure fseek(0)

func (*CompressedEncryptedStore) UploadToS3

func (c *CompressedEncryptedStore) UploadToS3(cur *cursor.Cursor, s3Manager *scalablestore.S3Manager) error

upload compressed&encrypted to S3. only done once (or in rare cases more if upload errors)

type SeekableStore

type SeekableStore struct {
}

func NewSeekableStore

func NewSeekableStore() *SeekableStore

func (*SeekableStore) Has

func (s *SeekableStore) Has(cursor *cursor.Cursor) bool

func (*SeekableStore) Open

func (s *SeekableStore) Open(cursor *cursor.Cursor) (*os.File, error)

func (*SeekableStore) SaveByRenaming

func (s *SeekableStore) SaveByRenaming(cursor *cursor.Cursor, fromPath string)

store a file in SeekableStore by renaming a file here from a temporary location, so we can do this in an atomic way (= the second Has() reports true we have 100 % complete file)

Jump to

Keyboard shortcuts

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