block

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: MIT Imports: 9 Imported by: 2

Documentation

Overview

Copyright (C) 2022 Storj Labs, Inc. See LICENSE for copying information.

Index

Constants

This section is empty.

Variables

View Source
var Error = errs.Class("block")

Error is the error class for Storj block datastore.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(mount string, db *db.DB, packs *pack.Store) *Store

func (*Store) Close

func (store *Store) Close() error

func (*Store) Delete

func (store *Store) Delete(ctx context.Context, key ds.Key) (err error)

func (*Store) Get

func (store *Store) Get(ctx context.Context, key ds.Key) (data []byte, err error)

func (*Store) GetSize

func (store *Store) GetSize(ctx context.Context, key ds.Key) (size int, err error)

func (*Store) Has

func (store *Store) Has(ctx context.Context, key ds.Key) (exists bool, err error)

func (*Store) Put

func (store *Store) Put(ctx context.Context, key ds.Key, value []byte) (err error)

func (*Store) Query

func (store *Store) Query(ctx context.Context, q dsq.Query) (result dsq.Results, err error)

func (*Store) Sync

func (store *Store) Sync(ctx context.Context, prefix ds.Key) (err error)

Jump to

Keyboard shortcuts

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