config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Address  string `yaml:"address"`
	Password string `yaml:"password"`
}

API contains the listen address of the API server

type BlockStore

type BlockStore struct {
	// MaxConcurrent is the maximum number of concurrent block fetches.
	MaxConcurrent int `yaml:"maxConcurrent"`
	// CacheSize is the maximum number of blocks to cache in memory.
	CacheSize int `yaml:"cacheSize"`
}

BlockStore configures the blockstore.

type Config

type Config struct {
	Renterd    Renterd    `yaml:"renterd"`
	BlockStore BlockStore `yaml:"blockstore"`
	IPFS       IPFS       `yaml:"ipfs"`
	API        API        `yaml:"api"`
	Log        Log        `yaml:"log"`
}

Config contains the configuration for fsd

type HTTPGateway

type HTTPGateway struct {
	ListenAddress     string      `yaml:"listenAddress"`
	RedirectPathStyle bool        `yaml:"redirectPathStyle"`
	Fetch             RemoteFetch `yaml:"fetch"`
}

HTTPGateway contains the configuration for the IPFS HTTP gateway

type IPFS

type IPFS struct {
	PrivateKey        string       `yaml:"privateKey"`
	ListenAddresses   []string     `yaml:"listenAddresses"`
	AnnounceAddresses []string     `yaml:"announceAddresses"`
	Peers             []IPFSPeer   `yaml:"peers"`
	Gateway           HTTPGateway  `yaml:"gateway"`
	Provider          IPFSProvider `yaml:"provider"`
}

IPFS contains the configuration for the IPFS node

type IPFSPeer

type IPFSPeer struct {
	ID        peer.ID  `yaml:"id"`
	Addresses []string `yaml:"addresses"`
}

IPFSPeer contains the configuration for additional IPFS peers

type IPFSProvider

type IPFSProvider struct {
	BatchSize int           `yaml:"batchSize"`
	Interval  time.Duration `yaml:"interval"`
	Timeout   time.Duration `yaml:"timeout"`
}

IPFSProvider contains the configuration for the IPFS provider

type Log

type Log struct {
	Level string `yaml:"level"`
}

Log contains the log settings

type RemoteFetch

type RemoteFetch struct {
	// Enabled indicates whether remote IPFS block fetching is enabled.
	// If false, all served IPFS blocks must be pinned locally.
	Enabled bool `yaml:"enabled"`
	// Allowlist contains the CIDs of blocks that are allowed to be
	// fetched remotely. If empty, all blocks are allowed.
	AllowList []cid.Cid `yaml:"allowlist"`
}

RemoteFetch contains settings for enabling/disabling remote IPFS block fetching.

type Renterd

type Renterd struct {
	WorkerAddress  string `yaml:"workerAddress"`
	WorkerPassword string `yaml:"workerPassword"`
	BusAddress     string `yaml:"busAddress"`
	BusPassword    string `yaml:"busPassword"`
	Bucket         string `yaml:"bucket"`
}

Renterd contains the address, password, and bucket on the renterd worker

Jump to

Keyboard shortcuts

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