public interface HealthCheck
-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<HealthCheck>default Stream<DiagnosticResult>check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, ExecutorService executor) Invokes the health check on a background thread scheduled using the given executor service.voidcheck(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, Consumer<DiagnosticResult> resultCollector) Checks the vault at the given path.default Stringname()
-
Method Details
-
allChecks
- Returns:
- All known health checks
-
name
- Returns:
- A human-readable name for this check
-
check
void check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, Consumer<DiagnosticResult> resultCollector) Checks the vault at the given path.- Parameters:
pathToVault- Path to the vault's root directoryconfig- The parsed and verified vault configmasterkey- The masterkeycryptor- A cryptor initialized for this vaultresultCollector- Callback called for each result.
-
check
default Stream<DiagnosticResult> check(Path pathToVault, VaultConfig config, org.cryptomator.cryptolib.api.Masterkey masterkey, org.cryptomator.cryptolib.api.Cryptor cryptor, ExecutorService executor) Invokes the health check on a background thread scheduled using the given executor service. The results will be streamed. If the stream getsclosedbefore it terminates, an attempt is made to cancel the health check.The check blocks if the stream is not consumed
- Parameters:
pathToVault- Path to the vault's root directoryconfig- The parsed and verified vault configmasterkey- The masterkeycryptor- A cryptor initialized for this vaultexecutor- An executor service to run the health check- Returns:
- A lazily filled stream of diagnostic results.
-