persistence

package
v0.0.0-...-e191f7f Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMemoryStore

func NewMemoryStore() *memoryStore

Types

type PersistentStore

type PersistentStore interface {
	// Returns data stream.
	Load(ctx context.Context) ([]byte, error)

	// Returns modified time and its existence of the stream.
	// If the second returned value is false, the data does not exists.
	ModTime(ctx context.Context) (time.Time, bool, error)

	// Saves given data stream.
	Save(ctx context.Context, data []byte) error
}

func NewCompressedStore

func NewCompressedStore(store PersistentStore) PersistentStore

func NewFileStore

func NewFileStore(path string) PersistentStore

func NewS3Store

func NewS3Store(
	region string,
	bucketName string, key string,
) (PersistentStore, error)

Jump to

Keyboard shortcuts

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