{"id":16284628,"url":"https://github.com/zachallaun/async-pipeline","last_synced_at":"2025-10-24T00:27:00.965Z","repository":{"id":10046009,"uuid":"12092978","full_name":"zachallaun/async-pipeline","owner":"zachallaun","description":null,"archived":false,"fork":false,"pushed_at":"2013-08-13T21:14:28.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T18:49:11.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zachallaun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-13T21:05:48.000Z","updated_at":"2013-12-09T20:47:45.000Z","dependencies_parsed_at":"2022-09-17T04:22:22.303Z","dependency_job_id":null,"html_url":"https://github.com/zachallaun/async-pipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachallaun%2Fasync-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachallaun%2Fasync-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachallaun%2Fasync-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zachallaun%2Fasync-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zachallaun","download_url":"https://codeload.github.com/zachallaun/async-pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947859,"owners_count":21023066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T19:20:05.671Z","updated_at":"2025-10-24T00:26:55.941Z","avatar_url":"https://github.com/zachallaun.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-pipeline\n\nA small library for creating `clojure.core.async` process pipelines.\n\n_Inspired by [Messaging as a Programming Model](http://eventuallyconsistent.net/2013/08/12/messaging-as-a-programming-model-part-1/)._\n\n```clj\n(require '[clojure.core.async :as async :refer [\u003e! \u003c!]]\n         '[async-pipeline :refer [pipeline go-try]])\n\n(defn filter-valid-credentials\n  [in out]\n  (go-try\n    (loop []\n      (when-recv [{:keys [username password] :as msg} (\u003c! in)]\n        (if (valid-credentials? username password)\n          (do (\u003e! out msg)\n              (recur))\n          [:error :invalid-credentials msg])))))\n\n(defn filter-api-key-enabled\n  [in out]\n  (go-try\n    (loop []\n      (when-recv [{:keys [api-key] :as msg} (\u003c! in)]\n        (if-let [details (api-details api-key)]\n          (do (\u003e! out (assoc msg :api-details details))\n              (recur))\n          [:error :invalid-api-key msg])))))\n\n(defn get-user-info\n  [in out]\n  (go-try\n    (loop []\n      (when-recv [{:keys [username api-details] :as msg} (\u003c! in)]\n        (\u003e! out (assoc msg :user-info (user-info-for username api-details)))\n        (recur)))))\n\n(def login-pipeline\n  (pipeline async/chan\n    filter-valid-credentials\n    filter-api-key-enabled\n    get-user-info))\n\n(let [[in out err ctrl] login-pipeline]\n  (forward-login-requests in)\n  (handle-login-errors err)\n  (respond-with-details out)\n\n  (async/put! in {:username \"zach\" :password \"p@$$w04d\"}))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachallaun%2Fasync-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzachallaun%2Fasync-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzachallaun%2Fasync-pipeline/lists"}