config

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: MIT Imports: 18 Imported by: 0

README

#Chainquery Configuration

The Chainquery application comes with a watched configuration that when updated will be updated live in the application. Please see the defaultconfigurationfor details. More elaborate documentation is on the way.

The order of precedence for where chainquery looks for a configuration file are --configpath flag, $HOME/, . working directory, and last ./config/default/ for running from src.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIHostAndPort

func GetAPIHostAndPort() string

GetAPIHostAndPort gets the host and port string the api server should bind and listen too.

func GetAPIMySQLDSN

func GetAPIMySQLDSN() string

GetAPIMySQLDSN gets the API MySql DSN from viper. This intended to be another account with limited privileges for the apis to prevent potential abuse. It should have read only privileges at a minimum.

func GetAutoUpdateCommand added in v0.1.0

func GetAutoUpdateCommand() string

GetAutoUpdateCommand returns the command that should be executed to trigger a self update of the software.

func GetDaemonDelay

func GetDaemonDelay() time.Duration

GetDaemonDelay gets the deamon delay from the viper configuration

func GetDaemonMode

func GetDaemonMode() int

GetDaemonMode gets the daemon mode from the viper configuration. See default toml file for different modes.

func GetDebugMode

func GetDebugMode() bool

GetDebugMode returns true/false if the app is in debug mode.

func GetDebugQueryMode added in v1.2.0

func GetDebugQueryMode() bool

GetDebugQueryMode turns on SQLBoiler query output

func GetDefaultClientTimeout

func GetDefaultClientTimeout() time.Duration

GetDefaultClientTimeout gets the default client timeout.

func GetLBRYcrdURL

func GetLBRYcrdURL() string

GetLBRYcrdURL gets the LBRYcrd URL from viper configuration

func GetMySQLDSN

func GetMySQLDSN() string

GetMySQLDSN gets the MySql DSN from viper configuration

func GetProcessingDelay

func GetProcessingDelay() time.Duration

GetProcessingDelay gets the processing delay from the viper configuration.

func InitSlack

func InitSlack()

InitSlack initializes the slack connection and posts info level or greater to the set channel.

func InitializeConfiguration

func InitializeConfiguration()

InitializeConfiguration is the main entry point from outside the package. This initializes the configuration and watcher.

Types

This section is empty.

Jump to

Keyboard shortcuts

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