Improved comments. Started implementing docker components and other base components. Updated dependencies
This commit is contained in:
@@ -7,7 +7,7 @@ public interface IConsole : IServerComponent
|
||||
/// would write into the containers standard input.
|
||||
/// <remarks>This method does not add a newline separator at the end of the content. The caller needs to add this themselves if required</remarks>
|
||||
/// </summary>
|
||||
/// <param name="content">The content to write</param>
|
||||
/// <param name="content">Content to write</param>
|
||||
/// <returns></returns>
|
||||
public Task WriteStdInAsync(string content);
|
||||
/// <summary>
|
||||
@@ -15,17 +15,9 @@ public interface IConsole : IServerComponent
|
||||
/// would write into the containers standard output.
|
||||
/// <remarks>This method does not add a newline separator at the end of the content. The caller needs to add this themselves if required</remarks>
|
||||
/// </summary>
|
||||
/// <param name="content">The content to write</param>
|
||||
/// <param name="content">Content to write</param>
|
||||
/// <returns></returns>
|
||||
public Task WriteStdOutAsync(string content);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a system message to the standard output with the moonlight console prefix
|
||||
/// <remarks>This method *does* add the newline separator at the end</remarks>
|
||||
/// </summary>
|
||||
/// <param name="content">The content to write into the standard output</param>
|
||||
/// <returns></returns>
|
||||
public Task WriteMoonlightAsync(string content);
|
||||
|
||||
/// <summary>
|
||||
/// Attaches the console to the runtime environment
|
||||
@@ -60,7 +52,7 @@ public interface IConsole : IServerComponent
|
||||
/// <summary>
|
||||
/// Gets the content from the standard output cache
|
||||
/// </summary>
|
||||
/// <returns>The content from the cache</returns>
|
||||
/// <returns>Content from the cache</returns>
|
||||
public Task<IEnumerable<string>> GetCacheAsync();
|
||||
|
||||
/// <summary>
|
||||
@@ -68,5 +60,5 @@ public interface IConsole : IServerComponent
|
||||
/// </summary>
|
||||
/// <param name="callback">Callback which will be invoked whenever a new line is received</param>
|
||||
/// <returns>Subscription disposable to unsubscribe from the event</returns>
|
||||
public Task<IAsyncDisposable> SubscribeStdOutAsync(Func<string, Task> callback);
|
||||
public Task<IAsyncDisposable> SubscribeStdOutAsync(Func<string, ValueTask> callback);
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using MoonlightServers.DaemonShared.PanelSide.Http.Responses;
|
||||
|
||||
namespace MoonlightServers.Daemon.ServerSystem.Interfaces;
|
||||
|
||||
public interface IInstallation : IServerComponent
|
||||
@@ -11,10 +13,11 @@ public interface IInstallation : IServerComponent
|
||||
/// <summary>
|
||||
/// Creates the installation environment
|
||||
/// </summary>
|
||||
/// <param name="runtimePath">The host path of the runtime storage location</param>
|
||||
/// <param name="hostPath">The host path of the installation file system</param>
|
||||
/// <param name="runtimePath">Host path of the runtime storage location</param>
|
||||
/// <param name="hostPath">Host path of the installation file system</param>
|
||||
/// <param name="data">Installation data for the server</param>
|
||||
/// <returns></returns>
|
||||
public Task CreateAsync(string runtimePath, string hostPath);
|
||||
public Task CreateAsync(string runtimePath, string hostPath, ServerInstallDataResponse data);
|
||||
|
||||
/// <summary>
|
||||
/// Starts the installation
|
||||
@@ -37,9 +40,9 @@ public interface IInstallation : IServerComponent
|
||||
/// <summary>
|
||||
/// Subscribes to the event when the installation exists
|
||||
/// </summary>
|
||||
/// <param name="callback">The callback to invoke whenever the installation exists</param>
|
||||
/// <param name="callback">Callback to invoke whenever the installation exists</param>
|
||||
/// <returns>Subscription disposable to unsubscribe from the event</returns>
|
||||
public Task<IAsyncDisposable> SubscribeExited(Func<int, Task> callback);
|
||||
public Task<IAsyncDisposable> SubscribeExited(Func<int, ValueTask> callback);
|
||||
|
||||
/// <summary>
|
||||
/// Connects an existing installation to this abstraction in order to restore it.
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface IOnlineDetector : IServerComponent
|
||||
/// <summary>
|
||||
/// Handles the detection of the online state based on the received output
|
||||
/// </summary>
|
||||
/// <param name="line">The excerpt of the output</param>
|
||||
/// <param name="line">Excerpt of the output</param>
|
||||
/// <returns>True if the detection showed that the server is online. False if the detection didnt find anything</returns>
|
||||
public Task<bool> HandleOutputAsync(string line);
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ public interface IReporter : IServerComponent
|
||||
/// <summary>
|
||||
/// Writes both in the server logs as well in the server console the provided message as a status update
|
||||
/// </summary>
|
||||
/// <param name="message">The message to write</param>
|
||||
/// <param name="message">Message to write</param>
|
||||
/// <returns></returns>
|
||||
public Task StatusAsync(string message);
|
||||
|
||||
/// <summary>
|
||||
/// Writes both in the server logs as well in the server console the provided message as an error
|
||||
/// </summary>
|
||||
/// <param name="message">The message to write</param>
|
||||
/// <param name="message">Message to write</param>
|
||||
/// <returns></returns>
|
||||
public Task ErrorAsync(string message);
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public interface IRuntime : IServerComponent
|
||||
/// <summary>
|
||||
/// Creates the runtime with the specified path as the storage path where the server files should be stored in
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="path">Path where the server files are located</param>
|
||||
/// <returns></returns>
|
||||
public Task CreateAsync(string path);
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface IRuntime : IServerComponent
|
||||
/// <summary>
|
||||
/// This subscribes to the exited event of the runtime
|
||||
/// </summary>
|
||||
/// <param name="callback">The callback gets invoked whenever the runtime exites</param>
|
||||
/// <param name="callback">Callback gets invoked whenever the runtime exites</param>
|
||||
/// <returns>Subscription disposable to unsubscribe from the event</returns>
|
||||
public Task<IAsyncDisposable> SubscribeExited(Func<int, Task> callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user