package
0.12.12
Repository: https://github.com/hashicorp/nomad.git
Documentation: pkg.go.dev

# Functions

MakeAllocServiceID creates a unique ID for identifying an alloc service in Consul.
MakeCheckID creates a unique ID for a check.
NewMockAgent that returns all checks as passing.
NewServiceClient creates a new Consul ServiceClient from an existing Consul API Client, logger and takes whether the client is being used by a Nomad Client agent.

# Constants

DefaultQueryWaitDuration is the max duration the Consul Agent will spend waiting for a response from a Consul Query.
Example Consul policies for use in tests.
Example Consul policies for use in tests.
Example Consul policies for use in tests.
Example Consul roles for use in tests.
Example Consul roles for use in tests.
Example Consul roles for use in tests.
ServiceTagHTTP is the tag assigned to HTTP services.
ServiceTagRPC is the tag assigned to RPC services.
ServiceTagSerf is the tag assigned to Serf services.

# Variables

# Structs

AllocRegistration holds the status of services registered for a particular allocations by task.
MockACLsAPI is a mock of consul.ACLsAPI.
MockAgent is a fake in-memory Consul backend for ServiceClient.
MockCatalog can be used for testing where the CatalogAPI is needed.
ServiceClient handles task and agent service registration with Consul.
ServiceRegistration holds the status of a registered Consul Service and its Checks.
ServiceRegistrations holds the status of services registered for a particular task or task group.
WorkloadServices describes services defined in either a Task or TaskGroup that need to be syncronized with Consul.

# Interfaces

ACLsAPI is the consul/api.ACL API subset used by Nomad Server.
AgentAPI is the consul/api.Agent API used by Nomad.
CatalogAPI is the consul/api.Catalog API used by Nomad.
ChecksAPI is the part of the Consul API the checkWatcher requires.
ConfigAPI is the consul/api.ConfigEntries API subset used by Nomad Server.
WorkloadRestarter allows the checkWatcher to restart tasks or entire task groups.