{"id":21346920,"url":"https://github.com/queer/sigil","last_synced_at":"2025-08-04T12:05:57.250Z","repository":{"id":94882341,"uuid":"107769731","full_name":"queer/sigil","owner":"queer","description":"sigil application gateway / controller.","archived":false,"fork":false,"pushed_at":"2017-11-07T21:53:49.000Z","size":116,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-30T09:08:06.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/queer.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-21T10:02:39.000Z","updated_at":"2018-08-21T21:29:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"faf58428-10c8-4131-8730-f3b2c28b0d1e","html_url":"https://github.com/queer/sigil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/queer/sigil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Fsigil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Fsigil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Fsigil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Fsigil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/queer","download_url":"https://codeload.github.com/queer/sigil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/queer%2Fsigil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268693230,"owners_count":24291588,"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-08-04T02:00:09.867Z","response_time":79,"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":"2024-11-22T02:12:02.079Z","updated_at":"2025-08-04T12:05:57.166Z","avatar_url":"https://github.com/queer.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sigil\n\nSimple distributed gateway/controller. WIP\n\nTODO: Break dependency on etcd and use :riak_core instead.\n\n## Configuration\n\nThe following env. vars. are expected\n```\nETCD_URL=http://1.2.3.4:2379\n```\n\n## Gateway ops\n\nThe gateway supports the following operations:\n```\n0: HEARTBEAT\n{\n  op: 0,\n  d: {\n    id: \"1111-22-3-44444444\",\n    bot_name: \"memes\",\n    shard: 42\n  }\n}\n\n1: DISPATCH\n{\n  op: 1,\n  t: \"EVENT_TYPE\",\n  d: {\n    # whatever data goes here\n  }\n}\n\n2: BROADCAST_DISPATCH\n{\n  op: 2,\n  d: {\n    # whatever data goes here\n  }\n}\n```\n \nNote that with OP1, the `t` field is REQUIRED, and must be correctly handled by clients\n\n`DISPATCH` gateway events are sent with a type of `protocol:event`, ex. `discord:shard`\n\n`BROADCAST_DISPATCH` messages are meant for broadcasting to clients of a specific type; an opcode needs to be added for gateway-internal broadcasts\n\nAdditionally, the gateway expects the following channel-specific data when connecting:\n\n```\n# sigil:gateway:discord\n{\n  id: \"1234-whatever\",\n  # Allow us to differentiate between bots and have many bots hooked up to one gateway setup\n  bot_name: \"super-shiny-bot\"\n}\n```\n\nDiscord shard allocation looks something like:\n\n```\n{\n  op: 1,\n  t: \"discord:shard\",\n  d: {\n    bot_name: \"fancy bot\",\n    id: \"1-2-3-4\",\n    shard_count: 2\n  }\n}\n```\n\n## Commentary\n\n### This is Elixir, why are you not using nodes like a nice human?\n\nWhile it would be nice to be able to do that, I'm using websockets instead of Elixir node communication mainly just so that there's no *requirement* for parts of the stack being written in non-Elixir languages. Gateway nodes communicate with each other through `eden`, but external nodes use websockets. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueer%2Fsigil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqueer%2Fsigil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueer%2Fsigil/lists"}