Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Prefix is used to determine the XDG config directory.
Prefix = "antares"
)
Variables ¶
View Source
var DefaultConfig = Config{ Host: "0.0.0.0", Port: 2002, Prometheus: struct { Host string Port int }{ Host: "0.0.0.0", Port: 2004, }, Database: struct { DryRun bool Host string Port int Name string Password string User string SSLMode string }{ DryRun: false, Host: "0.0.0.0", Port: 5432, Name: "antares", Password: "password", User: "antares", SSLMode: "disable", }, PrivKeyRaw: nil, PinningServices: []PinningService{}, Gateways: []Gateway{}, UploadServices: []UploadService{}, }
DefaultConfig the default configuration.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The version string of nebula Version string `json:"-"` // The path where the configuration file is located. Path string `json:"-"` // Whether the configuration file existed when nebula was started Existed bool `json:"-"` // Determines the IPv4 network interface Antares should bind to Host string // Determines the port at which Antares will be reachable. Port int // TODO ListenAddrTCP ma.Multiaddr `json:"-"` // TODO ListenAddrQUIC ma.Multiaddr `json:"-"` // Prometheus contains the prometheus configuration Prometheus struct { // Determines the prometheus network interface to bind to. Host string // Determines the port where prometheus serves the metrics endpoint. Port int } // Database contains the database connection configuration Database struct { // Whether a database connection should be established or not DryRun bool // Determines the host address of the database. Host string // Determines the port of the database. Port int // Determines the name of the database that should be used. Name string // Determines the password with which we access the database. Password string // Determines the username with which we access the database. User string // Postgres SSL mode (should be one supported in https://www.postgresql.org/docs/current/libpq-ssl.html) SSLMode string } // TODO PrivKeyRaw []byte // TODO PrivKey crypto.PrivKey `json:"-"` // TODO PinningServices []PinningService // TODO Gateways []Gateway UploadServices []UploadService }
Config contains general user configuration.
func Init ¶
Init takes the command line argument and tries to read the config file from that directory.
type PinningService ¶
type UploadService ¶
Click to show internal directories.
Click to hide internal directories.