config

package
v0.0.0-...-63c195f Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBootstrapAddresses = []string{}
View Source
var DefaultPinningSeconds = 30

Functions

func ToMap

func ToMap(cfg *Config) (map[string]interface{}, error)

Types

type CacheConfig

type CacheConfig struct {
	BackupSeconds int
}

type Config

type Config struct {
	MaxAttempts int64
	Pinning     Pinning
	Hash        CacheConfig
	Address     CacheConfig
	Repo        string
}

func FromMap

func FromMap(v map[string]interface{}) (*Config, error)

func InitConfig

func InitConfig(repoPath string) (*Config, error)

func (*Config) Clone

func (c *Config) Clone() (*Config, error)

Clone copies the config. Use when updating.

type Pinning

type Pinning struct {
	PerSeconds int
}

type Service

type Service struct {
	Address string
}

Jump to

Keyboard shortcuts

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