Documentation ¶
Overview ¶
Package config implements the configuration for a BitTorrent tracker
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `json:"addr"` PubAddr string `json:"pub_addr"` Cache DataStore `json:"cache"` Storage DataStore `json:"storage"` Private bool `json:"private"` Freeleech bool `json:"freeleech"` Slots bool `json:"slots"` Announce Duration `json:"announce"` MinAnnounce Duration `json:"min_announce"` ReadTimeout Duration `json:"read_timeout"` DefaultNumWant int `json:"default_num_want"` TxRetries int `json:"tx_retries"` }
Config represents a configuration for a server.Server.
type DataStore ¶
type DataStore struct { Driver string `json:"driver"` Network string `json:"network` Host string `json:"host"` Port string `json:"port"` Username string `json:"user"` Password string `json:"pass"` Schema string `json:"schema,omitempty"` Encoding string `json:"encoding,omitempty"` Prefix string `json:"prefix,omitempty"` MaxIdleConns int `json:"max_idle_conns,omitempty"` IdleTimeout *Duration `json:"idle_timeout,omitempty"` }
DataStore represents the configuration used to connect to a data store.
Click to show internal directories.
Click to hide internal directories.