Documentation
¶
Index ¶
- type GhostFSClient
- func (c *GhostFSClient) ClearCache()
- func (c *GhostFSClient) Close() error
- func (c *GhostFSClient) GetCacheStats() map[string]int
- func (c *GhostFSClient) GetRoot(tableID string) (dbTypes.Node, error)
- func (c *GhostFSClient) GetWriteQueueConfig(tableName string) (batchSize int, flushInterval time.Duration, err error)
- func (c *GhostFSClient) ListItems(tableID, folderID string, foldersOnly bool) ([]dbTypes.Node, error)
- func (c *GhostFSClient) ListTables() ([]dbTypes.TableInfo, error)
- func (c *GhostFSClient) SetAllWriteQueueConfigs(batchSize int, flushInterval time.Duration) error
- func (c *GhostFSClient) SetWriteQueueBatchSize(tableName string, batchSize int) error
- func (c *GhostFSClient) SetWriteQueueConfig(tableName string, batchSize int, flushInterval time.Duration) error
- func (c *GhostFSClient) SetWriteQueueFlushInterval(tableName string, flushInterval time.Duration) error
- type SDKConfig
- type SDKDatabaseConfig
- type SDKTablesConfig
- type WriteQueueConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GhostFSClient ¶
type GhostFSClient struct {
// contains filtered or unexported fields
}
GhostFSClient provides a clean SDK interface for ByteWave to use
func NewGhostFSClient ¶
func NewGhostFSClient(configPath string) (*GhostFSClient, error)
NewGhostFSClient creates a new SDK client with config file It will look for config.json in the current directory and parent directories
func NewGhostFSClientWithDB ¶
func NewGhostFSClientWithDB(dbPath string, config SDKTablesConfig, writeQueueConfig WriteQueueConfig) (*GhostFSClient, error)
NewGhostFSClientWithDB creates a new SDK client with a specific database file
func (*GhostFSClient) ClearCache ¶
func (c *GhostFSClient) ClearCache()
ClearCache clears the in-memory cache
func (*GhostFSClient) Close ¶
func (c *GhostFSClient) Close() error
Close closes the database connection
func (*GhostFSClient) GetCacheStats ¶
func (c *GhostFSClient) GetCacheStats() map[string]int
GetCacheStats returns cache statistics
func (*GhostFSClient) GetRoot ¶
func (c *GhostFSClient) GetRoot(tableID string) (dbTypes.Node, error)
GetRoot gets the root node for a table
func (*GhostFSClient) GetWriteQueueConfig ¶ added in v0.1.6
func (c *GhostFSClient) GetWriteQueueConfig(tableName string) (batchSize int, flushInterval time.Duration, err error)
GetWriteQueueConfig returns the current batch size and flush interval for a specific table's write queue
func (*GhostFSClient) ListItems ¶
func (c *GhostFSClient) ListItems(tableID, folderID string, foldersOnly bool) ([]dbTypes.Node, error)
ListItems lists all items (files and folders) in a folder
func (*GhostFSClient) ListTables ¶
func (c *GhostFSClient) ListTables() ([]dbTypes.TableInfo, error)
ListTables lists all available tables
func (*GhostFSClient) SetAllWriteQueueConfigs ¶ added in v0.1.6
func (c *GhostFSClient) SetAllWriteQueueConfigs(batchSize int, flushInterval time.Duration) error
SetAllWriteQueueConfigs updates write queue settings for all tables
func (*GhostFSClient) SetWriteQueueBatchSize ¶ added in v0.1.6
func (c *GhostFSClient) SetWriteQueueBatchSize(tableName string, batchSize int) error
SetWriteQueueBatchSize updates the batch size for a specific table's write queue
func (*GhostFSClient) SetWriteQueueConfig ¶ added in v0.1.6
func (c *GhostFSClient) SetWriteQueueConfig(tableName string, batchSize int, flushInterval time.Duration) error
SetWriteQueueConfig updates both batch size and flush interval for a specific table's write queue
func (*GhostFSClient) SetWriteQueueFlushInterval ¶ added in v0.1.6
func (c *GhostFSClient) SetWriteQueueFlushInterval(tableName string, flushInterval time.Duration) error
SetWriteQueueFlushInterval updates the flush interval for a specific table's write queue
type SDKConfig ¶
type SDKConfig struct {
Database SDKDatabaseConfig `json:"database"`
WriteQueue WriteQueueConfig `json:"write_queue"`
}
SDKConfig represents the configuration for the SDK
type SDKDatabaseConfig ¶
type SDKDatabaseConfig struct {
Path string `json:"path,omitempty"` // Optional: path to database file
GenerateIfNotExists bool `json:"generate_if_not_exists"` // Whether to generate database if it doesn't exist
Tables SDKTablesConfig `json:"tables"`
}
SDKDatabaseConfig represents the database configuration for the SDK
type SDKTablesConfig ¶
type SDKTablesConfig struct {
Primary tables.PrimaryTableConfig `json:"primary"`
Secondary map[string]tables.SecondaryTableConfig `json:"secondary,omitempty"`
}
SDKTablesConfig represents the tables configuration for the SDK
type WriteQueueConfig ¶ added in v0.1.6
type WriteQueueConfig struct {
BatchSize int `json:"batch_size"`
FlushIntervalMs int `json:"flush_interval_ms"`
}
WriteQueueConfig represents configuration for write queues