github.com/hashicorp/nomad/api@v0.0.0-20240306165712-3193ac204f65/contexts/contexts.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  // Package contexts provides constants used with the Nomad Search API.
     5  package contexts
     6  
     7  // Context defines the scope in which a search for Nomad object operates.
     8  type Context string
     9  
    10  const (
    11  	// These Context types are used to reference the high level Nomad object
    12  	// types than can be searched.
    13  	Allocs          Context = "allocs"
    14  	Deployments     Context = "deployment"
    15  	Evals           Context = "evals"
    16  	Jobs            Context = "jobs"
    17  	Nodes           Context = "nodes"
    18  	NodePools       Context = "node_pools"
    19  	Namespaces      Context = "namespaces"
    20  	Quotas          Context = "quotas"
    21  	Recommendations Context = "recommendations"
    22  	ScalingPolicies Context = "scaling_policy"
    23  	Plugins         Context = "plugins"
    24  	Variables       Context = "vars"
    25  	Volumes         Context = "volumes"
    26  
    27  	// These Context types are used to associate a search result from a lower
    28  	// level Nomad object with one of the higher level Context types above.
    29  	Groups   Context = "groups"
    30  	Services Context = "services"
    31  	Tasks    Context = "tasks"
    32  	Images   Context = "images"
    33  	Commands Context = "commands"
    34  	Classes  Context = "classes"
    35  
    36  	// Context used to represent the set of all the higher level Context types.
    37  	All Context = "all"
    38  )