using MxGateway.Contracts.Proto;
using MxGateway.Contracts.Proto.Galaxy;
namespace MxGateway.Client.Cli;
public interface IMxGatewayCliClient : IAsyncDisposable
{
///
/// Opens a new gateway session.
///
/// Session open request.
/// Cancellation token for the operation.
/// The session open reply.
Task OpenSessionAsync(
OpenSessionRequest request,
CancellationToken cancellationToken);
///
/// Closes an open gateway session.
///
/// Session close request.
/// Cancellation token for the operation.
/// The session close reply.
Task CloseSessionAsync(
CloseSessionRequest request,
CancellationToken cancellationToken);
///
/// Invokes an MXAccess command on the session.
///
/// The command request.
/// Cancellation token for the operation.
/// The command reply.
Task InvokeAsync(
MxCommandRequest request,
CancellationToken cancellationToken);
///
/// Streams events from the gateway session.
///
/// The stream events request.
/// Cancellation token for the operation.
/// An async enumerable of events.
IAsyncEnumerable StreamEventsAsync(
StreamEventsRequest request,
CancellationToken cancellationToken);
///
/// Tests connection to the Galaxy Repository.
///
/// The connection test request.
/// Cancellation token for the operation.
/// The connection test reply.
Task GalaxyTestConnectionAsync(
TestConnectionRequest request,
CancellationToken cancellationToken);
///
/// Gets the last deployment time from the Galaxy Repository.
///
/// The last deploy time request.
/// Cancellation token for the operation.
/// The last deploy time reply.
Task GalaxyGetLastDeployTimeAsync(
GetLastDeployTimeRequest request,
CancellationToken cancellationToken);
///
/// Discovers the Galaxy Repository hierarchy.
///
/// The discover hierarchy request.
/// Cancellation token for the operation.
/// The discover hierarchy reply.
Task GalaxyDiscoverHierarchyAsync(
DiscoverHierarchyRequest request,
CancellationToken cancellationToken);
///
/// Watches for deployment events from the Galaxy Repository.
///
/// The watch deploy events request.
/// Cancellation token for the operation.
/// An async enumerable of deployment events.
IAsyncEnumerable GalaxyWatchDeployEventsAsync(
WatchDeployEventsRequest request,
CancellationToken cancellationToken);
}