2023-08-01 20:39:25 +02:00
|
|
|
|
// // Copyright (c) Vector Informatik GmbH. All rights reserved.
|
|
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Threading;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using K8sFileBrowser.Models;
|
|
|
|
|
|
|
|
|
|
|
|
namespace K8sFileBrowser.Services;
|
|
|
|
|
|
|
|
|
|
|
|
public interface IKubernetesService
|
|
|
|
|
|
{
|
|
|
|
|
|
IEnumerable<ClusterContext> GetClusterContexts();
|
|
|
|
|
|
string GetCurrentContext();
|
|
|
|
|
|
void SwitchClusterContext(ClusterContext clusterContext);
|
2023-08-04 01:08:02 +02:00
|
|
|
|
Task<IEnumerable<Namespace>> GetNamespacesAsync();
|
|
|
|
|
|
Task<IEnumerable<Pod>> GetPodsAsync(string namespaceName, CancellationToken cancellationToken = default);
|
2023-08-01 20:39:25 +02:00
|
|
|
|
IList<FileInformation> GetFiles(string namespaceName, string podName, string containerName, string path);
|
2023-08-07 22:00:27 +02:00
|
|
|
|
Task DownloadFile(Namespace? selectedNamespace, Pod? selectedPod, Container? selectedContainer, FileInformation selectedFile,
|
2023-08-01 20:39:25 +02:00
|
|
|
|
string? saveFileName, CancellationToken cancellationToken = default);
|
2023-08-07 22:00:27 +02:00
|
|
|
|
Task DownloadLog(Namespace? selectedNamespace, Pod? selectedPod, Container? selectedContainer,
|
2023-08-01 22:09:47 +02:00
|
|
|
|
string? saveFileName, CancellationToken cancellationToken = default);
|
|
|
|
|
|
|
2023-08-01 20:39:25 +02:00
|
|
|
|
}
|