package
0.7.1
Repository: https://github.com/tears-of-noobs/nomad.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

ACLPolicyListHash returns a consistent hash for a set of policies.
AllocName returns the name of the allocation given the input.
AllocsFit checks if a given set of allocations will fit on a node.
CompileACLObject compiles a set of ACL policies into an ACL object with a cache.
No description provided by the author
Decode is used to decode a MsgPack encoded object.
DefaultEphemeralDisk returns a EphemeralDisk with default configurations.
DefaultLogConfig returns the default LogConfig values.
DefaultResources is a small resources object that contains the default resources requests that we will provide to an object.
DefaultTemplate returns a default template.
No description provided by the author
DenormalizeAllocationJobs is used to attach a job to all allocations that are non-terminal and do not have a job already.
DeploymentStatusDescriptionNoRollbackTarget is used to get the status description of a deployment when there is no target to rollback to but autorevet is desired.
DeploymentStatusDescriptionRollback is used to get the status description of a deployment when rolling back to an older job.
DeploymentStatusDescriptionRollbackNoop is used to get the status description of a deployment when rolling back is not possible because it has the same specification.
DispatchedID returns an ID appropriate for a job dispatched against a particular parameterized job.
Encode is used to encode a MsgPack object with type prefix.
EscapedConstraints takes a set of constraints and returns the set that escapes computed node classes.
FilterTerminalAllocs filters out all allocations in a terminal state and returns the latest terminal allocations.
IsRecoverable returns true if error is a RecoverableError with Recoverable=true.
IsUniqueNamespace returns whether the key is under the unique namespace.
MergeMultierrorWarnings takes job warnings and canonicalize warnings and merges them into a returnable string.
MinResources is a small resources object that contains the absolute minimum resources that we will provide to an object.
NewBitmap returns a bitmap with up to size indexes.
NewDeployment creates a new deployment given the job.
NewNetworkIndex is used to construct a new network index.
NewRecoverableError is used to wrap an error and mark it as recoverable or not.
No description provided by the author
No description provided by the author
PathEscapesAllocDir returns if the given path escapes the allocation directory.
RemoveAllocs is used to remove any allocs with the given IDs from the list of allocations.
ScoreFit is used to score the fit based on the Google work published here: http://www.columbia.edu/~cs2035/courses/ieor4405.S13/datacenter_scheduling.ppt This is equivalent to their BestFit v3.
ShouldDrainNode checks if a given node status should trigger an evaluation.
UniqueNamespace takes a key and returns the key marked under the unique namespace.
ValidNodeStatus is used to check if a node status is valid.
VaultPoliciesSet takes the structure returned by VaultPolicies and returns the set of required policies.
WrapRecoverable wraps an existing error in a new RecoverableError with a new message.

# Constants

