plugin

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugins = []plugin.Plugin{
	&WalrusPlugin{},
}

Plugins is the symbol Kubo looks up when loading this shared object.

Functions

This section is empty.

Types

type WalrusConfig

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

WalrusConfig adapts walrusds.Config to fsrepo.DatastoreConfig.

func (*WalrusConfig) Create

func (wc *WalrusConfig) Create(path string) (repo.Datastore, error)

Create instantiates the WalrusDatastore. The repo path is ignored: durable state lives in Postgres and on Walrus, not under the repo root.

func (*WalrusConfig) DiskSpec

func (wc *WalrusConfig) DiskSpec() fsrepo.DiskSpec

DiskSpec uniquely identifies where this datastore's data lives, for Kubo's repo fingerprinting. It deliberately omits the Postgres connection string (which carries credentials) and runtime-only knobs; the publisher, aggregator and table are enough to detect a backing-store change.

type WalrusPlugin

type WalrusPlugin struct{}

WalrusPlugin registers the "walrusds" datastore type: a Walrus-backed datastore that keeps its key -> blob index in a shared Postgres database.

func (WalrusPlugin) DatastoreConfigParser

func (WalrusPlugin) DatastoreConfigParser() fsrepo.ConfigFromMap

DatastoreConfigParser parses the "walrusds" mount config from the Kubo repo config.

Required keys:

  • "publisherURL" (string; comma-separated for failover)
  • "aggregatorURL" (string; comma-separated for failover)
  • "postgresURL" (string; database/sql connection string)

Optional keys:

  • "table" (string; index table, default "walrus_index")
  • "epochs" (number; storage epochs to buy, default 1)
  • "nShards" (number; Walrus committee shard count for the encoded-size/datacap fallback, default 1000)
  • "deletable" (bool; register blobs as deletable)
  • "workers" (number; batch concurrency, default 16)
  • "maxOpenConns" (number; Postgres pool size, default 32)
  • "requestTimeoutSeconds" (number; per-attempt Walrus HTTP timeout)
  • "maxRetries" (number; retries per Walrus request)
  • "packTargetSizeBytes" (number; target packed-blob size, default 256 MiB)
  • "packMaxAgeSeconds" (number; max time a block waits in the Postgres staging buffer for a pack to fill before flushing anyway, default 300)
  • "packIdleFlushSeconds" (number; flush the staging tail once no new blocks have arrived for this long — i.e. the upload finished, default 30)
  • "packFlushIntervalSeconds" (number; staging-buffer check interval, default 5)
  • "disableQuilt" (bool; pack batches as concatenated blobs instead of quilts)
  • "blobCacheBytes" (number; LRU budget for range reads, default 1 GiB)
  • "epochDurationSeconds" (number; wall-clock length of one epoch; enables renewal)
  • "renewIntervalSeconds" (number; how often to scan for expiring blobs)
  • "renewLeadSeconds" (number; how far ahead of expiry to renew)

func (WalrusPlugin) DatastoreTypeName

func (WalrusPlugin) DatastoreTypeName() string

func (WalrusPlugin) Init

func (WalrusPlugin) Name

func (WalrusPlugin) Name() string

func (WalrusPlugin) Version

func (WalrusPlugin) Version() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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