Versions in this module Expand all Collapse all v0 v0.1.0 Nov 7, 2026 Changes in this version + const ContextKeyReqID + const DefaultRaftMultiplier + const EnterpriseTestAgent + const ErrEntOnly + const ErrInvalidMethod + const ErrServerOnly + const MaxRaftMultiplier + const MissingRequestID + var TempDir = os.TempDir() + func ApiAffinitiesToStructs(in []*api.Affinity) []*structs.Affinity + func ApiAffinityToStructs(a1 *api.Affinity) *structs.Affinity + func ApiCSIPluginConfigToStructsCSIPluginConfig(apiConfig *api.TaskCSIPluginConfig) *structs.TaskCSIPluginConfig + func ApiConstraintToStructs(in *api.Constraint) *structs.Constraint + func ApiConstraintsToStructs(in []*api.Constraint) []*structs.Constraint + func ApiConsulConnectToStructs(in *api.ConsulConnect) *structs.ConsulConnect + func ApiJobToStructJob(job *api.Job) *structs.Job + func ApiNetworkResourceToStructs(in []*api.NetworkResource) []*structs.NetworkResource + func ApiPortToStructs(in api.Port) structs.Port + func ApiResourcesToStructs(in *api.Resources) *structs.Resources + func ApiScalingPolicyToStructs(count int, ap *api.ScalingPolicy) *structs.ScalingPolicy + func ApiServicesToStructs(in []*api.Service, group bool) []*structs.Service + func ApiSpreadToStructs(a1 *api.Spread) *structs.Spread + func ApiTaskToStructsTask(job *structs.Job, group *structs.TaskGroup, apiTask *api.Task, ...) + func ApiTgToStructsTG(job *structs.Job, taskGroup *api.TaskGroup, tg *structs.TaskGroup) + func LevelFilter() *logutils.LevelFilter + func SetupLoggers(ui cli.Ui, config *Config) (*logutils.LevelFilter, *gatedwriter.Writer, io.Writer) + func ValidateLevelFilter(minLevel logutils.LogLevel, filter *logutils.LevelFilter) bool + type ACLConfig struct + Enabled bool + ExtraKeysHCL []string + PolicyTTL time.Duration + PolicyTTLHCL string + ReplicationToken string + RoleTTL time.Duration + RoleTTLHCL string + TokenMaxExpirationTTL time.Duration + TokenMaxExpirationTTLHCL string + TokenMinExpirationTTL time.Duration + TokenMinExpirationTTLHCL string + TokenTTL time.Duration + TokenTTLHCL string + func (a *ACLConfig) Copy() *ACLConfig + func (a *ACLConfig) Merge(b *ACLConfig) *ACLConfig + type Addresses struct + ExtraKeysHCL []string + HTTP string + RPC string + Serf string + func (a *Addresses) Copy() *Addresses + func (a *Addresses) Merge(b *Addresses) *Addresses + type AdvertiseAddrs struct + ExtraKeysHCL []string + HTTP string + RPC string + Serf string + func (a *AdvertiseAddrs) Copy() *AdvertiseAddrs + func (a *AdvertiseAddrs) Merge(b *AdvertiseAddrs) *AdvertiseAddrs + type Agent struct + EnterpriseAgent *EnterpriseAgent + func NewAgent(config *Config, logger log.InterceptLogger, logOutput io.Writer, ...) (*Agent, error) + func (a *Agent) Client() *client.Client + func (a *Agent) GetConfig() *Config + func (a *Agent) GetMetricsSink() *metrics.InmemSink + func (a *Agent) Leave() error + func (a *Agent) RPC(method string, args interface{}, reply interface{}) error + func (a *Agent) Reload(newConfig *Config) error + func (a *Agent) Server() *nomad.Server + func (a *Agent) ShouldReload(newConfig *Config) (agent, http bool) + func (a *Agent) Shutdown() error + func (a *Agent) Stats() map[string]map[string]string + type ClientConfig struct + AllocDir string + Artifact *config.ArtifactConfig + BindWildcardDefaultHostNetwork bool + BridgeNetworkHairpinMode bool + BridgeNetworkName string + BridgeNetworkSubnet string + CNIConfigDir string + CNIPath string + CgroupParent string + ChrootEnv map[string]string + ClientMaxPort int + ClientMinPort int + CpuCompute int + DisableRemoteExec bool + DiskFreeMB int + DiskTotalMB int + Drain *config.DrainConfig + Enabled bool + ExtraKeysHCL []string + GCDiskUsageThreshold float64 + GCInodeUsageThreshold float64 + GCInterval time.Duration + GCIntervalHCL string + GCMaxAllocs int + GCParallelDestroys int + HostNetworks []*structs.ClientHostNetworkConfig + HostVolumes []*structs.ClientHostVolumeConfig + MaxDynamicPort int + MaxKillTimeout string + MemoryMB int + Meta map[string]string + MinDynamicPort int + NetworkInterface string + NetworkSpeed int + NoHostUUID *bool + NodeClass string + NodePool string + NomadServiceDiscovery *bool + Options map[string]string + ReserveableCores string + Reserved *Resources + ServerJoin *ServerJoin + Servers []string + StateDir string + TemplateConfig *client.ClientTemplateConfig + func (a *ClientConfig) Copy() *ClientConfig + func (a *ClientConfig) Merge(b *ClientConfig) *ClientConfig + type Command struct + ShutdownCh <-chan struct{} + Ui cli.Ui + Version *version.VersionInfo + func (c *Command) AutocompleteArgs() complete.Predictor + func (c *Command) AutocompleteFlags() complete.Flags + func (c *Command) Help() string + func (c *Command) IsValidConfig(config, cmdConfig *Config) bool + func (c *Command) Run(args []string) int + func (c *Command) Synopsis() string + type Config struct + ACL *ACLConfig + Addresses *Addresses + AdvertiseAddrs *AdvertiseAddrs + Audit *config.AuditConfig + Autopilot *config.AutopilotConfig + BindAddr string + Client *ClientConfig + ClientConfig *client.Config + Consul *config.ConsulConfig + DataDir string + Datacenter string + DevMode bool + DisableAnonymousSignature bool + DisableUpdateCheck *bool + EnableDebug bool + EnableSyslog bool + ExtraKeysHCL []string + Files []string + HTTPAPIResponseHeaders map[string]string + LeaveOnInt bool + LeaveOnTerm bool + Limits config.Limits + LogFile string + LogIncludeLocation bool + LogJson bool + LogLevel string + LogRotateBytes int + LogRotateDuration string + LogRotateMaxFiles int + NodeName string + NomadConfig *nomad.Config + PluginDir string + Plugins []*config.PluginConfig + Ports *Ports + Region string + Sentinel *config.SentinelConfig + Server *ServerConfig + SyslogFacility string + TLSConfig *config.TLSConfig + Telemetry *Telemetry + UI *config.UIConfig + Vault *config.VaultConfig + Version *version.VersionInfo + func DefaultConfig() *Config + func DefaultEntConfig() *Config + func DevConfig(mode *devModeConfig) *Config + func LoadConfig(path string) (*Config, error) + func LoadConfigDir(dir string) (*Config, error) + func ParseConfigFile(path string) (*Config, error) + func (c *Config) Copy() *Config + func (c *Config) Listener(proto, addr string, port int) (net.Listener, error) + func (c *Config) Merge(b *Config) *Config + type DiscoverInterface interface + Addrs func(string, *golog.Logger) ([]string, error) + Help func() string + Names func() []string + type EnterpriseAgent struct + type HTTPCodedError interface + Code func() int + func CodedError(c int, s string) HTTPCodedError + type HTTPServer struct + Addr string + func NewHTTPServers(agent *Agent, config *Config) ([]*HTTPServer, error) + func (s *HTTPServer) ACLAuthMethodListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLAuthMethodRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLAuthMethodSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLBindingRuleListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLBindingRuleRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLBindingRuleSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLLoginRequest(resp http.ResponseWriter, req *http.Request) (any, error) + func (s *HTTPServer) ACLOIDCAuthURLRequest(_ http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLOIDCCompleteAuthRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLPoliciesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLPolicySpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLRoleListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLRoleRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLRoleSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokenBootstrap(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokenSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ACLTokensRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentForceLeaveRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentHostRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentJoinRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentMembersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentMonitor(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentPprofRequest(resp http.ResponseWriter, req *http.Request) ([]byte, error) + func (s *HTTPServer) AgentSchedulerWorkerConfigRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentSchedulerWorkerInfoRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentSelfRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AgentServersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AllocSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) AllocsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSIExternalVolumesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSIPluginSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSIPluginsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSISnapshotsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSIVolumeSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) CSIVolumesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientAllocRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientGCRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ClientStatsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DeploymentSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DeploymentsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) DirectoryListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EvalSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EvalsCountRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EvalsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) EventStream(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ExchangeOneTimeToken(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileCatRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileReadAtRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FileStatRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) FuzzySearchRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) GarbageCollectRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) HealthRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) JobSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) JobsParseRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) JobsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) KeyringOperationRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) KeyringRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) LicenseRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Logs(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) MetricsRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NamespaceCreateRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NamespaceSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NamespacesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NodeMetaRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NodePoolSpecificRequest(resp http.ResponseWriter, req *http.Request) (any, error) + func (s *HTTPServer) NodePoolsRequest(resp http.ResponseWriter, req *http.Request) (any, error) + func (s *HTTPServer) NodeSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) NodesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorAutopilotConfiguration(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorRaftConfiguration(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorRaftPeer(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorSchedulerConfiguration(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) OperatorServerHealth(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ReconcileJobSummaries(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) RegionListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ResolveToken(req *http.Request) (*acl.ACL, error) + func (s *HTTPServer) ScalingPoliciesRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ScalingPolicySpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) SearchRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ServiceRegistrationListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ServiceRegistrationRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Shutdown() + func (s *HTTPServer) SnapshotRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) StatusLeaderRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) StatusPeersRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) Stream(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) UpsertOneTimeToken(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) ValidateJobRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) VariableSpecificRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + func (s *HTTPServer) VariablesListRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) + type Member struct + Addr net.IP + DelegateCur uint8 + DelegateMax uint8 + DelegateMin uint8 + Name string + Port uint16 + ProtocolCur uint8 + ProtocolMax uint8 + ProtocolMin uint8 + Status string + Tags map[string]string + type NormalizedAddrs struct + HTTP []string + RPC string + Serf string + func (n *NormalizedAddrs) Copy() *NormalizedAddrs + type PlanRejectionTracker struct + Enabled *bool + ExtraKeysHCL []string + NodeThreshold int + NodeWindow time.Duration + NodeWindowHCL string + func (p *PlanRejectionTracker) Copy() *PlanRejectionTracker + func (p *PlanRejectionTracker) Merge(b *PlanRejectionTracker) *PlanRejectionTracker + type Ports struct + ExtraKeysHCL []string + HTTP int + RPC int + Serf int + func (a *Ports) Copy() *Ports + func (a *Ports) Merge(b *Ports) *Ports + type RPCer interface + Client func() *client.Client + GetConfig func() *Config + GetMetricsSink func() *metrics.InmemSink + RPC func(string, any, any) error + Server func() *nomad.Server + Stats func() map[string]map[string]string + type RaftBoltConfig struct + NoFreelistSync bool + func (r *RaftBoltConfig) Copy() *RaftBoltConfig + type Resources struct + CPU int + Cores string + DiskMB int + ExtraKeysHCL []string + MemoryMB int + ReservedPorts string + func (r *Resources) Copy() *Resources + func (r *Resources) Merge(b *Resources) *Resources + type Search struct + FuzzyEnabled bool + LimitQuery int + LimitResults int + MinTermLength int + func (s *Search) Copy() *Search + type ServerConfig struct + ACLTokenGCThreshold string + AuthoritativeRegion string + BatchEvalGCThreshold string + BootstrapExpect int + CSIPluginGCThreshold string + CSIVolumeClaimGCInterval string + CSIVolumeClaimGCThreshold string + DataDir string + DefaultSchedulerConfig *structs.SchedulerConfiguration + DeploymentGCThreshold string + DeploymentQueryRateLimit float64 + EnableEventBroker *bool + Enabled bool + EnabledSchedulers []string + EncryptKey string + EvalGCThreshold string + EventBufferSize *int + ExtraKeysHCL []string + FailoverHeartbeatTTL time.Duration + FailoverHeartbeatTTLHCL string + HeartbeatGrace time.Duration + HeartbeatGraceHCL string + JobDefaultPriority *int + JobGCInterval string + JobGCThreshold string + JobMaxPriority *int + JobMaxSourceSize *string + JobTrackedVersions *int + LicenseEnv string + LicensePath string + MaxHeartbeatsPerSecond float64 + MinHeartbeatTTL time.Duration + MinHeartbeatTTLHCL string + NodeGCThreshold string + NonVotingServer bool + NumSchedulers *int + PlanRejectionTracker *PlanRejectionTracker + ProtocolVersion int + RaftBoltConfig *RaftBoltConfig + RaftMultiplier *int + RaftProtocol int + RaftSnapshotInterval *string + RaftSnapshotThreshold *int + RaftTrailingLogs *int + RedundancyZone string + RejoinAfterLeave bool + RetryInterval time.Duration + RetryIntervalHCL string + RetryJoin []string + RetryMaxAttempts int + RootKeyGCInterval string + RootKeyGCThreshold string + RootKeyRotationThreshold string + Search *Search + ServerJoin *ServerJoin + StartJoin []string + UpgradeVersion string + func (s *ServerConfig) Copy() *ServerConfig + func (s *ServerConfig) EncryptBytes() ([]byte, error) + func (s *ServerConfig) Merge(b *ServerConfig) *ServerConfig + type ServerJoin struct + ExtraKeysHCL []string + RetryInterval time.Duration + RetryIntervalHCL string + RetryJoin []string + RetryMaxAttempts int + StartJoin []string + func (s *ServerJoin) Copy() *ServerJoin + func (s *ServerJoin) Merge(b *ServerJoin) *ServerJoin + type SyslogWrapper struct + func (s *SyslogWrapper) Write(p []byte) (int, error) + type Telemetry struct + CirconusAPIApp string + CirconusAPIToken string + CirconusAPIURL string + CirconusBrokerID string + CirconusBrokerSelectTag string + CirconusCheckDisplayName string + CirconusCheckForceMetricActivation string + CirconusCheckID string + CirconusCheckInstanceID string + CirconusCheckSearchTag string + CirconusCheckSubmissionURL string + CirconusCheckTags string + CirconusSubmissionInterval string + CollectionInterval string + DataDogAddr string + DataDogTags []string + DisableDispatchedJobSummaryMetrics bool + DisableHostname bool + DisableRPCRateMetricsLabels bool + ExtraKeysHCL []string + FilterDefault *bool + PrefixFilter []string + PrometheusMetrics bool + PublishAllocationMetrics bool + PublishNodeMetrics bool + StatsdAddr string + StatsiteAddr string + UseNodeName bool + func (a *Telemetry) Copy() *Telemetry + func (a *Telemetry) Merge(b *Telemetry) *Telemetry + func (a *Telemetry) PrefixFilters() (allowed, blocked []string, err error) + type TestAgent struct + Config *Config + ConfigCallback func(*Config) + DataDir string + Enterprise bool + Key string + Name string + RootToken *structs.ACLToken + Server *HTTPServer + Servers []*HTTPServer + T testing.TB + func NewTestAgent(t testing.TB, name string, configCallback func(*Config)) *TestAgent + func (a *TestAgent) Client() *api.Client + func (a *TestAgent) HTTPAddr() string + func (a *TestAgent) Shutdown() + func (a *TestAgent) Start() *TestAgent + type UIAssetWrapper struct + FileSystem *assetfs.AssetFS + func (fs *UIAssetWrapper) Open(name string) (http.File, error) v0.1.0-preview.3 Nov 7, 2026 v0.1.0-preview.2 Nov 7, 2026 v0.1.0-preview.1 Nov 7, 2026