From 72641b2f4154cec8b8c470ffcff456be31e6169d Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 14 Jan 2022 15:29:14 -0600 Subject: docs for group options --- src/slskd/Options.cs | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs index 467c4bec..e63a3b48 100644 --- a/src/slskd/Options.cs +++ b/src/slskd/Options.cs @@ -407,7 +407,7 @@ namespace slskd public class GlobalUploadOptions { /// - /// Gets the limit for the total number of queue slots. + /// Gets the limit for the total number of upload slots. /// [Argument(default, "upload-slots")] [EnvironmentVariable("UPLOAD_SLOTS")] @@ -423,28 +423,67 @@ namespace slskd /// public class GroupsOptions { + /// + /// Gets options for the default user group. + /// + [Validate] public BuiltInGroupOptions Default { get; init; } = new BuiltInGroupOptions(); - public BuiltInGroupOptions Leechers { get; init; } = new BuiltInGroupOptions(); + /// + /// Gets options for the leecher user group. + /// + [Validate] + public BuiltInGroupOptions Leechers { get; init; } = new BuiltInGroupOptions() { Upload = new GroupUploadOptions() { Priority = 99, Slots = 1 } }; + + /// + /// Built in user group options. + /// public class BuiltInGroupOptions { + /// + /// Gets upload options. + /// + [Validate] public GroupUploadOptions Upload { get; init; } = new GroupUploadOptions(); } + /// + /// User defined user group options. + /// public class UserDefinedGroupOptions { + /// + /// Gets upload options. + /// + [Validate] public GroupUploadOptions Upload { get; init; } = new GroupUploadOptions(); + + /// + /// Gets the list of group member usernames. + /// public string[] Members { get; init; } = Array.Empty(); } + /// + /// User group upload options. + /// public class GroupUploadOptions { + /// + /// Gets the priority of the group. + /// [Range(1, int.MaxValue)] - public int Priority { get; init; } + public int Priority { get; init; } = 1; + /// + /// Gets the queue strategy for the group. + /// [Enum(typeof(QueueStrategy))] - public string QueueStrategy { get; init; } = slskd.QueueStrategy.RoundRobin.ToString().ToLowerInvariant(); + public string Strategy { get; init; } = slskd.QueueStrategy.RoundRobin.ToString().ToLowerInvariant(); + /// + /// Gets the limit for the total number of upload slots for the group. + /// [Range(1, int.MaxValue)] public int Slots { get; init; } = 10; } -- cgit v1.2.3