pub struct ServiceRegistration {
pub address: String,
pub port: i64,
pub create_index: u64,
pub id: String,
pub service_name: String,
pub namespace: String,
pub alloc_id: String,
pub tags: Vec<String>,
pub modify_index: u64,
pub node_id: String,
pub datacenter: String,
pub job_id: String,
}
Expand description
ServiceRegistration is an instance of a single allocation advertising itself as a named service with a specific address. Each registration is constructed from the job specification Service block. Whether the service is registered within Nomad, and therefore generates a ServiceRegistration is controlled by the Service.Provider parameter.
This struct was generated based on the Go types of the official Nomad API.
Fields§
§address: String
Address is the IP address of this service registration. This information comes from the client and is not guaranteed to be routable; this depends on cluster network topology.
port: i64
Port is the port number on which this service registration is bound. It is determined by a combination of factors on the client.
create_index: u64
§id: String
ID is the unique identifier for this registration. It currently follows the Consul service registration format to provide consistency between the two solutions.
service_name: String
ServiceName is the human friendly identifier for this service registration.
namespace: String
Namespace represents the namespace within which this service is registered.
alloc_id: String
AllocID is Allocation.ID and represents the allocation within which this service is running.
Tags are determined from either Service.Tags or Service.CanaryTags and help identify this service. Tags can also be used to perform lookups of services depending on their state and role.
modify_index: u64
§node_id: String
NodeID is Node.ID on which this service registration is currently running.
datacenter: String
Datacenter is the DC identifier of the node as identified by Node.Datacenter.
job_id: String
JobID is Job.ID and represents the job which contained the service block which resulted in this service registration.
Trait Implementations§
Source§impl Clone for ServiceRegistration
impl Clone for ServiceRegistration
Source§fn clone(&self) -> ServiceRegistration
fn clone(&self) -> ServiceRegistration
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more