Documentation ¶
Index ¶
- func ACLManagementToken() *structs.ACLToken
- func ACLPolicy() *structs.ACLPolicy
- func ACLToken() *structs.ACLToken
- func AgentPolicy(policy string) string
- func Alloc() *structs.Allocation
- func BatchAlloc() *structs.Allocation
- func BatchConnectAlloc() *structs.Allocation
- func BatchConnectJob() *structs.Job
- func BatchJob() *structs.Job
- func CSIPlugin() *structs.CSIPlugin
- func CSIVolume(plugin *structs.CSIPlugin) *structs.CSIVolume
- func ConnectAlloc() *structs.Allocation
- func ConnectJob() *structs.Job
- func ConnectNativeAlloc(mode string) *structs.Allocation
- func ConnectNativeJob(mode string) *structs.Job
- func CreatePolicy(t testing.T, state StateStore, index uint64, name, rule string)
- func CreatePolicyAndToken(t testing.T, state StateStore, index uint64, name, rule string) *structs.ACLToken
- func CreateToken(t testing.T, state StateStore, index uint64, policies []string) *structs.ACLToken
- func Deployment() *structs.Deployment
- func Eval() *structs.Evaluation
- func HCL() string
- func HostVolumePolicy(vol string, policy string, capabilities []string) string
- func Job() *structs.Job
- func JobSummary(jobID string) *structs.JobSummary
- func JobWithScalingPolicy() (*structs.Job, *structs.ScalingPolicy)
- func LifecycleAlloc() *structs.Allocation
- func LifecycleInitTask(resources structs.Resources, i int) *structs.Task
- func LifecycleJob() *structs.Job
- func LifecycleMainTask(resources structs.Resources, i int) *structs.Task
- func LifecycleSideTask(resources structs.Resources, i int) *structs.Task
- func MaxParallelJob() *structs.Job
- func MultiregionJob() *structs.Job
- func NamespacePolicy(namespace string, policy string, capabilities []string) string
- func Node() *structs.Node
- func NodePolicy(policy string) string
- func NvidiaNode() *structs.Node
- func PeriodicJob() *structs.Job
- func Plan() *structs.Plan
- func PlanResult() *structs.PlanResult
- func PluginPolicy(policy string) string
- func QuotaPolicy(policy string) string
- func SITokenAccessor() *structs.SITokenAccessor
- func ScalingPolicy() *structs.ScalingPolicy
- func SystemAlloc() *structs.Allocation
- func SystemJob() *structs.Job
- func VariableLifecycleJob(resources structs.Resources, main int, init int, side int) *structs.Job
- func VaultAccessor() *structs.VaultAccessor
- type StateStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ACLManagementToken ¶ added in v0.7.0
func AgentPolicy ¶ added in v0.7.0
AgentPolicy is a helper for generating the hcl for a given agent policy.
func Alloc ¶
func Alloc() *structs.Allocation
func BatchAlloc ¶ added in v0.8.0
func BatchAlloc() *structs.Allocation
func BatchConnectAlloc ¶ added in v0.10.4
func BatchConnectAlloc() *structs.Allocation
BatchConnectAlloc is useful for testing task runner things.
func BatchConnectJob ¶ added in v0.10.4
func ConnectAlloc ¶ added in v0.10.0
func ConnectAlloc() *structs.Allocation
ConnectJob adds a Connect proxy sidecar group service to mock.Alloc.
func ConnectJob ¶ added in v0.10.0
ConnectJob adds a Connect proxy sidecar group service to mock.Job.
Note this does *not* include the Job.Register mutation that inserts the associated Sidecar Task (nor the hook that configures envoy as the default).
func ConnectNativeAlloc ¶ added in v0.12.2
func ConnectNativeAlloc(mode string) *structs.Allocation
func ConnectNativeJob ¶ added in v0.12.2
func CreatePolicy ¶ added in v0.7.0
func CreatePolicy(t testing.T, state StateStore, index uint64, name, rule string)
CreatePolicy creates a policy with the given name and rule.
func CreatePolicyAndToken ¶ added in v0.7.0
func CreatePolicyAndToken(t testing.T, state StateStore, index uint64, name, rule string) *structs.ACLToken
CreatePolicyAndToken creates a policy and then returns a token configured for just that policy. CreatePolicyAndToken uses the given index and index+1.
func CreateToken ¶ added in v0.7.0
CreateToken creates a local, client token for the given policies
func Deployment ¶ added in v0.6.0
func Deployment() *structs.Deployment
func Eval ¶
func Eval() *structs.Evaluation
func HostVolumePolicy ¶ added in v0.10.0
HostVolumePolicy is a helper for generating the policy hcl for a given host-volume. Either policy or capabilities may be nil but not both.
func JobSummary ¶ added in v0.4.1
func JobSummary(jobID string) *structs.JobSummary
func JobWithScalingPolicy ¶ added in v0.11.0
func JobWithScalingPolicy() (*structs.Job, *structs.ScalingPolicy)
func LifecycleAlloc ¶ added in v0.11.0
func LifecycleAlloc() *structs.Allocation
func LifecycleInitTask ¶ added in v0.11.0
func LifecycleJob ¶ added in v0.11.0
func LifecycleMainTask ¶ added in v0.11.0
func LifecycleSideTask ¶ added in v0.11.0
func MaxParallelJob ¶ added in v0.10.0
func MultiregionJob ¶ added in v0.12.0
func NamespacePolicy ¶ added in v0.7.0
NamespacePolicy is a helper for generating the policy hcl for a given namespace. Either policy or capabilities may be nil but not both.
func NodePolicy ¶ added in v0.7.0
NodePolicy is a helper for generating the hcl for a given node policy.
func NvidiaNode ¶ added in v0.9.0
NvidiaNode returns a node with two instances of an Nvidia GPU
func PeriodicJob ¶ added in v0.3.0
func PlanResult ¶
func PlanResult() *structs.PlanResult
func PluginPolicy ¶ added in v0.11.0
PluginPolicy is a helper for generating the hcl for a given plugin policy.
func QuotaPolicy ¶ added in v0.7.0
QuotaPolicy is a helper for generating the hcl for a given quota policy.
func SITokenAccessor ¶ added in v0.10.4
func SITokenAccessor() *structs.SITokenAccessor
func ScalingPolicy ¶ added in v0.11.0
func ScalingPolicy() *structs.ScalingPolicy
func SystemAlloc ¶ added in v0.8.0
func SystemAlloc() *structs.Allocation
func VariableLifecycleJob ¶ added in v0.11.0
func VaultAccessor ¶ added in v0.5.0
func VaultAccessor() *structs.VaultAccessor