Search Results for

    Show / Hide Table of Contents

    Class ClusterManager

    Thread-safe cluster manager. Snapshot swaps use compare-and-swap; in-flight sessions keep the previous snapshot reference.

    Inheritance
    object
    ClusterManager
    Implements
    IClusterManager
    IDestinationHealthEvents
    IAsyncDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Titanium.Web.Proxy.Clusters
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public sealed class ClusterManager : IClusterManager, IDestinationHealthEvents, IAsyncDisposable

    Constructors

    | Edit this page View Source

    ClusterManager()

    Declaration
    public ClusterManager()

    Properties

    | Edit this page View Source

    ActiveHealthProbeProvider

    Active probes for healthCheck.active. When this is null, healthCheck.active stays inactive: core refreshes DNS and leaves destination health to passive checks and other callers. Assigning a provider reconciles the clusters already applied and starts a probe for each one whose active check is enabled. Titanium Plus assigns a provider when the Plus module loads.

    Declaration
    public IActiveHealthProbeProvider? ActiveHealthProbeProvider { get; set; }
    Property Value
    Type Description
    IActiveHealthProbeProvider
    | Edit this page View Source

    LocalZone

    Data-plane availability zone for zone-aware clusters. Empty disables zone filtering.

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

    Snapshot

    Declaration
    public ImmutableClusterSnapshot Snapshot { get; }
    Property Value
    Type Description
    ImmutableClusterSnapshot

    Methods

    | Edit this page View Source

    ApplyAsync(IReadOnlyList<ClusterConfig>, CancellationToken)

    Declaration
    public ValueTask ApplyAsync(IReadOnlyList<ClusterConfig> clusters, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IReadOnlyList<ClusterConfig> clusters
    CancellationToken cancellationToken
    Returns
    Type Description
    ValueTask
    | Edit this page View Source

    ApplyCoreAsync(IReadOnlyList<ClusterConfig>, bool, CancellationToken)

    reconcileBackground is false for the temporary old-union-new apply during reload, so probers start or stop only on the final apply.

    Declaration
    public ValueTask ApplyCoreAsync(IReadOnlyList<ClusterConfig> clusters, bool reconcileBackground, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IReadOnlyList<ClusterConfig> clusters
    bool reconcileBackground
    CancellationToken cancellationToken
    Returns
    Type Description
    ValueTask
    | Edit this page View Source

    AttachHealthTracker(DestinationHealthTracker)

    Declaration
    public void AttachHealthTracker(DestinationHealthTracker tracker)
    Parameters
    Type Name Description
    DestinationHealthTracker tracker
    | Edit this page View Source

    DisposeAsync()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

    Declaration
    public ValueTask DisposeAsync()
    Returns
    Type Description
    ValueTask

    A task that represents the asynchronous dispose operation.

    | Edit this page View Source

    GetDestinationState(string)

    Declaration
    public DestinationState GetDestinationState(string destinationId)
    Parameters
    Type Name Description
    string destinationId
    Returns
    Type Description
    DestinationState
    | Edit this page View Source

    ReportHealthEvent(DestinationHealthEvent)

    Publishes an event on behalf of a component that decides health outside the manager (a circuit breaker).

    Declaration
    public void ReportHealthEvent(DestinationHealthEvent healthEvent)
    Parameters
    Type Name Description
    DestinationHealthEvent healthEvent
    | Edit this page View Source

    SetDestinationState(string, DestinationState)

    Declaration
    public void SetDestinationState(string destinationId, DestinationState state)
    Parameters
    Type Name Description
    string destinationId
    DestinationState state
    | Edit this page View Source

    TrySetDestinationState(string, DestinationState, DestinationState)

    Atomically changes destinationId from expected to next. Returns false when the current state is not expected. The default body is not atomic; ClusterManager overrides it with compare-and-swap.

    Declaration
    public bool TrySetDestinationState(string destinationId, DestinationState expected, DestinationState next)
    Parameters
    Type Name Description
    string destinationId
    DestinationState expected
    DestinationState next
    Returns
    Type Description
    bool

    Events

    | Edit this page View Source

    HealthEvent

    Raised when a destination is ejected, recovers, or fails an active probe. Handlers run on the thread that decided (a request, a probe round, or a circuit breaker), so they must be quick and must not throw.

    Declaration
    public event Action<DestinationHealthEvent>? HealthEvent
    Event Type
    Type Description
    Action<DestinationHealthEvent>

    Implements

    Titanium.Web.Proxy.Abstractions.Routing.IClusterManager
    Titanium.Web.Proxy.Abstractions.Plugins.IDestinationHealthEvents
    IAsyncDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX