{"id":29097395,"url":"https://github.com/lambdaisland/funnel-client","last_synced_at":"2025-09-12T21:41:26.271Z","repository":{"id":57713545,"uuid":"274644391","full_name":"lambdaisland/funnel-client","owner":"lambdaisland","description":"Websocket client for Funnel + examples","archived":false,"fork":false,"pushed_at":"2023-03-28T02:42:22.000Z","size":51,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-23T12:22:14.681Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lambdaisland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-06-24T10:47:08.000Z","updated_at":"2025-05-01T13:53:10.000Z","dependencies_parsed_at":"2024-04-23T08:49:35.472Z","dependency_job_id":"df7a9486-d20b-4e64-9a69-76602d8d0f93","html_url":"https://github.com/lambdaisland/funnel-client","commit_stats":{"total_commits":28,"total_committers":5,"mean_commits":5.6,"dds":0.2142857142857143,"last_synced_commit":"2f02907bb006c62580978653f1dcc9a7b0512de2"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lambdaisland/funnel-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Ffunnel-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Ffunnel-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Ffunnel-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Ffunnel-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdaisland","download_url":"https://codeload.github.com/lambdaisland/funnel-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdaisland%2Ffunnel-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274880494,"owners_count":25367105,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-06-28T13:42:08.381Z","updated_at":"2025-09-12T21:41:26.186Z","avatar_url":"https://github.com/lambdaisland.png","language":"Clojure","funding_links":["http://opencollective.com/lambda-island"],"categories":[],"sub_categories":[],"readme":"# funnel-client\n\n\u003c!-- badges --\u003e\n[![cljdoc badge](https://cljdoc.org/badge/com.lambdaisland/funnel-client)](https://cljdoc.org/d/com.lambdaisland/funnel-client) [![Clojars Project](https://img.shields.io/clojars/v/com.lambdaisland/funnel-client.svg)](https://clojars.org/com.lambdaisland/funnel-client)\n\u003c!-- /badges --\u003e\n\nClojure and ClojureScript client libraries for [Funnel](https://github.com/lambdaisland/funnel)\n\n\u003c!-- opencollective --\u003e\n## Lambda Island Open Source\n\n\u003cimg align=\"left\" src=\"https://github.com/lambdaisland/open-source/raw/master/artwork/lighthouse_readme.png\"\u003e\n\n\u0026nbsp;\n\nfunnel-client is part of a growing collection of quality Clojure libraries created and maintained\nby the fine folks at [Gaiwan](https://gaiwan.co).\n\nPay it forward by [becoming a backer on our Open Collective](http://opencollective.com/lambda-island),\nso that we may continue to enjoy a thriving Clojure ecosystem.\n\nYou can find an overview of our projects at [lambdaisland/open-source](https://github.com/lambdaisland/open-source).\n\n\u0026nbsp;\n\n\u0026nbsp;\n\u003c!-- /opencollective --\u003e\n\n\u003c!-- installation --\u003e\n## Installation\n\nTo use the latest release, add the following to your `deps.edn` ([Clojure CLI](https://clojure.org/guides/deps_and_cli))\n\n```\ncom.lambdaisland/funnel-client {:mvn/version \"0.0.28\"}\n```\n\nor add the following to your `project.clj` ([Leiningen](https://leiningen.org/))\n\n```\n[com.lambdaisland/funnel-client \"0.0.28\"]\n```\n\u003c!-- /installation --\u003e\n\n## Rationale\n\nTo use Funnel all you need is a websocket connection and a way to read and write\nTransit. As such we originally envisaged people would use their websocket\nconnection of choice to connect to Funnel directly.\n\nTo reduce the boilerplate that people have to write, and to encode some best\npractice patterns, we decided to make these clients available. There's a Clojure\nand a ClojureScript client, which both implement the same high level API, to the\nextent possible, providing that they sit upon very different websocket\nimplementations and platforms.\n\n## Usage\n\nAt it simplest all you need is:\n\n``` clojure\n\n(require '[lambdaisland.funnel-client :as funnel-client])\n\n(def conn (funnel-client/connect {:on-message prn}))\n\n;; query funnel to get the whoami map of every connected client\n(funnel-client/send conn {:funnel/query true})\n```\n\nSee the [Funnel README](https://github.com/lambdaisland/funnel) to understand\nhow to use the Funnel protocol.\n\n`connect` takes the following options\n\n- `:uri` defaults to `ws://localhost:44220`, or if using the ClojureScript client and the current origin is https, then it will use `wss` (SSL)\n- `:on-open` / `:on-error` / `:on-close` / `:on-message` callbacks, these all take two arguments, the connection itself, and a handshake/error/message\n- `:whoami` map or atom containing the Funnel whoami map. If omitted will use the `funnel-client/whoami` global atom.\n\nIf using an atom as a `:whoami` then changing the contents of the atom will\nautomatically re-announce the identifying information to Funnel.\n\n### Exclusions\n\nIf you only use one of the two clients, you may want to exclude the dependencies needed for the other client.\n\nFor ClojureScript we pull in\n\n- `com.cognitect/transit-cljs`\n- `lambdaisland/glogi`\n\nOn Clojure we make use of\n\n- `io.pedestal/pedestal.log`\n- `org.java-websocket/Java-WebSocket`\n- `com.cognitect/transit-clj`\n\n\u003c!-- contributing --\u003e\n## Contributing\n\nEveryone has a right to submit patches to funnel-client, and thus become a contributor.\n\nContributors MUST\n\n- adhere to the [LambdaIsland Clojure Style Guide](https://nextjournal.com/lambdaisland/clojure-style-guide)\n- write patches that solve a problem. Start by stating the problem, then supply a minimal solution. `*`\n- agree to license their contributions as MPL 2.0.\n- not break the contract with downstream consumers. `**`\n- not break the tests.\n\nContributors SHOULD\n\n- update the CHANGELOG and README.\n- add tests for new functionality.\n\nIf you submit a pull request that adheres to these rules, then it will almost\ncertainly be merged immediately. However some things may require more\nconsideration. If you add new dependencies, or significantly increase the API\nsurface, then we need to decide if these changes are in line with the project's\ngoals. In this case you can start by [writing a pitch](https://nextjournal.com/lambdaisland/pitch-template),\nand collecting feedback on it.\n\n`*` This goes for features too, a feature needs to solve a problem. State the problem it solves, then supply a minimal solution.\n\n`**` As long as this project has not seen a public release (i.e. is not on Clojars)\nwe may still consider making breaking changes, if there is consensus that the\nchanges are justified.\n\u003c!-- /contributing --\u003e\n\n\u003c!-- license --\u003e\n## License\n\nCopyright \u0026copy; 2020-2021 Arne Brasseur and Contributors\n\nLicensed under the term of the Mozilla Public License 2.0, see LICENSE.\n\u003c!-- /license --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Ffunnel-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdaisland%2Ffunnel-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaisland%2Ffunnel-client/lists"}