{"id":37142732,"url":"https://github.com/onsdigital/dis-redis","last_synced_at":"2026-01-14T16:44:59.558Z","repository":{"id":291770213,"uuid":"978724215","full_name":"ONSdigital/dis-redis","owner":"ONSdigital","description":"Dissemination client library for Redis or similar protocols.","archived":false,"fork":false,"pushed_at":"2025-06-28T06:23:53.000Z","size":158,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-28T07:28:56.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ONSdigital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T12:20:13.000Z","updated_at":"2025-06-12T11:39:52.000Z","dependencies_parsed_at":"2025-05-06T13:34:34.846Z","dependency_job_id":"c8610df6-be39-47ae-997d-67ef537bb559","html_url":"https://github.com/ONSdigital/dis-redis","commit_stats":null,"previous_names":["onsdigital/dis-redis"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ONSdigital/dis-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdis-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdis-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdis-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdis-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ONSdigital","download_url":"https://codeload.github.com/ONSdigital/dis-redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ONSdigital%2Fdis-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-14T16:44:58.867Z","updated_at":"2026-01-14T16:44:59.551Z","avatar_url":"https://github.com/ONSdigital.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dis-redis\n\nDissemination client library for Redis or similar protocols. This library can be considered a wrapper around go-redis.\n\n## redis package\n\nIncludes implementation of a health checker, that reuses the redis client to check requests can be made against the redis server.\n\n### Setup dis-redis client\n\n```golang\nimport disRedis \"github.com/ONSdigital/dis-redis\"\n\n...\n    redisClient, redisClientErr := disRedis.NewClient(ctx, \u0026disRedis.ClientConfig{\n        Address: cfg.redisURL\n    }\n    if redisClientErr != nil {\n        log.Fatal(ctx, \"Failed to create dis-redis client\", redisClientErr)\n    }\n...\n\n```\n\n### Health checker\n\nUsing dis-redis checker function currently performs a PING request against redis.\n\nThe healthcheck will only succeed if the request can be performend and the server responds with a PONG.\n\nInstantiate a dis-redis client\n\n```golang\nimport disRedis \"github.com/ONSdigital/dis-redis\"\n\n...\n    cli := disRedis.NewClient(ctx, clientConfig)\n...\n```\n\nCall healthchecker with `cli.Checker(context.Background())` and this will return a check object like so:\n\n```json\n{\n    \"name\": \"string\",\n    \"status\": \"string\",\n    \"message\": \"string\",\n    \"status_code\": \"int\",\n    \"last_checked\": \"ISO8601 - UTC date time\",\n    \"last_success\": \"ISO8601 - UTC date time\",\n    \"last_failure\": \"ISO8601 - UTC date time\"\n}\n```\n\n## Getting started\n\nTests and static checks are run via:\n\n```sh\n    make audit\n    make test\n    make lint\n    make build\n```\n\n* Run `make help` to see full list of make targets\n\n### Dependencies\n\n#### Tools\n\nWe use `dis-vulncheck` to do Go auditing, which you will [need to install](https://github.com/ONSdigital/dis-vulncheck).\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## License\n\nCopyright © 2025, Office for National Statistics \u003chttps://www.ons.gov.uk\u003e\n\nReleased under MIT license, see [LICENSE](LICENSE.md) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fdis-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsdigital%2Fdis-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsdigital%2Fdis-redis/lists"}