ACLClientToken and ACLManagementToken are the only types of tokens.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Allocation should stop, and was evicted.
Allocation should run.
Allocation should stop.
No description provided by the author
No description provided by the author
ApiMajorVersion is returned as part of the Status.Version request.
No description provided by the author
ApiMinorVersion is returned as part of the Status.Version request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CoreJobDeploymentGC is used for the garbage collection of eligible deployments.
CoreJobEvalGC is used for the garbage collection of evaluations and allocations.
CoreJobForceGC is used to force garbage collection of all GCable objects.
CoreJobJobGC is used for the garbage collection of eligible jobs.
CoreJobNodeGC is used for the garbage collection of failed nodes.
Ensure CoreJobPriority is higher than any user specified job so that it gets priority.
DefaultKillTimeout is the default timeout between signaling a task it will be killed and killing it.
DefaultNamespace is the default namespace.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeploymentStatusDescriptions are the various descriptions of the states a deployment can be in.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeploymentStatuses are the various states a deployment can be be in.
No description provided by the author
No description provided by the author
DispatchLaunchSuffix is the string appended to the parameterized job's ID when dispatching instances of it.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IgnoreUnknownTypeFlag is set along with a MessageType to indicate that the message type can be safely ignored if it is not recognized.
JobDefaultPriority is the default priority if not not specified.
No description provided by the author
JobMaxPriority is the maximum allowed priority.
JobMinPriority is the minimum allowed priority.
No description provided by the author
No description provided by the author
No description provided by the author
Dead means all evaluation's and allocations are terminal.
Pending means the job is waiting on scheduling.
Running means the job has non-terminal allocations.
JobTrackedVersions is the number of historic job versions that are kept.
No description provided by the author
JobTypeNomad is reserved for internal system tasks and is always handled by the CoreScheduler.
No description provided by the author
No description provided by the author
MaxDynamicPort is the largest dynamic port generated.
MinDynamicPort is the smallest dynamic port generated.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NodeUniqueNamespace is a prefix that can be appended to node meta or attribute keys to mark them for exclusion in computed node class.
No description provided by the author
No description provided by the author
PeriodicLaunchSuffix is the string appended to the periodic jobs ID when launching derived instances of it.
PeriodicSpecCron is used for a cron spec.
PeriodicSpecTest is only used by unit tests.
No description provided by the author
No description provided by the author
ReasonWithinPolicy describes restart events that are within policy.
No description provided by the author
RestartPolicyMinInterval is the minimum interval that is accepted for a restart policy.
RestartPolicyModeDelay causes an artificial delay till the next interval is reached when the specified attempts have been reached in the interval.
RestartPolicyModeFail causes a job to fail if the specified number of attempts are reached within an interval.
No description provided by the author
No description provided by the author
No description provided by the author
TaskArtifactDownloadFailed indicates that downloading the artifacts failed.
TaskBuildingTaskDir indicates that the task directory/chroot is being built.
TaskDiskExceeded indicates that one of the tasks in a taskgroup has exceeded the requested disk resources.
TaskDownloadingArtifacts means the task is downloading the artifacts specified in the task.
TaskDriveFailure indicates that the task could not be started due to a failure in the driver.
TaskDriverMessage is an informational event message emitted by drivers such as when they're performing a long running action like downloading an image.
TaskFailedValidation indicates the task was invalid and as such was not run.
TaskKilled indicates a user has killed the task.
TaskKilling indicates a kill signal has been sent to the task.
TaskLeaderDead indicates that the leader task within the has finished.
TaskNotRestarting indicates that the task has failed and is not being restarted because it has exceeded its restart policy.
TaskReceived signals that the task has been pulled by the client at the given timestamp.
TaskRestarting indicates that task terminated and is being restarted.
TaskRestartSignal indicates that the task has been signalled to be restarted.
TaskSetup indicates the task runner is setting up the task environment.
TaskSetupFailure indicates that the task could not be started due to a a setup failure.
TaskSiblingFailed indicates that a sibling task in the task group has failed.
TaskSignaling indicates that the task is being signalled.
TaskStarted signals that the task was started and its timestamp can be used to determine the running length of the task.
Terminal state of task.
The task is waiting to be run.
The task is currently running.
TaskTerminated indicates that the task was started and exited.
TemplateChangeModeNoop marks that no action should be taken if the template is re-rendered.
TemplateChangeModeRestart marks that the task should be restarted if the template is re-rendered.
TemplateChangeModeSignal marks that the task should be signaled if the template is re-rendered.
Checks uses any registered health check state in combination with task states to determine if a allocation is healthy.
Manual allows the operator to manually signal to Nomad when an allocations is healthy.
TaskStates uses the task states of an allocation to determine if the allocation is healthy.
No description provided by the author
No description provided by the author
VaultChangeModeNoop takes no action when a new token is retrieved.
VaultChangeModeRestart restarts the task when a new token is retrieved.
VaultChangeModeSignal signals the task when a new token is retrieved.

# Variables

AnonymousACLToken is used no SecretID is provided, and the request is made anonymously.
DefaultUpdateStrategy provides a baseline that can be used to upgrade jobs with the old policy or for populating field defaults.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
JsonHandle and JsonHandlePretty are the codec handles to JSON encode structs.
No description provided by the author
msgpackHandle is a shared handle for encoding/decoding of structs.
TemplateChangeModeInvalidError is the error for when an invalid change mode is given.

# Structs

