pub struct ServiceRegistrationBuilder { /* private fields */ }
Expand description
Builder for ServiceRegistration
.
Implementations§
Source§impl ServiceRegistrationBuilder
impl ServiceRegistrationBuilder
Sourcepub fn service_name(&mut self, value: String) -> &mut Self
pub fn service_name(&mut self, value: String) -> &mut Self
ServiceName is the human friendly identifier for this service registration.
Sourcepub fn namespace(&mut self, value: String) -> &mut Self
pub fn namespace(&mut self, value: String) -> &mut Self
Namespace represents the namespace within which this service is registered.
Sourcepub fn node_id(&mut self, value: String) -> &mut Self
pub fn node_id(&mut self, value: String) -> &mut Self
NodeID is Node.ID on which this service registration is currently running.
Sourcepub fn address(&mut self, value: String) -> &mut Self
pub fn address(&mut self, value: String) -> &mut Self
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.
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.
Sourcepub fn port(&mut self, value: i64) -> &mut Self
pub fn port(&mut self, value: i64) -> &mut Self
Port is the port number on which this service registration is bound. It is determined by a combination of factors on the client.
pub fn create_index(&mut self, value: u64) -> &mut Self
pub fn modify_index(&mut self, value: u64) -> &mut Self
Sourcepub fn id(&mut self, value: String) -> &mut Self
pub fn id(&mut self, value: String) -> &mut Self
ID is the unique identifier for this registration. It currently follows the Consul service registration format to provide consistency between the two solutions.
Sourcepub fn datacenter(&mut self, value: String) -> &mut Self
pub fn datacenter(&mut self, value: String) -> &mut Self
Datacenter is the DC identifier of the node as identified by Node.Datacenter.
Sourcepub fn job_id(&mut self, value: String) -> &mut Self
pub fn job_id(&mut self, value: String) -> &mut Self
JobID is Job.ID and represents the job which contained the service block which resulted in this service registration.
Sourcepub fn alloc_id(&mut self, value: String) -> &mut Self
pub fn alloc_id(&mut self, value: String) -> &mut Self
AllocID is Allocation.ID and represents the allocation within which this service is running.
Sourcepub fn build(
&self,
) -> Result<ServiceRegistration, ServiceRegistrationBuilderError>
pub fn build( &self, ) -> Result<ServiceRegistration, ServiceRegistrationBuilderError>
Trait Implementations§
Source§impl Clone for ServiceRegistrationBuilder
impl Clone for ServiceRegistrationBuilder
Source§fn clone(&self) -> ServiceRegistrationBuilder
fn clone(&self) -> ServiceRegistrationBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more