Class GrpcChannelProvider

Namespace: ArmoniK.Api.Common.Channel.Utils
Assembly: ArmoniK.Api.Common.Channel.dll

Provides a built gRPC Channel from given options

[UsedImplicitly]
public sealed class GrpcChannelProvider : IAsyncDisposable

Inheritance

objectGrpcChannelProvider

Implements

IAsyncDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

GrpcChannelProvider(GrpcChannel, ILogger<GrpcChannelProvider>)

Instantiate a that creates a gRPC channel

public GrpcChannelProvider(GrpcChannel options, ILogger<GrpcChannelProvider> logger)

Parameters

options GrpcChannel

Options to configure the creation of the gRPC channel

logger ILogger<GrpcChannelProvider>

Logger that will produce logs

Exceptions

InvalidOperationException

when address is empty

Methods

DisposeAsync()

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

public ValueTask DisposeAsync()

Returns

ValueTask

A task that represents the asynchronous dispose operation.

Get()

Access to the created gRPC Channel

public ChannelBase Get()

Returns

ChannelBase

The created gRPC Channel

Exceptions

InvalidOperationException

when socket type is unknown