Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    Lookup
    Implements
    INoSerializationVerificationNeeded
    IEquatable<Lookup>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Akka.Discovery
    Assembly: Akka.Discovery.dll
    Syntax
    public class Lookup : INoSerializationVerificationNeeded, IEquatable<Lookup>

    Constructors

    | Edit this page View Source

    Lookup(string, string, string)

    Create a service Lookup with serviceName, optional portName and optional protocol. Use WithPortName(string) and WithProtocol(string) to provide optional portName and protocol.

    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

    | Edit this page View Source

    PortName

    Declaration
    public string PortName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Protocol

    Declaration
    public string Protocol { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ServiceName

    Declaration
    public string ServiceName { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Copy(string, string, string)

    Declaration
    public Lookup Copy(string serviceName = null, string portName = null, string protocol = null)
    Parameters
    Type Name Description
    string serviceName
    string portName
    string protocol
    Returns
    Type Description
    Lookup
    | Edit this page View Source

    Equals(Lookup)

    Declaration
    public bool Equals(Lookup other)
    Parameters
    Type Name Description
    Lookup other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page 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
    Type Description
    bool
    | Edit this page 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
    Type Description
    Lookup
    Exceptions
    Type Condition
    ArgumentNullException

    If the passed string is null.

    ArgumentException

    If the string does not conform with the SRV format.

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page 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
    Type Description
    Lookup
    | Edit this page 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
    Type Description
    Lookup

    Implements

    INoSerializationVerificationNeeded
    IEquatable<T>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET