Package com.google.cloud.tools.jib.api
Interface CredentialRetriever
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CredentialRetriever
Retrieves credentials for a registry.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Optional<Credential>
retrieve()
Fetches the credentials.
-
-
-
Method Detail
-
retrieve
java.util.Optional<Credential> retrieve() throws CredentialRetrievalException
Fetches the credentials. Implementations must be thread-safe.Implementations should return
Optional.empty()
if no credentials could be fetched with thisCredentialRetriever
(and so other credential retrieval methods may be tried), or throw an exception something went wrong when fetching the credentials.- Returns:
- the fetched credentials or
Optional.empty()
if no credentials could be fetched with this provider - Throws:
CredentialRetrievalException
- if the credential retrieval encountered an exception
-
-