consul4s.model.catalog

Members list

Type members

Classlikes

final case class CatalogService(ID: String, Node: String, Address: String, Datacenter: String, TaggedAddresses: Option[Map[String, String]], NodeMeta: Option[Map[String, String]], ServiceKind: ServiceKind, ServiceID: String, ServiceName: String, ServiceTags: Option[List[String]], ServiceAddress: String, ServiceTaggedAddresses: Option[Map[String, TaggedAddress]], ServiceWeights: Weights, ServiceMeta: Option[Map[String, String]], ServicePort: Int, ServiceEnableTagOverride: Boolean)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class NewCatalogService(Service: String, ID: Option[String], Tags: Option[List[String]], Address: Option[String], TaggedAddresses: Option[Map[String, TaggedAddress]], Meta: Option[Map[String, String]], Port: Option[Int], EnableTagOverride: Boolean, Weights: Option[Weights])

Value parameters

Address
  • Specifies the address of the service. If not provided, the agent's address is used as the address for the service during DNS queries.
EnableTagOverride
  • Specifies to disable the anti-entropy feature for this service's tags. If EnableTagOverride is set to true then external agents can update this service in the catalog and modify the tags. Subsequent local sync operations by this agent will ignore the updated tags. For instance, if an external agent modified both the tags and the port for this service and EnableTagOverride was set to true then after the next sync cycle the service's port would revert to the original value but the tags would maintain the updated value. As a counter example, if an external agent modified both the tags and port for this service and EnableTagOverride was set to false then after the next sync cycle the service's port and the tags would revert to the original value and all modifications would be lost.
ID
  • Specifies a unique ID for this service. This must be unique per agent. This defaults to the Name parameter if not provided.
Meta
  • Specifies arbitrary KV metadata linked to the service instance.
Port
  • Specifies the port of the service.
Service
  • Specifies the logical name of the service. Many service instances may share the same logical service name. We recommend using valid DNS labels for compatibility with external DNS.
TaggedAddresses
  • Specifies a map of explicit LAN and WAN addresses for the service instance. Both the address and port can be specified within the map values.
Tags
  • Specifies a list of tags to assign to the service. These tags can be used for later filtering and are exposed via the APIs. We recommend using valid DNS labels for compatibility with external DNS
Weights
  • Specifies weights for the service. Please see the service documentation for more information about weights. If this field is not provided weights will default to {"Passing": 1, "Warning": 1}.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Node(Node: String, Address: String, ID: Option[String], Datacenter: Option[String], TaggedAddresses: Option[Map[String, String]], Meta: Option[Map[String, String]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class NodeDeregistration(Node: String, Datacenter: Option[String], CheckID: Option[String], ServiceID: Option[String])

Value parameters

CheckID
  • Specifies the ID of the check to remove.
Datacenter
  • Specifies the datacenter, which defaults to the agent's datacenter if not provided.
Node
  • Specifies the ID of the node. If no other values are provided, this node, all its services, and all its checks are removed.
ServiceID
  • Specifies the ID of the service to remove. The service and all associated checks will be removed.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class NodeRegistration(Node: String, Address: String, Service: Option[NewCatalogService], Check: Option[NewHealthCheck], Checks: Option[List[NewHealthCheck]], ID: Option[String], Datacenter: Option[String], TaggedAddresses: Option[Map[String, String]], NodeMeta: Option[Map[String, String]], SkipNodeUpdate: Boolean)

Value parameters

Address
  • Specifies the address to register.
Check(s)
  • Specifies to register a check. The register API manipulates the health check entry in the Catalog, but it does not setup the script, TTL, or HTTP check to monitor the node's health. To truly enable a new health check, the check must either be provided in agent configuration or set via the agent endpoint. The CheckID can be omitted and will default to the value of Name. As with Service.ID, the CheckID must be unique on this node. Notes is an opaque field that is meant to hold human-readable text. If a ServiceID is provided that matches the ID of a service on that node, the check is treated as a service level health check, instead of a node level health check. The Status must be one of passing, warning, or critical. The Definition field can be provided with details for a TCP or HTTP health check. For more information, see the Health Checks page. Multiple checks can be provided by replacing Check with Checks and sending an array of Check objects.
Datacenter
  • Specifies the datacenter, which defaults to the agent's datacenter if not provided.
ID
  • An optional UUID to assign to the node. This must be a 36-character UUID-formatted string.
Node
  • Specifies the node ID to register.
NodeMeta
  • Specifies arbitrary KV metadata pairs for filtering purposes.
Service
  • Specifies to register a service. If ID is not provided, it will be defaulted to the value of the Service.Service property. Only one service with a given ID may be present per node. We recommend using valid DNS labels for service definition names for compatibility with external DNS. The service Tags, Address, Meta, and Port fields are all optional.
SkipNodeUpdate
  • Specifies whether to skip updating the node's information in the registration. This is useful in the case where only a health check or service entry on a node needs to be updated or when a register request is intended to update a service entry or health check. In both use cases, node information will not be overwritten, if the node is already registered. Note, if the parameter is enabled for a node that doesn't exist, it will still be created.
TaggedAddresses
  • Specifies the tagged addresses.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class NodeServiceList(Node: Node, Services: List[Service])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class NodeServiceMap(Node: Node, Services: Map[String, Service])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all