Class Lookup
A service lookup. It is up to each method to decide what to do with the optional portName and protocol fields.
For example portName
could be used to distinguish between Akka remoting ports and HTTP ports.
Assembly: Akka.Discovery.dll
Syntax
public class Lookup : INoSerializationVerificationNeeded, IEquatable<Lookup>
Constructors
|
Improve this Doc
View Source
Lookup(String, String, String)
Declaration
public Lookup(string serviceName, string portName = null, string protocol = null)
Parameters
Type |
Name |
Description |
String |
serviceName |
Must not be 'null' or an empty string
|
String |
portName |
Optional port name
|
String |
protocol |
Optional protocol
|
Properties
|
Improve this Doc
View Source
PortName
Declaration
public string PortName { get; }
Property Value
|
Improve this Doc
View Source
Protocol
Declaration
public string Protocol { get; }
Property Value
|
Improve this Doc
View Source
ServiceName
Declaration
public string ServiceName { get; }
Property Value
Methods
|
Improve this Doc
View Source
Copy(String, String, String)
Declaration
public Lookup Copy(string serviceName = null, string portName = null, string protocol = null)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Lookup)
Declaration
public bool Equals(Lookup other)
Parameters
Type |
Name |
Description |
Lookup |
other |
|
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Improve this Doc
View Source
IsValid(String)
Returns true if passed string conforms with SRV format. Otherwise returns false.
Declaration
public static bool IsValid(string srv)
Parameters
Type |
Name |
Description |
String |
srv |
|
Returns
|
Improve this Doc
View Source
ParseSrv(String)
Create a service Lookup from a string with format:
_portName._protocol.serviceName.
(as specified by https://www.ietf.org/rfc/rfc2782.txt)
If the passed string conforms with this format, a SRV Lookup is returned.
The serviceName part must be a valid domain name.
(as defined in https://tools.ietf.org/html/rfc1034)
The string is parsed and dismembered to build a Lookup as following:
Lookup(serviceName).WithPortName(portName).WithProtocol(protocol)
Declaration
public static Lookup ParseSrv(string srv)
Parameters
Type |
Name |
Description |
String |
srv |
|
Returns
Exceptions
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Improve this Doc
View Source
WithPortName(String)
Which port for a service e.g. Akka remoting or HTTP.
Maps to "service" for an SRV records.
Declaration
public Lookup WithPortName(string portName)
Parameters
Type |
Name |
Description |
String |
portName |
|
Returns
|
Improve this Doc
View Source
WithProtocol(String)
Which protocol e.g. TCP or UDP.
Maps to "protocol" for SRV records.
Declaration
public Lookup WithProtocol(string protocol)
Parameters
Type |
Name |
Description |
String |
protocol |
|
Returns
Implements
Extension Methods