{"id":20754413,"url":"https://github.com/diced/hiven-gw","last_synced_at":"2025-05-11T06:31:01.860Z","repository":{"id":56259783,"uuid":"313521097","full_name":"diced/hiven-gw","owner":"diced","description":"Useful for microservicing Hiven bots (please contribute lmao)","archived":false,"fork":false,"pushed_at":"2020-11-19T03:01:40.000Z","size":46,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-04T02:34:00.332Z","etag":null,"topics":["gateway","go","hiven","hivenapp","microsservices"],"latest_commit_sha":null,"homepage":"","language":"Go","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/diced.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":"2020-11-17T05:55:08.000Z","updated_at":"2021-06-15T19:46:23.000Z","dependencies_parsed_at":"2022-08-15T15:31:46.995Z","dependency_job_id":null,"html_url":"https://github.com/diced/hiven-gw","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diced%2Fhiven-gw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diced%2Fhiven-gw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diced%2Fhiven-gw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diced%2Fhiven-gw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diced","download_url":"https://codeload.github.com/diced/hiven-gw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225018936,"owners_count":17407970,"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":["gateway","go","hiven","hivenapp","microsservices"],"created_at":"2024-11-17T09:17:32.710Z","updated_at":"2024-11-17T09:17:33.298Z","avatar_url":"https://github.com/diced.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hiven-gw\n\nThis can be useful for microservicing hiven bots.\n\n# how 2 use\n\nIn order to accomplish 0 loss on messages, hiven-gw uses `RPUSH` and `BLPOP` in redis.\nNow create a `.env` and put the contents in\n\n```bash\nTOKEN=\"your hiven token (found in localStorage)\"\nREDIS=\"localhost:6379\"\nLIST=\"gateway\"\nDISABLED_EVENTS=\"TYPING_START\" # comma separeted list of disabled events (will not push to redis)\nZLIB=true # enable if you would like to recieve compressed zlib from hiven\nDEBUG=true # enable if you want to recieve debug msgs (op, hb)\n```\n\nThen you will need to build hiven-gw by doing `go build`\nNow you can run the executable it creates: `./hivengw`\n\n# recieving\n\nYou can run `BLPOP gateway 0` in redis to get data. You can do a while loop that does that command.\n\n# fetching gateway runtime stats\n\nGateway runtime stats are sent every 30 seconds to the configured list (e.g. `gateway`) (on every heartbeat). The payload will look like this:\n_Note: stats event can't be disabled with DISABLED_EVENTS_\n\n```js\n{\n  \"e\": \"stats\",\n  \"stats\": {\n    Alloc: 17310048,\n    ...otherstats\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiced%2Fhiven-gw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiced%2Fhiven-gw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiced%2Fhiven-gw/lists"}