config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Autopilot

type Autopilot struct {
	Enabled                        bool          `yaml:"enabled,omitempty"`
	ID                             string        `yaml:"id,omitempty"`
	Heartbeat                      time.Duration `yaml:"heartbeat,omitempty"`
	MigrationHealthCutoff          float64       `yaml:"migrationHealthCutoff,omitempty"`
	RevisionBroadcastInterval      time.Duration `yaml:"revisionBroadcastInterval,omitempty"`
	RevisionSubmissionBuffer       uint64        `yaml:"revisionSubmissionBuffer,omitempty"`
	ScannerInterval                time.Duration `yaml:"scannerInterval,omitempty"`
	ScannerBatchSize               uint64        `yaml:"scannerBatchSize,omitempty"`
	ScannerNumThreads              uint64        `yaml:"scannerNumThreads,omitempty"`
	MigratorParallelSlabsPerWorker uint64        `yaml:"migratorParallelSlabsPerWorker,omitempty"`
}

Autopilot contains the configuration for an autopilot.

type Bus

type Bus struct {
	AnnouncementMaxAgeHours       uint64        `yaml:"announcementMaxAgeHours,omitempty"`
	Bootstrap                     bool          `yaml:"bootstrap,omitempty"`
	GatewayAddr                   string        `yaml:"gatewayAddr,omitempty"`
	RemoteAddr                    string        `yaml:"remoteAddr,omitempty"`
	RemotePassword                string        `yaml:"remotePassword,omitempty"`
	UsedUTXOExpiry                time.Duration `yaml:"usedUtxoExpiry,omitempty"`
	SlabBufferCompletionThreshold int64         `yaml:"slabBufferCompleionThreshold,omitempty"`
	PersistInterval               time.Duration `yaml:"persistInterval,omitempty"` // deprecated
}

Bus contains the configuration for a bus.

type Config

type Config struct {
	Seed          string `yaml:"seed,omitempty"`
	Directory     string `yaml:"directory,omitempty"`
	AutoOpenWebUI bool   `yaml:"autoOpenWebUI,omitempty"`
	Network       string `yaml:"network,omitempty"`

	ShutdownTimeout time.Duration `yaml:"shutdownTimeout,omitempty"`

	Log Log `yaml:"log,omitempty"`

	HTTP HTTP `yaml:"http,omitempty"`

	Autopilot Autopilot `yaml:"autopilot,omitempty"`
	Bus       Bus       `yaml:"bus,omitempty"`
	Worker    Worker    `yaml:"worker,omitempty"`
	S3        S3        `yaml:"s3,omitempty"`

	Database Database `yaml:"database,omitempty"`
}

Config contains the configuration for a renterd node

type Database

type Database struct {
	Log DatabaseLog `yaml:"log,omitempty"` // deprecated. included for compatibility.
	// optional fields depending on backend
	MySQL MySQL `yaml:"mysql,omitempty"`
}

type DatabaseLog

type DatabaseLog struct {
	Enabled                   bool          `yaml:"enabled,omitempty"`
	Level                     string        `yaml:"level,omitempty"`
	IgnoreRecordNotFoundError bool          `yaml:"ignoreRecordNotFoundError,omitempty"`
	SlowThreshold             time.Duration `yaml:"slowThreshold,omitempty"`
}

type HTTP

type HTTP struct {
	Address  string `yaml:"address,omitempty"`
	Password string `yaml:"password,omitempty"`
}

HTTP contains the configuration for the HTTP server.

type Log

type Log struct {
	Path     string      `yaml:"path,omitempty"`  // deprecated. included for compatibility.
	Level    string      `yaml:"level,omitempty"` // global log level
	StdOut   StdOut      `yaml:"stdout,omitempty"`
	File     LogFile     `yaml:"file,omitempty"`
	Database DatabaseLog `yaml:"database,omitempty"`
}

type LogFile added in v1.0.7

type LogFile struct {
	Enabled bool   `yaml:"enabled,omitempty"`
	Level   string `yaml:"level,omitempty"` // override the file log level
	Format  string `yaml:"format,omitempty"`
	// Path is the path of the log file.
	Path string `yaml:"path,omitempty"`
}

LogFile configures the file output of the logger.

type MySQL

type MySQL struct {
	URI             string `yaml:"uri,omitempty"`
	User            string `yaml:"user,omitempty"`
	Password        string `yaml:"password,omitempty"`
	Database        string `yaml:"database,omitempty"`
	MetricsDatabase string `yaml:"metricsDatabase,omitempty"`
}

MySQL contains the configuration for a MySQL database.

func MySQLConfigFromEnv added in v1.0.8

func MySQLConfigFromEnv() MySQL

type RemoteWorker

type RemoteWorker struct {
	Address  string `yaml:"address,omitempty"`
	Password string `yaml:"password,omitempty"`
}

type S3 added in v0.6.0

type S3 struct {
	Address           string            `yaml:"address,omitempty"`
	DisableAuth       bool              `yaml:"disableAuth,omitempty"`
	Enabled           bool              `yaml:"enabled,omitempty"`
	KeypairsV4        map[string]string `yaml:"keypairsV4,omitempty"` // deprecated. included for compatibility.
	HostBucketEnabled bool              `yaml:"hostBucketEnabled,omitempty"`
	HostBucketBases   []string          `yaml:"hostBucketBases,omitempty"`
}

type SQLite added in v1.0.8

type SQLite struct {
	Database        string `yaml:"database,omitempty"`
	MetricsDatabase string `yaml:"metricsDatabase,omitempty"`
}

SQLite contains the configuration for a SQLite database.

type StdOut added in v1.0.7

type StdOut struct {
	Level      string `yaml:"level,omitempty"` // override the stdout log level
	Enabled    bool   `yaml:"enabled,omitempty"`
	Format     string `yaml:"format,omitempty"`
	EnableANSI bool   `yaml:"enableANSI,omitempty"` //nolint:tagliatelle
}

StdOut configures the standard output of the logger.

type Worker

type Worker struct {
	Enabled                       bool           `yaml:"enabled,omitempty"`
	ID                            string         `yaml:"id,omitempty"`
	Remotes                       []RemoteWorker `yaml:"remotes,omitempty"`
	AccountsRefillInterval        time.Duration  `yaml:"accountsRefillInterval,omitempty"`
	AllowPrivateIPs               bool           `yaml:"allowPrivateIPs,omitempty"`
	BusFlushInterval              time.Duration  `yaml:"busFlushInterval,omitempty"`
	ContractLockTimeout           time.Duration  `yaml:"contractLockTimeout,omitempty"`
	DownloadOverdriveTimeout      time.Duration  `yaml:"downloadOverdriveTimeout,omitempty"`
	UploadOverdriveTimeout        time.Duration  `yaml:"uploadOverdriveTimeout,omitempty"`
	DownloadMaxOverdrive          uint64         `yaml:"downloadMaxOverdrive,omitempty"`
	DownloadMaxMemory             uint64         `yaml:"downloadMaxMemory,omitempty"`
	UploadMaxMemory               uint64         `yaml:"uploadMaxMemory,omitempty"`
	UploadMaxOverdrive            uint64         `yaml:"uploadMaxOverdrive,omitempty"`
	AllowUnauthenticatedDownloads bool           `yaml:"allowUnauthenticatedDownloads,omitempty"`
	ExternalAddress               string         `yaml:"externalAddress,omitempty"`
}

Worker contains the configuration for a worker.

Jump to

Keyboard shortcuts

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