config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventStorage

func CreateEventStorage(eventURL, beefURL, pubsubURL string) (storage.EventDataStorage, error)

CreateEventStorage creates a fully configured event storage with BEEF storage and optional PubSub.

Parameters:

  • eventURL: Event storage connection string (e.g., "redis://localhost:6379", "./overlay.db")
  • beefURL: BEEF storage connection string(s) (can be hierarchical)
  • pubsubURL: PubSub connection string (e.g., "redis://localhost:6379", "channels://")

The beefURL parameter can be:

  • A single connection string: "redis://localhost:6379"
  • A JSON array of connection strings: `["lru://100mb", "redis://localhost:6379", "junglebus://"]`
  • A comma-separated list: "lru://100mb,redis://localhost:6379,junglebus://"

Note: If your connection strings contain commas, use the JSON array format.

Example configurations:

  1. All Redis: CreateEventStorage("redis://localhost:6379", "redis://localhost:6379", "redis://localhost:6379")

  2. MongoDB for events, hierarchical BEEF storage, Redis pubsub: CreateEventStorage("mongodb://localhost:27017/bsv21", `["lru://1gb", "redis://localhost:6379", "junglebus://"]`, "redis://localhost:6379")

  3. SQLite for events, filesystem for BEEF, channel pubsub: CreateEventStorage("./overlay.db", "./beef_storage/", "channels://")

  4. Default no-dependency setup: CreateEventStorage("", "", "") // Uses ~/.1sat/overlay.db, ~/.1sat/beef/, channels://

Types

This section is empty.

Jump to

Keyboard shortcuts

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