Created
July 9, 2019 21:32
-
-
Save prismofeverything/89867b6d9b1346a71e424041f26261e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn logs-seq | |
"Convert a docker-client ^LogStream to a seq of lines." | |
[logs] | |
(let [it (iterator-seq logs) | |
content (map #(.content ^LogMessage %) it) | |
stream (bytes/to-input-stream content) | |
reader (io/reader stream)] | |
(line-seq reader))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment