schemav2

package
v0.0.0-...-927d137 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BatchWriteItemCount = promauto.NewCounter(
	prometheus.CounterOpts{
		Namespace: promNamespace,
		Name:      "batch_write_item_count",
	},
)
View Source
var BatchWriteItemHist = promauto.NewHistogram(
	prometheus.HistogramOpts{
		Namespace: promNamespace,
		Name:      "batch_write_item_latency_seconds",
		Buckets:   buckets,
	},
)
View Source
var GetItemHist = promauto.NewHistogram(
	prometheus.HistogramOpts{
		Namespace: promNamespace,
		Name:      "get_item_latency_seconds",
		Buckets:   buckets,
	},
)
View Source
var UpdateItemHist = promauto.NewHistogram(
	prometheus.HistogramOpts{
		Namespace: promNamespace,
		Name:      "update_item_latency_seconds",
		Buckets:   buckets,
	},
)

Functions

This section is empty.

Types

type File

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

func FileFromMeta

func FileFromMeta(meta *dynamo.FileMetaV1V2, table, ownerID string, db *dynamodb.DynamoDB, changeLogWriter *json.Encoder, cache sectorcache.CacheV2) (*File, error)

func (*File) CheckReservedLock

func (f *File) CheckReservedLock() (retB bool, retErr error)

func (*File) CleanupSectors

func (f *File) CleanupSectors(meta *dynamo.FileMetaV1V2) error

func (*File) Close

func (f *File) Close() error

func (*File) DeviceCharacteristics

func (f *File) DeviceCharacteristics() sqlite3vfs.DeviceCharacteristic

func (*File) FileSize

func (f *File) FileSize() (retSize int64, retErr error)

func (*File) Lock

func (f *File) Lock(elock sqlite3vfs.LockType) (retErr error)

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (retN int, retErr error)

func (*File) SanityCheckSectors

func (f *File) SanityCheckSectors() error

func (*File) SectorSize

func (f *File) SectorSize() int64

func (*File) Sync

func (f *File) Sync(flag sqlite3vfs.SyncType) error

func (*File) Truncate

func (f *File) Truncate(size int64) (retErr error)

func (*File) Unlock

func (f *File) Unlock(elock sqlite3vfs.LockType) (retErr error)

func (*File) WriteAt

func (f *File) WriteAt(b []byte, off int64) (n int, err error)

type Sector

type Sector struct {
	Valid bool
	Data  []byte
	ID    string
	// contains filtered or unexported fields
}

type SectorWriter

type SectorWriter struct {
	F *File
	// contains filtered or unexported fields
}

SectorWriter is a buffered writer for sectors. You must call flush() and check its error to ensure all sectors are actually written

func (*SectorWriter) DeleteSector

func (w *SectorWriter) DeleteSector(id string) error

func (*SectorWriter) Flush

func (w *SectorWriter) Flush() error

func (*SectorWriter) WriteSector

func (w *SectorWriter) WriteSector(idx int, data []byte) error

Jump to

Keyboard shortcuts

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