Documentation ¶
Index ¶
Constants ¶
const ( PortOffsetUnknown = 0 // Coordinator/single server PortOffsetCoordinator = 1 // Coordinator/single server PortOffsetDBServer = 2 PortOffsetAgent = 3 PortOffsetSyncMaster = 4 PortOffsetSyncWorker = 5 PortOffsetIncrementOld = 5 // {our http server, agent, coordinator, dbserver, reserved} PortOffsetIncrementNew = 10 // {our http server, agent, coordinator, dbserver, syncmaster, syncworker, reserved...} )
const ( ArangodConfFileName = "arangod.conf" ArangodJWTSecretFileName = "arangod.jwtsecret" ArangodJWTSecretFolderName = "jwt" ArangodJWTSecretActive = "-" )
const ( // EXIT_SUCCESS ArangoDExitSuccess = 0 // No error has occurred. // EXIT_FAILED ArangoDExitFailed = 1 // Will be returned when a general error occurred. // EXIT_CODE_RESOLVING_FAILED ArangoDExitCodeResolvingFailed = 2 // unspecified exit code // EXIT_INVALID_OPTION_NAME ArangoDExitInvalidOptionName = 3 // invalid/unknown startup option name was used // EXIT_INVALID_OPTION_VALUE ArangoDExitInvalidOptionValue = 4 // invalid startup option value was used // EXIT_BINARY_NOT_FOUND ArangoDExitBinaryNotFound = 5 // Will be returned if a referenced binary was not found // EXIT_CONFIG_NOT_FOUND ArangoDExitConfigNotFound = 6 // Will be returned if no valid configuration was found or its contents are structurally invalid // EXIT_UPGRADE_FAILED ArangoDExitUpgradeFailed = 10 // Will be returned when the database upgrade failed // EXIT_UPGRADE_REQUIRED ArangoDExitUpgradeRequired = 11 // Will be returned when a database upgrade is required // EXIT_DOWNGRADE_REQUIRED ArangoDExitDowngradeRequired = 12 // Will be returned when a database upgrade is required // EXIT_VERSION_CHECK_FAILED ArangoDExitVersionCheckFailed = 13 // Will be returned when there is a version mismatch // EXIT_ALREADY_RUNNING ArangoDExitAlreadyRunning = 20 // Will be returned when arangod is already running according to PID-file // EXIT_COULD_NOT_BIND_PORT ArangoDExitCouldNotBindPort = 21 // Will be returned when the configured tcp endpoint is already occupied by another process // EXIT_COULD_NOT_LOCK ArangoDExitCouldNotLock = 22 // Will be returned if another ArangoDB process is running, or the state can not be cleared // EXIT_RECOVERY ArangoDExitRecovery = 23 // Will be returned if the automatic database startup recovery fails // EXIT_DB_NOT_EMPTY ArangoDExitDbNotEmpty = 24 // Will be returned when commanding to initialize a non empty directory as database // EXIT_UNSUPPORTED_STORAGE_ENGINE ArangoDExitUnsupportedStorageEngine = 25 // Will be returned when trying to start with an unsupported storage engine // EXIT_ICU_INITIALIZATION_FAILED ArangoDExitIcuInitializationFailed = 26 // Will be returned if icudtl.dat is not found, of the wrong version or invalid. Check for an incorrectly set ICU_DATA environment variable // EXIT_TZDATA_INITIALIZATION_FAILED ArangoDExitTzdataInitializationFailed = 27 // Will be returned if tzdata is not found // EXIT_RESOURCES_TOO_LOW ArangoDExitResourcesTooLow = 28 // Will be returned if i.e. ulimit is too restrictive // EXIT_SST_FILE_CHECK ArangoDExitSstFileCheck = 29 // Will be returned when either sst file open or sst file check was unsuccessful i.e. sst file is not valid )
const ( ServerTypeUnknown = "unknown" ServerTypeCoordinator = "coordinator" ServerTypeDBServer = "dbserver" ServerTypeDBServerNoResign = "dbserver_noresign" ServerTypeAgent = "agent" ServerTypeSingle = "single" ServerTypeResilientSingle = "resilientsingle" ServerTypeSyncMaster = "syncmaster" ServerTypeSyncWorker = "syncworker" )
const (
MaxRecentFailures = 100 // Maximum number of recent failures before the starter gives up.
)
Variables ¶
This section is empty.
Functions ¶
func ExitCodeIsRecoverable ¶ added in v0.17.1
func ExitCodeIsRecoverable(pType ProcessType, code int) bool
ExitCodeIsRecoverable returns true if provided code indicates that restarting ArangoD process with exact same config won't help
func GetExitCodeReason ¶ added in v0.17.1
Types ¶
type ProcessType ¶
type ProcessType string
ProcessType specifies the types of process (the starter can work with).
const ( ProcessTypeArangod ProcessType = "arangod" ProcessTypeArangoSync ProcessType = "arangosync" )
func (ProcessType) CommandFileName ¶
func (s ProcessType) CommandFileName() string
CommandFileName returns the name of a file containing the full command for processes of this type.
func (ProcessType) LogFileName ¶
func (s ProcessType) LogFileName(suffix string) string
LogFileName returns the name of the log file used by this process
func (ProcessType) String ¶
func (s ProcessType) String() string
String returns a string representation of the given ProcessType.
type ServerType ¶
type ServerType string
ServerType specifies the types of database servers.
func AllServerTypes ¶
func AllServerTypes() []ServerType
func (ServerType) ExpectedServerRole ¶
func (s ServerType) ExpectedServerRole() (string, string)
ExpectedServerRole returns the expected `role` & `mode` value resulting from a request to `_admin/server/role`.
func (ServerType) GetName ¶
func (s ServerType) GetName() string
GetName returns readable name for the specific type of server.
func (ServerType) InitialStopTimeout ¶ added in v0.17.1
func (s ServerType) InitialStopTimeout() time.Duration
InitialStopTimeout returns initial delay for process stopping
func (ServerType) PortOffset ¶
func (s ServerType) PortOffset() int
PortOffset returns the offset from a peer base port for the given type of server.
func (ServerType) ProcessType ¶
func (s ServerType) ProcessType() ProcessType
ProcessType returns the type of process needed to run a server of given type.
func (ServerType) String ¶
func (s ServerType) String() string
String returns a string representation of the given ServerType.