Search Results for

    Show / Hide Table of Contents

    Class PluginHost

    Owns the per-route .NET plugins of one configuration: one collectible AssemblyLoadContext per plugin, one instance of its class, and the isolation wrapper (exception, timeout, metrics) that routes call. A reload builds a new host, swaps it in, and retires the old one, which disposes every plugin and unloads every context.

    Inheritance
    object
    PluginHost
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Titanium.Web.Proxy.Plugins
    Assembly: Titanium.Web.Proxy.dll
    Syntax
    public sealed class PluginHost : IDisposable

    Properties

    | Edit this page View Source

    IsDisposed

    True once every plugin was disposed and every context unloaded.

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

    LoadContexts

    Weak handles to the load contexts, so a test or an operator can confirm the runtime reclaimed them.

    Declaration
    public IReadOnlyList<WeakReference> LoadContexts { get; }
    Property Value
    Type Description
    IReadOnlyList<WeakReference>
    | Edit this page View Source

    Plugins

    The plugins by configured name, for ReverseProxyOptions.RoutePlugins.

    Declaration
    public IReadOnlyDictionary<string, IProxyMiddleware> Plugins { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, IProxyMiddleware>

    Methods

    | Edit this page View Source

    CanFilterStreams(string)

    True when the loaded script plugin name can run as an L4 stream filter.

    Declaration
    public bool CanFilterStreams(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    bool
    | Edit this page View Source

    Dispose()

    Disposes every plugin that is disposable and unloads every load context. Safe to call twice.

    Declaration
    public void Dispose()
    | Edit this page View Source

    GetScriptHost(string)

    The script plugin name as a listener-wide script host, for ReverseProxyOptions.ScriptPipeline (alone, or with others in a chain). Every call is counted against this host, so a reload retires it only after the calls in flight finish. Returns null when no loaded plugin of that name runs HTTP phases.

    Declaration
    public IScriptPhaseHost? GetScriptHost(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    IScriptPhaseHost
    | Edit this page View Source

    Load(IEnumerable<PluginConfig>?, ILogger?)

    Loads every plugin. Nothing is kept when one fails: the contexts loaded so far are unloaded and the exception names the plugin and the reason.

    Declaration
    public static PluginHost Load(IEnumerable<PluginConfig>? configs, ILogger? logger = null)
    Parameters
    Type Name Description
    IEnumerable<PluginConfig> configs
    ILogger logger
    Returns
    Type Description
    PluginHost
    | Edit this page View Source

    Retire()

    Stops new work from being counted against this host and disposes it once the calls in flight finish.

    Declaration
    public void Retire()

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX