Documentation
¶
Index ¶
- Constants
- Variables
- func Init_conf(mode string) (err error)
- func Print(service string)
- func PrintClientCfg()
- func PrintClientUsage()
- func PrintProxyUsage()
- func PrintServerUsage()
- func PrintVersionMsg()
- type AuthResource
- type Config_store
- func (this *Config_store) AddBool(target *bool, default_value bool, section string, key string, ...)
- func (this *Config_store) AddInt(target *int, default_value int, section string, key string, descr_short string, ...)
- func (this *Config_store) AddString(target *string, default_value string, section string, key string, ...)
- func (this Config_store) Parse()
- func (this Config_store) PrintHelp()
- type Config_value
- type Config_value_bool
- type Config_value_int
- type Config_value_string
Constants ¶
View Source
const ALL_APP string = "*"
View Source
const BasePriority int = 1
View Source
const CLIEN_DIR_DELAY_DONE time.Duration = 1 * time.Minute // clean done workunit dir after 1 minute
View Source
const CLIEN_DIR_DELAY_FAIL time.Duration = 30 * time.Minute //clean failed workunit dir after 30 minutes
View Source
const DB_COLL_CGS string = "ClientGroups"
View Source
const DB_COLL_JOBS string = "Jobs"
View Source
const DB_COLL_PERF string = "Perf"
View Source
const DB_COLL_USERS string = "Users"
View Source
const DEFAULT_CHUNK_SIZE int64 = 1048576 * 1
default chunk size, consistent with shock
View Source
const DEFAULT_INDEX string = "chunkrecord"
default index type used for intermediate data
View Source
const DEFAULT_PAGE_SIZE int = 25
Default page size
View Source
const DOCKER_SOCKET string = "unix:///var/run/docker.sock"
View Source
const DOCKER_WORKUNIT_PREDATA_DIR string = "/db/"
View Source
const DOCKER_WORK_DIR string = "/workdir/"
View Source
const INSTANCE_METADATA_TIMEOUT time.Duration = 5 * time.Second
View Source
const MGRAST_API string = "http://api.metagenomics.anl.gov"
View Source
const SHOCK_DOCKER_IMAGE_REPOSITORY string = "http://shock.metagenomics.anl.gov"
View Source
const SHOCK_TIMEOUT time.Duration = 30 * time.Second
Shock_TimeOut
View Source
const STDERR_FILENAME string = "awe_stderr.txt"
View Source
const STDOUT_FILENAME string = "awe_stdout.txt"
View Source
const VERSION string = "0.9.18"
View Source
const WORKNOTES_FILENAME string = "awe_worknotes.txt"
Variables ¶
View Source
var ( SHOW_VERSION bool TITLE string //Reload RELOAD string RECOVER bool DEV_MODE bool // Config File CONFIG_FILE string // AWE server port SITE_PORT int API_PORT int // AWE server external address SITE_URL string API_URL string // AWE proxy port P_SITE_PORT int P_API_PORT int // SSL SSL_ENABLED bool SSL_KEY_FILE string SSL_CERT_FILE string // Anonymous-Access-Control ANON_WRITE bool ANON_READ bool ANON_DELETE bool ANON_CG_WRITE bool ANON_CG_READ bool ANON_CG_DELETE bool // Auth BASIC_AUTH bool GLOBUS_OAUTH bool MGRAST_OAUTH bool GLOBUS_TOKEN_URL string GLOBUS_PROFILE_URL string MGRAST_OAUTH_URL string CLIENT_AUTH_REQ bool CLIENT_GROUP_TOKEN string // Admin ADMIN_EMAIL string //SECRET_KEY string // not used anymore ADMIN_USERS_VAR string // Directories DATA_PATH string SITE_PATH string LOGS_PATH string AWF_PATH string PID_FILE_PATH string // Mongodb MONGODB_HOST string MONGODB_DATABASE string MONGODB_USER string MONGODB_PASSWD string DEBUG_LEVEL int // Versions, used to track changes in data structures VERSIONS = make(map[string]int) //[server] options PERF_LOG_WORKUNIT bool MAX_WORK_FAILURE int MAX_CLIENT_FAILURE int //big data threshold //BIG_DATA_SIZE int64 = 1048576 * 1024 GOMAXPROCS int //[client] //TOTAL_WORKER = 1 WORK_PATH string APP_PATH string SUPPORTED_APPS string PRE_WORK_SCRIPT string PRE_WORK_SCRIPT_ARGS_STRING string PRE_WORK_SCRIPT_ARGS = []string{} SERVER_URL string OPENSTACK_METADATA_URL string CLIENT_NAME string CLIENT_GROUP string CLIENT_DOMAIN string WORKER_OVERLAP bool PRINT_APP_MSG bool AUTO_CLEAN_DIR bool //[Docker] USE_DOCKER string DOCKER_BINARY string USE_APP_DEFS string CGROUP_MEMORY_DOCKER_DIR string MEM_CHECK_INTERVAL = 0 * time.Second //in milliseconds e.g. use 10 * time.Second MEM_CHECK_INTERVAL_SECONDS int APP_REGISTRY_URL string //KB_AUTH_TOKEN = "KB_AUTH_TOKEN" CACHE_ENABLED bool PRINT_HELP bool SHOW_HELP bool // simple usage SHOW_GIT_COMMIT_HASH bool Admin_Users = make(map[string]bool) AUTH_RESOURCES = make(map[string]AuthResource) AUTH_DEFAULT string FAKE_VAR = false // ignore this )
set defaults in function "getConfiguration" below !!!!!
View Source
var GIT_COMMIT_HASH string // use -ldflags "-X github.com/MG-RAST/AWE/lib/conf.GIT_COMMIT_HASH <value>"
Functions ¶
func PrintClientCfg ¶
func PrintClientCfg()
func PrintClientUsage ¶
func PrintClientUsage()
func PrintProxyUsage ¶
func PrintProxyUsage()
func PrintServerUsage ¶
func PrintServerUsage()
func PrintVersionMsg ¶
func PrintVersionMsg()
Types ¶
type AuthResource ¶ added in v0.9.16
type Config_store ¶ added in v0.9.13
type Config_store struct { Store []*Config_value Fs *flag.FlagSet Con *config.Config }
func NewCS ¶ added in v0.9.13
func NewCS(c *config.Config) *Config_store
func (Config_store) Parse ¶ added in v0.9.13
func (this Config_store) Parse()
func (Config_store) PrintHelp ¶ added in v0.9.13
func (this Config_store) PrintHelp()
type Config_value ¶ added in v0.9.13
type Config_value struct { Conf_type string Conf_str *Config_value_string Conf_int *Config_value_int Conf_bool *Config_value_bool }
type Config_value_bool ¶ added in v0.9.13
type Config_value_int ¶ added in v0.9.13
Click to show internal directories.
Click to hide internal directories.