Documentation ¶
Index ¶
- func AccountsEnabled() bool
- func GetAddress() string
- func GetBlobDownloadTimeout() int64
- func GetBlobFilesDir() string
- func GetInternalAPIHost() string
- func GetLbrynet() string
- func GetProjectURL() string
- func GetPublishSourceDir() string
- func GetReflectorAddress() string
- func GetSentryDSN() string
- func IsProduction() bool
- func MetricsAddress() string
- func MetricsPath() string
- func Override(key string, value interface{})
- func ProjectRoot() string
- func RestoreOverridden()
- func ShouldLogResponses() bool
- type ConfigWrapper
- type DBConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountsEnabled ¶ added in v0.7.0
func AccountsEnabled() bool
AccountsEnabled enables or disables accounts subsystem
func GetAddress ¶ added in v0.6.3
func GetAddress() string
GetAddress determines address to bind http API server to
func GetBlobDownloadTimeout ¶ added in v0.10.0
func GetBlobDownloadTimeout() int64
GetBlobDownloadTimeout returns timeout for blob HTTP client in seconds.
func GetBlobFilesDir ¶ added in v0.8.2
func GetBlobFilesDir() string
GetBlobFilesDir returns directory where SDK instance stores blob files.
func GetInternalAPIHost ¶ added in v0.6.3
func GetInternalAPIHost() string
GetInternalAPIHost returns the address of internal-api server
func GetLbrynet ¶ added in v0.6.3
func GetLbrynet() string
GetLbrynet returns the address of SDK server to use
func GetProjectURL ¶ added in v0.8.0
func GetProjectURL() string
GetProjectURL returns publicly accessible URL for the project
func GetPublishSourceDir ¶ added in v0.8.2
func GetPublishSourceDir() string
GetPublishSourceDir returns directory for storing published files before they're uploaded to lbrynet. The directory needs to be accessed by the running SDK instance.
func GetReflectorAddress ¶ added in v0.8.2
func GetReflectorAddress() string
GetReflectorAddress returns reflector address in the format of host:port.
func GetSentryDSN ¶ added in v0.6.3
func GetSentryDSN() string
GetSentryDSN returns sentry.io service DSN
func IsProduction ¶
func IsProduction() bool
IsProduction is true if we are running in a production environment
func MetricsAddress ¶ added in v0.7.0
func MetricsAddress() string
MetricsAddress determines address to bind metrics HTTP server to
func MetricsPath ¶ added in v0.7.0
func MetricsPath() string
MetricsPath determines the path to bind metrics HTTP server to
func Override ¶
func Override(key string, value interface{})
Override sets a setting key value to whatever you supply. Useful in tests:
config.Override("Lbrynet", "http://www.google.com:8080/api/proxy") defer config.RestoreOverridden() ...
func ProjectRoot ¶
func ProjectRoot() string
func RestoreOverridden ¶
func RestoreOverridden()
RestoreOverridden restores original v values overridden by Override
func ShouldLogResponses ¶ added in v0.10.0
func ShouldLogResponses() bool
AccountsEnabled enables or disables accounts subsystem
Types ¶
type ConfigWrapper ¶ added in v0.6.4
type ConfigWrapper struct { Viper *viper.Viper ReadDone bool // contains filtered or unexported fields }
var Config *ConfigWrapper
func GetConfig ¶ added in v0.6.4
func GetConfig() *ConfigWrapper
func NewConfig ¶ added in v0.6.4
func NewConfig() *ConfigWrapper
func (*ConfigWrapper) Init ¶ added in v0.6.4
func (c *ConfigWrapper) Init()
func (*ConfigWrapper) Read ¶ added in v0.6.4
func (c *ConfigWrapper) Read()