Class ConsulRegistration
The registration to be used when registering with the Consul server
Inheritance
System.Object
ConsulRegistration
Namespace: Steeltoe.Discovery.Consul.Registry
Assembly: Steeltoe.Discovery.Consul.dll
Syntax
public class ConsulRegistration : object, IConsulRegistration
Constructors
| Edit this page View SourceConsulRegistration(AgentServiceRegistration, IOptionsMonitor<ConsulDiscoveryOptions>)
Initializes a new instance of the ConsulRegistration class.
Declaration
public ConsulRegistration(AgentServiceRegistration agentServiceRegistration, IOptionsMonitor<ConsulDiscoveryOptions> optionsMonitor)
Parameters
Type | Name | Description |
---|---|---|
AgentServiceRegistration | agentServiceRegistration | a Consul service registration to use |
IOptionsMonitor<ConsulDiscoveryOptions> | optionsMonitor | configuration options |
ConsulRegistration(AgentServiceRegistration, ConsulDiscoveryOptions)
Initializes a new instance of the ConsulRegistration class.
Declaration
public ConsulRegistration(AgentServiceRegistration agentServiceRegistration, ConsulDiscoveryOptions options)
Parameters
Type | Name | Description |
---|---|---|
AgentServiceRegistration | agentServiceRegistration | a Consul service registration to use |
ConsulDiscoveryOptions | options | configuration options |
Properties
| Edit this page View SourceHost
Declaration
public string Host { get; }
Property Value
Type | Description |
---|---|
System.String |
InstanceId
Gets the instance id to use for registration
Declaration
public string InstanceId { get; }
Property Value
Type | Description |
---|---|
System.String |
IsSecure
Declaration
public bool IsSecure { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Metadata
Declaration
public IDictionary<string, string> Metadata { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.String> |
Port
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Service
Gets the Consul service registration
Declaration
public AgentServiceRegistration Service { get; }
Property Value
Type | Description |
---|---|
AgentServiceRegistration |
ServiceId
Declaration
public string ServiceId { get; }
Property Value
Type | Description |
---|---|
System.String |
Tags
Declaration
public string[] Tags { get; }
Property Value
Type | Description |
---|---|
System.String[] |
Uri
Declaration
public Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
Methods
| Edit this page View SourceCreateRegistration(ConsulDiscoveryOptions, IApplicationInstanceInfo)
Create a Consul registration
Declaration
public static ConsulRegistration CreateRegistration(ConsulDiscoveryOptions options, IApplicationInstanceInfo applicationInfo)
Parameters
Type | Name | Description |
---|---|---|
ConsulDiscoveryOptions | options | configuration options to use |
IApplicationInstanceInfo | applicationInfo | Info about this app instance |
Returns
Type | Description |
---|---|
ConsulRegistration | a registration |
Implements
IServiceInstance