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 ConnectAlloc() *structs.Allocation
- func ConnectJob() *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 MaxParallelJob() *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 QuotaPolicy(policy string) string
- func SITokenAccessor() *structs.SITokenAccessor
- func SystemAlloc() *structs.Allocation
- func SystemJob() *structs.Job
- func VaultAccessor() *structs.VaultAccessor
- type StateStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ACLManagementToken ¶
func AgentPolicy ¶
AgentPolicy is a helper for generating the hcl for a given agent policy.
func Alloc ¶
func Alloc() *structs.Allocation
func BatchAlloc ¶
func BatchAlloc() *structs.Allocation
func BatchConnectAlloc ¶
func BatchConnectAlloc() *structs.Allocation
BatchConnectAlloc is useful for testing task runner things.
func BatchConnectJob ¶
func ConnectAlloc ¶
func ConnectAlloc() *structs.Allocation
ConnectJob adds a Connect proxy sidecar group service to mock.Alloc.
func ConnectJob ¶
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 CreatePolicy ¶
func CreatePolicy(t testing.T, state StateStore, index uint64, name, rule string)
CreatePolicy creates a policy with the given name and rule.
func CreatePolicyAndToken ¶
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 ¶
CreateToken creates a local, client token for the given policies
func Deployment ¶
func Deployment() *structs.Deployment
func Eval ¶
func Eval() *structs.Evaluation
func HostVolumePolicy ¶
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 ¶
func JobSummary(jobID string) *structs.JobSummary
func MaxParallelJob ¶
func NamespacePolicy ¶
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 ¶
NodePolicy is a helper for generating the hcl for a given node policy.
func NvidiaNode ¶
NvidiaNode returns a node with two instances of an Nvidia GPU
func PeriodicJob ¶
func PlanResult ¶
func PlanResult() *structs.PlanResult
func QuotaPolicy ¶
QuotaPolicy is a helper for generating the hcl for a given quota policy.
func SITokenAccessor ¶
func SITokenAccessor() *structs.SITokenAccessor
func SystemAlloc ¶
func SystemAlloc() *structs.Allocation
func VaultAccessor ¶
func VaultAccessor() *structs.VaultAccessor