FTPS file source implementing IFileSource, on Apache Commons Net.
Explicit TLS (AUTH TLS, then PBSZ 0 and PROT P so the data channel is encrypted too), passive mode, binary transfers. One connection per call. A transient failure is retried with backoff; a 5xx reply is not.
Usage: (def source (create-ftps-source {:host "ftp.example.org" :username "import" :password "secret"})) (ports/list-files! source "/outbox" {:match #".*.csv"})
FTPS file source implementing IFileSource, on Apache Commons Net.
Explicit TLS (AUTH TLS, then PBSZ 0 and PROT P so the data channel is
encrypted too), passive mode, binary transfers. One connection per call. A
transient failure is retried with backoff; a 5xx reply is not.
Usage:
(def source (create-ftps-source {:host "ftp.example.org"
:username "import"
:password "secret"}))
(ports/list-files! source "/outbox" {:match #".*\.csv"})(create-ftps-source
{:keys [host port username password timeout-ms max-attempts backoff-ms]
:or {port 21 timeout-ms 30000 max-attempts 3 backoff-ms 1000}
:as config})Create an FTPS file source.
Config keys: :host - server hostname (required); the certificate must name it :port - control port (default 21) :username, :password - login (required) :timeout-ms - connect, control and data read timeout (default 30000) :max-attempts - tries per operation (default 3) :backoff-ms - first retry delay, doubled per retry (default 1000) :trust-store - keystore file to trust instead of the JVM default :trust-store-password, :trust-store-type (default PKCS12) :cache - cache component; enables the circuit breaker :circuit-breaker - {:failure-threshold 5 :open-ms 30000}
Returns: FtpsFileSource implementing IFileSource
Create an FTPS file source.
Config keys:
:host - server hostname (required); the certificate must name it
:port - control port (default 21)
:username, :password - login (required)
:timeout-ms - connect, control and data read timeout (default 30000)
:max-attempts - tries per operation (default 3)
:backoff-ms - first retry delay, doubled per retry (default 1000)
:trust-store - keystore file to trust instead of the JVM default
:trust-store-password, :trust-store-type (default PKCS12)
:cache - cache component; enables the circuit breaker
:circuit-breaker - {:failure-threshold 5 :open-ms 30000}
Returns:
FtpsFileSource implementing IFileSourcecljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |