// Copyright Epic Games, Inc. All Rights Reserved. using EpicGames.UBA.Impl; namespace EpicGames.UBA { /// /// Information needed to create a storage server /// /// The root directory for the storage /// The capacity of the storage in bytes /// If the storage should be stored as compressed /// The geographical zone this machine belongs to. Can be empty public readonly struct StorageServerCreateInfo(string rootDirectory, ulong capacityBytes, bool storeCompressed, string zone) { /// /// The root directory for the storage /// public string RootDirectory { get; } = rootDirectory; /// /// The capacity of the storage in bytes /// public ulong CapacityBytes { get; } = capacityBytes; /// /// If the storage should be stored as compressed /// public bool StoreCompressed { get; } = storeCompressed; /// /// The geographical zone this machine belongs to. Can be empty /// public string Zone { get; } = zone; } /// /// Base interface for a storage server instance /// public interface IStorageServer : IBaseInterface { /// /// Save tge content addressable storage table /// public abstract void SaveCasTable(); /// /// Register disallowed paths for clients to download /// public abstract void RegisterDisallowedPath(string path); /// /// Create a IStorageServer object /// /// The server /// The logger /// The storage create info /// The IStorageServer public static IStorageServer CreateStorageServer(IServer server, ILogger logger, StorageServerCreateInfo info) { return new StorageServerImpl(server, logger, info); } } }