ACLPolicy is used to represent an ACL policy.
ACLPolicyDeleteRequest is used to delete a set of policies.
ACLPolicyListRequest is used to request a list of policies.
ACLPolicyListResponse is used for a list request.
ACLPolicyListStub is used to for listing ACL policies.
ACLPolicySetRequest is used to query a set of policies.
ACLPolicySetResponse is used to return a set of policies.
ACLPolicySpecificRequest is used to query a specific policy.
ACLPolicyUpsertRequest is used to upsert a set of policies.
ACLToken represents a client token which is used to Authenticate.
ACLTokenBootstrapRequest is used to bootstrap ACLs.
ACLTokenDeleteRequest is used to delete a set of tokens.
ACLTokenListRequest is used to request a list of tokens.
ACLTokenListResponse is used for a list request.
No description provided by the author
ACLTokenSetRequest is used to query a set of tokens.
ACLTokenSetResponse is used to return a set of token.
ACLTokenSpecificRequest is used to query a specific token.
ACLTokenUpsertRequest is used to upsert a set of tokens.
ACLTokenUpsertResponse is used to return from an ACLTokenUpsertRequest.
Allocation is used to allocate the placement of a task group to a node.
AllocDeploymentStatus captures the status of the allocation as part of the deployment.
AllocListRequest is used to request a list of allocations.
AllocListResponse is used for a list request.
AllocListStub is used to return a subset of alloc information.
AllocMetric is used to track various metrics while attempting to make an allocation.
AllocsGetRequest is used to query a set of allocations.
AllocsGetResponse is used to return a set of allocations.
AllocSpecificRequest is used to query a specific allocation.
AllocUpdateRequest is used to submit changes to allocations, either to cause evictions or to assign new allocaitons.
ApplyDeploymentAllocHealthRequest is used to apply an alloc health request via Raft.
ApplyDeploymentPromoteRequest is used to apply a promotion request via Raft.
ApplyPlanResultsRequest is used by the planner to apply a Raft transaction committing the result of a plan.
CheckRestart describes if and when a task should be restarted based on failing health checks.
Constraints are used to restrict placement options.
Deployment is the object that represents a job deployment which is used to transition a job between versions.
DeploymentAllocHealthRequest is used to set the health of a set of allocations as part of a deployment.
DeploymentDeleteRequest is used for deleting deployments.
DeploymentFailRequest is used to fail a particular deployment.
DeploymentListRequest is used to list the deployments.
DeploymentListResponse is used for a list request.
DeploymentPauseRequest is used to pause a deployment.
DeploymentPromoteRequest is used to promote task groups in a deployment.
DeploymentSpecificRequest is used to make a request specific to a particular deployment.
DeploymentState tracks the state of a deployment for a given task group.
DeploymentStatusUpdate is used to update the status of a given deployment.
DeploymentStatusUpdateRequest is used to update the status of a deployment as well as optionally creating an evaluation atomically.
DeploymentUpdateResponse is used to respond to a deployment change.
DeriveVaultTokenRequest is used to request wrapped Vault tokens for the following tasks in the given allocation.
DeriveVaultTokenResponse returns the wrapped tokens for each requested task.
DesiredUpdates is the set of changes the scheduler would like to make given sufficient resources and cluster capacity.
DispatchPayloadConfig configures how a task gets its input from a job dispatch.
EphemeralDisk is an ephemeral disk object.
EvalAckRequest is used to Ack/Nack a specific evaluation.
EvalAllocationsResponse is used to return the allocations for an evaluation.
EvalDeleteRequest is used for deleting an evaluation.
EvalDequeueRequest is used when we want to dequeue an evaluation.
EvalDequeueResponse is used to return from a dequeue.
EvalListRequest is used to list the evaluations.
EvalListResponse is used for a list request.
EvalSpecificRequest is used when we just need to specify a target evaluation.
Evaluation is used anytime we need to apply business logic as a result of a change to our desired state (job specification) or the emergent state (registered nodes).
EvalUpdateRequest is used for upserting evaluations.
No description provided by the author
GenericRequest is used to request where no specific information is needed.
GenericResponse is used to respond to a request where no specific response information is needed.
Job is the scope of a scheduling request to Nomad.
JobAllocationsResponse is used to return the allocations for a job.
JobChildrenSummary contains the summary of children job statuses.
JobDeregisterRequest is used for Job.Deregister endpoint to deregister a job as being a schedulable entity.
JobDeregisterResponse is used to respond to a job deregistration.
JobDiff contains the diff of two jobs.
JobDispatchRequest is used to dispatch a job based on a parameterized job.
No description provided by the author
JobEvaluateRequest is used when we just need to re-evaluate a target job.
JobEvaluationsResponse is used to return the evaluations for a job.
JobListRequest is used to parameterize a list request.
JobListResponse is used for a list request.
JobListStub is used to return a subset of job information for the job list.
JobPlanRequest is used for the Job.Plan endpoint to trigger a dry-run evaluation of the Job.
JobPlanResponse is used to respond to a job plan request.
JobRegisterRequest is used for Job.Register endpoint to register a job as being a schedulable entity.
JobRegisterResponse is used to respond to a job registration.
JobRevertRequest is used to revert a job to a prior version.
JobSpecificRequest is used when we just need to specify a target job.
JobStabilityRequest is used to marked a job as stable.
JobStabilityResponse is the response when marking a job as stable.
JobSummary summarizes the state of the allocations of a job.
JobSummaryRequest is used when we just need to get a specific job summary.
JobSummaryResponse is used to return a single job summary.
JobValidateRequest is used to validate a job.
JobValidateResponse is the response from validate request.
JobVersionsRequest is used to get a jobs versions.
JobVersionsResponse is used for a job get versions request.
KeyringRequest is request objects for serf key operations.
KeyringResponse is a unified key response and can be used for install, remove, use, as well as listing key queries.
LogConfig provides configuration for log rotation.
NamespacedID is a tuple of an ID and a namespace.
NetworkIndex is used to index the available network resources and the used network resources on a machine given allocations.
NetworkResource is used to represent available network resources.
Node is a representation of a schedulable client node.
NodeAllocsResponse is used to return allocs for a single node.
NodeClientAllocsResponse is used to return allocs meta data for a single node.
NodeDeregisterRequest is used for Node.Deregister endpoint to deregister a node as being a schedulable entity.
NodeDrainUpdateResponse is used to respond to a node drain update.
NodeEvaluateRequest is used to re-evaluate the ndoe.
NodeListRequest is used to parameterize a list request.
NodeListResponse is used for a list request.
NodeListStub is used to return a subset of job information for the job list.
NodeRegisterRequest is used for Node.Register endpoint to register a node as being a schedulable entity.
NodeServerInfo is used to in NodeUpdateResponse to return Nomad server information used in RPC server lists.
NodeSpecificRequest is used when we just need to specify a target node.
NodeUpdateDrainRequest is used for updatin the drain status.
NodeUpdateResponse is used to respond to a node update.
NodeUpdateStatusRequest is used for Node.UpdateStatus endpoint to update the status of a node.
ObjectDiff contains the diff of two generic objects.
ParameterizedJobConfig is used to configure the parameterized job.
Periodic defines the interval a job should be run at.
PeriodicForceReqeuest is used to force a specific periodic job.
PeriodicForceResponse is used to respond to a periodic job force launch.
PeriodicLaunch tracks the last launch time of a periodic job.
Plan is used to submit a commit plan for task allocations.
PlanAnnotations holds annotations made by the scheduler to give further debug information to operators.
PlanRequest is used to submit an allocation plan to the leader.
PlanResponse is used to return from a PlanRequest.
PlanResult is the result of a plan submitted to the leader.
No description provided by the author
QueryMeta allows a query response to include potentially useful metadata about a query.
QueryOptions is used to specify various flags for read queries.
RaftConfigrationResponse is returned when querying for the current Raft configuration.
RaftPeerByAddressRequest is used by the Operator endpoint to apply a Raft operation on a specific Raft peer by address in the form of "IP:port".
RaftServer has information about a server in the Raft configuration.
RecoverableError wraps an error and marks whether it is recoverable and could be retried or it is fatal.
ResolveACLTokenRequest is used to resolve a specific token.
ResolveACLTokenResponse is used to resolve a single token.
Resources is used to define the resources available on a client.
RestartPolicy configures how Tasks are restarted when they crash or fail.
SearchRequest is used to parameterize a request, and returns a list of matches made up of jobs, allocations, evaluations, and/or nodes, along with whether or not the information returned is truncated.
SearchResponse is used to return matches and information about whether the match list is truncated specific to each type of context.
ServerMember holds information about a Nomad server agent in a cluster.
ServerMembersResponse has the list of servers in a cluster.
Service represents a Consul service definition in Nomad.
The ServiceCheck data model represents the consul health check that Nomad registers for a Task.
SingleACLPolicyResponse is used to return a single policy.
SingleACLTokenResponse is used to return a single token.
SingleAllocResponse is used to return a single allocation.
SingleDeploymentResponse is used to respond with a single deployment.
SingleEvalResponse is used to return a single evaluation.
SingleJobResponse is used to return a single job.
SingleNodeResponse is used to return a single node.
Task is a single process typically that is executed as part of a task group.
TaskArtifact is an artifact to download before running the task.
TaskDiff contains the diff of two Tasks.
TaskEvent is an event that effects the state of a task and contains meta-data appropriate to the events type.
TaskGroup is an atomic unit of placement.
TaskGroupDiff contains the diff of two task groups.
TaskGroup summarizes the state of all the allocations of a particular TaskGroup.
TaskState tracks the current state of a task and events that caused state transitions.
Template represents a template configuration to be rendered for a given task.
UpdateStrategy is used to modify how updates are done.
Vault stores the set of permissions a task needs access to from Vault.
VaultAccessor is a reference to a created Vault token on behalf of an allocation's task.
VaultAccessorsRequest is used to operate on a set of Vault accessors.
VersionResponse is used for the Status.Version reseponse.
WriteMeta allows a write response to include potentially useful metadata about the write.
No description provided by the author

# Interfaces

Recoverable is an interface for errors to implement to indicate whether or not they are fatal or recoverable.
RPCInfo is used to describe common information about query.

# Type aliases

Bitmap is a simple uncompressed bitmap.
Context defines the scope in which a search for Nomad object operates, and is also used to query the matching index value for this context.
DiffType denotes the type of a diff object.
For sorting FieldDiffs.
No description provided by the author
Networks defined for a task on the Resources struct.
For sorting ObjectDiffs.
For sorting TaskDiffs.
For sorting TaskGroupDiffs.