Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( General = generalConfig{ RunMode: "", LogLevel: "", LogColour: false, } Tracker = trackerConfig{ Public: false, Listen: "0.0.0.0:34000", TLS: false, IPv6: false, IPv6Only: false, AutoRegister: false, ReaperInterval: "90s", ReaperIntervalParsed: 90 * time.Second, AnnounceInterval: "30s", AnnounceIntervalParsed: 30 * time.Second, AnnounceIntervalMinimum: "10s", AnnounceIntervalMinimumParsed: 10 * time.Second, HNRThreshold: "1d", HNRThresholdParsed: 24 * time.Hour, BatchUpdateInterval: "30s", BatchUpdateIntervalParsed: 30 * time.Second, AllowNonRoutable: true, AllowClientIP: false, MaxPeers: 50, } API = rpcConfig{ Listen: "localhost:34001", TLS: false, Key: "", } Store = StoreConfig{ Type: "memory", Host: "", Port: 0, User: "", Password: "", Database: "", Properties: "", } GeoDB = geoDBConfig{ Path: "", APIKey: "", Enabled: false, } )
Functions ¶
Types ¶
type StoreConfig ¶
type StoreConfig struct { // Type sets the backing store type to be used // memory|redis|postgres|mysql|http Type string `mapstructure:"type"` // StoreTorrentHost is the host to connect to // localhost Host string `mapstructure:"host"` // StoreTorrentPort is the port to connect to // 3306|6379|443 Port int `mapstructure:"port"` // User user to connect with // mika User string `mapstructure:"user"` // Password password to connect with // mika Password string `mapstructure:"password"` // Database is the database / schema name to open on the backing store // Redis uses numeric values 0-16 by default // mika|0 Database string `mapstructure:"database"` // Properties will append a string of query args to the DSN // Format: arg1=foo&arg2=bar Properties string `mapstructure:"properties"` }
func (StoreConfig) DSN ¶
func (c StoreConfig) DSN() string
DSN constructs a URI for database connection strings
protocol//[user]:[password]@tcp([host]:[port])[/database][?properties]
Click to show internal directories.
Click to hide internal directories.