{"id":27700327,"url":"https://github.com/eclipse-xfsc/redis-cache-service","last_synced_at":"2026-04-28T08:01:57.206Z","repository":{"id":289354371,"uuid":"963959559","full_name":"eclipse-xfsc/redis-cache-service","owner":"eclipse-xfsc","description":"Cache service exposes HTTP interface for working with Redis (TSA)","archived":false,"fork":false,"pushed_at":"2025-06-04T20:22:20.000Z","size":9455,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-05T01:42:19.853Z","etag":null,"topics":["opa","redis","tsa"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-xfsc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-10T13:27:31.000Z","updated_at":"2025-06-04T20:22:23.000Z","dependencies_parsed_at":"2025-04-22T21:39:52.847Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-xfsc/redis-cache-service","commit_stats":null,"previous_names":["eclipse-xfsc/redis-cache-service"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-xfsc/redis-cache-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fredis-cache-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fredis-cache-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fredis-cache-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fredis-cache-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-xfsc","download_url":"https://codeload.github.com/eclipse-xfsc/redis-cache-service/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fredis-cache-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":["opa","redis","tsa"],"created_at":"2025-04-25T18:58:41.264Z","updated_at":"2026-04-28T08:01:57.189Z","avatar_url":"https://github.com/eclipse-xfsc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pipeline status](https://github.com/eclipse-xfsc/redis-cache-service/badges/main/pipeline.svg)](https://github.com/eclipse-xfsc/redis-cache-service/-/commits/main)\n[![coverage report](https://github.com/eclipse-xfsc/redis-cache-service/badges/main/coverage.svg)](https://github.com/eclipse-xfsc/redis-cache-service/-/commits/main)\n\n# Cache service\n\nCache service exposes HTTP interface for working with Redis.\n\nIt is developed using the [Goa v3](https://goa.design/) framework.\n\n\u003e A helper script named `goagen.sh` can be found inside the root directory of\n\u003e the service. It can be used to generate the transport layer code from the\n\u003e Goa DSL definitions in the [design](./design) directory. The script should\n\u003e be executed everytime the design definitions are updated. It also generates\n\u003e updated OpenAPI documentation from the DSL.\n\nGeneration: ```\ngo install goa.design/goa/v3/cmd/goa@v3.20.1\ngoa gen github.com/eclipse-xfsc/redis-cache-service\n```\n\n### Basic Architecture\n\n```mermaid  \nflowchart LR  \n\tA[Client] -- request --\u003e B[HTTP API] \n\tsubgraph cache \n\t\tB --\u003e C[(Redis)] \n\tend\n```\n\n### Configuration\n\nThe cache service is configured using the [Configuration File](./internal/config/config.go).\nAll configurations are expected as Environment variables specified in the\nconfiguration file. For managing the configuration data from ENV variables,\n[envconfig library](https://github.com/kelseyhightower/envconfig) is used.\n\n### API Documentation\n\n[OpenAPI Swagger Documentation](https://github.com/eclipse-xfsc/redis-cache-service/-/blob/main/gen/http/openapi3.json). In the local docker-compose\nenvironment, the Swagger URL is available at http://localhost:8083/swagger-ui.\n\n### Events\n\nThe Cache service publishes events to a message broker using the [CloudEvents\nspecification](https://cloudevents.io/). Current implementation uses [NATS](https://nats.io)\nas message broker and uses [cloudevents-go library](https://github.com/cloudevents/sdk-go)\nas a client to publish events.\n\nThe structure of the `Data` event field is defined in the events [client](./internal/events/client.go). \n\n### Build\n\n##### Local binary\nTo make the service binary locally, you can run the following command from the root\ndirectory (you must have [Go](https://go.dev/) installed):\n```shell\ngo build -o task ./cmd/task/...\n```\n\n##### Docker image\n\nYou can see the Dockerfile of the service under the [deployment](./deployment) directory.\nThere is one Dockerfile for use during local development with [docker-compose](./deployment/compose/Dockerfile) and one for\nbuilding an optimized production image: [deployment/docker/Dockerfile](./deployment/docker/Dockerfile).\n\n### Versioning\n\nThere is one global exported variable named `Version` in `main.go`. The variable is set\nto the latest tag or commit hash during the build process. You can look in the production\nDockerfile to see how the Version is set during build. The version is printed in the service\nlog on startup and can be used to verify which specific commit of the code is deployed.\n\n\u003e Version should *not* be set or modified manually in the source code.\n\n### Logging\n\nThe service outputs all logs to `stdout` as defined by the best practices in the Cloud Native\ncommunity. See here for more details [12 Factor App](https://12factor.net/logs).\nFrom there logs could be processed as needed in the specific running environment.\nThe standard log levels are `[debug,info,warn,error,fatal`] and `info` is the default level.\nIf you want to set another log level, use the ENV configuration variable `LOG_LEVEL` to set it.\n\n### Dependencies\n\nThere must be a running instance of [Redis](https://redis.io/) visible to the service.\nThe address, username and password of Redis must be provided as environment variables.\n\nExample:\n```\nREDIS_ADDR=\"localhost:6379\"\nREDIS_USER=\"user\"\nREDIS_PASS=\"pass\"\n```\n\n### Development\n\nThis service uses [Goa framework](https://goa.design/) v3 as a backbone. \n[This](https://goa.design/learn/getting-started/) is a good starting point for learning to use the framework.\n\n### Dependencies and Vendor\n\nThe project uses Go modules for managing dependencies, and we commit the `vendor` directory.\nWhen you add/change dependencies, be sure to clean and update the `vendor` directory before\nsubmitting your Merge Request for review.\n```shell\ngo mod tidy\ngo mod vendor\n```\n\n### Tests and Linters\n\nTo execute the units tests for the service go to the root project directory and run:\n```go\ngo test -race ./...\n```\n\nTo run the linters go to the root project directory and run:\n```go\ngolangci-lint run\n```\n\n## GDPR\n\n[GDPR](GDPR.md)\n\n## Dependencies\n\n[Dependencies](go.mod)\n\n## Deployment\n\n### Helm\n\n[Helm deployment documentation](deployment/helm/README.md)\n\n## License\n\n[Apache 2.0 license](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xfsc%2Fredis-cache-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-xfsc%2Fredis-cache-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xfsc%2Fredis-cache-service/lists"}