Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Log levels LogLevelDebug = "debug" LogLevelWarn = "warn" LogLevelError = "error" // Default configurations DefaultLogLevel = "ERROR" DefaultVerbose = "info" DefaultRootDir = "./" // Database types DatastoreSQLite = "sqlite" // Database file DefaultDatabaseFile = "aog.db" // Directory names LogsDirectory = "logs" // File names ServerLogFile = "server.log" ConsoleLogFile = "console.log" // Time formats DefaultTimeFormat = "2006-01-02 15:04:05" // Log file expiration in days DefaultLogExpireDays = 7 // Environment variable keys EnvAOGHost = "AOG_HOST" EnvModelIdleTimeout = "AOG_MODEL_IDLE_TIMEOUT" EnvModelCleanupInterval = "AOG_MODEL_CLEANUP_INTERVAL" EnvLocalModelQueueSize = "AOG_LOCAL_MODEL_QUEUE_SIZE" EnvLocalModelQueueTimeout = "AOG_LOCAL_MODEL_QUEUE_TIMEOUT" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AOGClient ¶
func NewAOGClient ¶
func NewAOGClient() *AOGClient
type AOGEnvironment ¶
type AOGEnvironment struct {
ApiHost string // host
Datastore string // path to the datastore
DatastoreType string // type of the datastore
Verbose string // debug, info or warn
RootDir string // root directory for all assets such as config files
APIVersion string // version of this core app layer (gateway etc.)
SpecVersion string // version of the core specification this app layer supports
LogDir string // logs dir
LogHTTP string // path to the http log
LogLevel string // log level
LogFileExpireDays int // log file expiration time
ConsoleLog string // aog server console log path
ModelIdleTimeout time.Duration // model idle timeout duration
ModelCleanupInterval time.Duration // model cleanup check interval
LocalModelQueueSize int // local model queue size
LocalModelQueueTimeout time.Duration // local model queue timeout
}
var GlobalEnvironment *AOGEnvironment
func NewAOGEnvironment ¶
func NewAOGEnvironment() *AOGEnvironment
func (*AOGEnvironment) Flags ¶
func (s *AOGEnvironment) Flags() *FlagSets
Flags returns the flag sets for the AOGEnvironment.
func (*AOGEnvironment) SetSlogColor ¶
func (s *AOGEnvironment) SetSlogColor()
type FlagSets ¶
FlagSets Define a struct to hold the flag sets and their order
func (*FlagSets) AddFlagSet ¶
AddFlagSet Add a flag set to the struct and maintain the order
Click to show internal directories.
Click to hide internal directories.