config

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureExists

func EnsureExists(path string) error

Types

type Conf

type Conf struct {
	config.Common
	Client     config.Client
	Chainstore config.Chainstore
	Storage    StorageConf
}

Conf defines the daemon config. It should be compatible with Lotus config.

func DefaultConf

func DefaultConf() *Conf

func FromFile

func FromFile(path string) (*Conf, error)

FromFile loads config from a specified file. If file does not exist or is empty defaults are assumed.

func FromReader

func FromReader(reader io.Reader, def *Conf) (*Conf, error)

FromReader loads config from a reader instance.

func SampleConf

func SampleConf() *Conf

SampleConf is the example configuration that is written when lily is first started. All entries will be commented out.

type FileStorageConf

type FileStorageConf struct {
	Format      string
	Path        string
	OmitHeader  bool   // when true, don't write column headers to new output files
	FilePattern string // pattern to use for filenames written in the path specified
}

type PgStorageConf

type PgStorageConf struct {
	URLEnv          string // name of an environment variable that contains the database URL
	URL             string // URL used to connect to postgresql if URLEnv is not set
	ApplicationName string
	SchemaName      string
	PoolSize        int
	AllowUpsert     bool
}

type StorageConf

type StorageConf struct {
	Postgresql map[string]PgStorageConf
	File       map[string]FileStorageConf
}

Jump to

Keyboard shortcuts

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