Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_APP_NAME = "kitsune" // The default name of the application. DEFAULT_VERSION = "local" // The default version, typically used for local or development builds. )
Constants for default application name and version.
Variables ¶
View Source
var ( BUILD_COMMIT string // The commit hash of the build, useful for tracking specific builds in version control. BUILD_VERSION string = DEFAULT_VERSION // The version of the build, defaults to the value in DEFAULT_VERSION. BUILD_APP_NAME string = DEFAULT_APP_NAME // The name of the build, defaults to the value in DEFAULT_APP_NAME. BUILD_ARCH string // The architecture for which the build was compiled (e.g., amd64, arm). BUILD_OS string // The operating system for which the build was compiled (e.g., linux, windows). BUILD_SERVICE_SUPERVISOR string // Build identifier for the supervisor service. BUILD_SERVICE_GATEWAY string // Build identifier for the gateway service. BUILD_SERVICE_CACHE string // Build identifier for the cache service. // BUILD_SERVICES is a map associating service names with their respective build identifiers. // This map is useful for dynamically referencing build information for different services. BUILD_SERVICES = map[string]string{ "supervisor": BUILD_SERVICE_SUPERVISOR, "gateway": BUILD_SERVICE_GATEWAY, "cache": BUILD_SERVICE_CACHE, } )
Global variables for build information.
View Source
var ( // DEFAULT_RETRY_INTERVAL defines the default duration to wait between retries. // This interval is used in operations where an action is attempted repeatedly after failure. DEFAULT_RETRY_INTERVAL time.Duration = 1 // DEFAULT_RETRY_MAX defines the default maximum duration for retrying operations. // This duration limits the total time spent in retry loops. DEFAULT_RETRY_MAX time.Duration = 3 // DEFAULT_TIMEOUT defines the default timeout duration for operations. // This duration is used as a standard limit for operations to complete, beyond which // they may be aborted or considered failed. DEFAULT_TIMEOUT time.Duration = 15 // DEFAULT_CACHE defines the default duration for caching elements. // This duration specifies how long certain data or objects should be kept in cache // before being refreshed or invalidated. DEFAULT_CACHE time.Duration = 15 // DEFAULT_LOG_LEVEL defines the default log level for the application. // This level is used to control the verbosity of the application's logs. // It can be set to any of the levels defined in the levels package. // By default, it is set to levels.INFO. // To change the default log level, set the DEFAULT_LOG_LEVEL constant in the config package. // For example: // config.DEFAULT_LOG_LEVEL = levels.DEBUG // config.DEFAULT_LOG_LEVEL = levels.ERROR // config.DEFAULT_LOG_LEVEL = levels.FATAL // config.DEFAULT_LOG_LEVEL = levels.INFO // config.DEFAULT_LOG_LEVEL = levels.TRACE DEFAULT_LOG_LEVEL levels.TYPE = levels.DEFAULT DEFAULT_CLIENT_SERVICE_MAX_CONNS int = runtime.NumCPU() )
DEFAULT_RETRY_INTERVAL, DEFAULT_RETRY_MAX, DEFAULT_TIMEOUT, and DEFAULT_CACHE are constants representing default timing configurations in the application.
View Source
var ( USER *user.User // The current user running the application. CWD string // The current working directory of the application. HOSTNAME string // The hostname of the system where the application is running. SERVICE_TOKEN string // A token generated using the hostname and application build name. )
Global variables representing various system and user-specific information.
View Source
var ( PATH_SERVICES = "/etc/kitsune/" // Path for storing service-related configurations. PATH_BIN = "/usr/local/bin/" // Path for binary executables. PATH_RUN = "/var/run/kitsune/" // Path for runtime files, like sockets and PID files. PATH_LOGS = "/var/log/kitsune/" // Path for storing log files. )
PATH_SERVICES, PATH_BIN, PATH_RUN, and PATH_LOGS are constants representing default filesystem paths used by the Kitsune application.
View Source
var PATHS = []*string{ &PATH_SERVICES, &PATH_RUN, &PATH_BIN, &PATH_LOGS, }
PATHS is a slice of pointers to the path variables. This allows for iterating over and modifying these paths in a unified manner.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.