incfs

package module
v0.0.0-...-edaca3c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package incfs contains SOP implementations that uses Redis for caching, Cassandra & File System for backend data storage. The Objects Registry is stored in Cassandra and the B-Tree Nodes & their items' value data blobs are stored in the File System.

Package incfs provides SOP implementations that use Redis for caching and the filesystem for backend storage. It exposes package-level initialization helpers and B-Tree wrappers that enable filesystem replication.

Package incfs contains SOP implementations that uses Redis for caching, Cassandra & File System for backend data storage. The Objects Registry is stored in Cassandra and the B-Tree Nodes & their items' value data blobs are stored in the File System.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(cassandraConfig cas.Config, redisConfig redis.Options) error

Initialize assigns the configs & opens connections to different sub-systems used by this package. Example, connection to Cassandra, Redis.

func IsInitialized

func IsInitialized() bool

IsInitialized returns true if components required were initialized, false otherwise.

func NewBtree

func NewBtree[TK btree.Ordered, TV any](ctx context.Context, si sop.StoreOptions, t sop.Transaction, comparer btree.ComparerFunc[TK]) (btree.BtreeInterface[TK, TV], error)

NewBtree creates a new B-Tree instance with data persisted to backend storage upon commit. If B-Tree(name) is not found in the backend, a new one will be created. Otherwise, the existing one will be opened and the parameters checked if matching. If you know that it exists, then it is more convenient and more readable to call the OpenBtree function.

func NewBtreeWithReplication

func NewBtreeWithReplication[TK btree.Ordered, TV any](ctx context.Context, si sop.StoreOptions, t sop.Transaction, comparer btree.ComparerFunc[TK]) (btree.BtreeInterface[TK, TV], error)

NewBtreeWithReplication is geared for enforcing the Blobs base folder path to generate good folder path that works with Erasure Coding I/O.

func NewStreamingDataStore

func NewStreamingDataStore[TK btree.Ordered](ctx context.Context, so sop.StoreOptions, trans sop.Transaction, comparer btree.ComparerFunc[sd.StreamingDataKey[TK]]) (*sd.StreamingDataStore[TK], error)

NewStreamingDataStore is a convenience function to easily instantiate a streaming data store that stores blobs in File System.

func NewTransaction

func NewTransaction(ctx context.Context, config sop.TransactionOptions) (sop.Transaction, error)

NewTransaction is a convenience function to create an end-user facing transaction object that wraps the two-phase commit transaction.

func NewTransactionWithReplication

func NewTransactionWithReplication(ctx context.Context, config sop.TransactionOptions) (sop.Transaction, error)

NewTransactionWithReplication creates a transaction that supports Erasure Coding file IO.

func OpenBtree

func OpenBtree[TK btree.Ordered, TV any](ctx context.Context, name string, t sop.Transaction, comparer btree.ComparerFunc[TK]) (btree.BtreeInterface[TK, TV], error)

OpenBtree opens an existing B-Tree instance & prepares it for use in a transaction.

func OpenStreamingDataStore

func OpenStreamingDataStore[TK btree.Ordered](ctx context.Context, name string, trans sop.Transaction, comparer btree.ComparerFunc[sd.StreamingDataKey[TK]]) (*sd.StreamingDataStore[TK], error)

OpenStreamingDataStore opens an existing data store for use in "streaming data".

func RemoveBtree

func RemoveBtree(ctx context.Context, name string, cacheType sop.L2CacheType) error

RemoveBtree removes B-Tree with a given name from the backend storage. This involves dropping tables (registry & node blob) that are permanent action and thus, 'can't get rolled back.

Use with care and only when you are sure to delete the tables.

func Shutdown

func Shutdown()

Shutdown closes all connections used in this package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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