{"id":19815938,"url":"https://github.com/replicate/go","last_synced_at":"2025-07-29T21:36:34.559Z","repository":{"id":65894867,"uuid":"601417867","full_name":"replicate/go","owner":"replicate","description":"Repository for go shared libraries (for now).","archived":false,"fork":false,"pushed_at":"2025-04-29T00:27:48.000Z","size":405,"stargazers_count":11,"open_issues_count":2,"forks_count":3,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-29T01:34:16.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replicate.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-14T02:37:14.000Z","updated_at":"2025-04-17T20:30:06.000Z","dependencies_parsed_at":"2023-02-28T17:15:42.753Z","dependency_job_id":"b850bf33-24ce-40f1-a5a7-263bd517f91c","html_url":"https://github.com/replicate/go","commit_stats":{"total_commits":191,"total_committers":11,"mean_commits":"17.363636363636363","dds":"0.47643979057591623","last_synced_commit":"0eb90874fe81f74d773ec78c447d912a3b4a1cdc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicate","download_url":"https://codeload.github.com/replicate/go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251860021,"owners_count":21655661,"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":[],"created_at":"2024-11-12T10:07:48.332Z","updated_at":"2025-07-29T21:36:34.546Z","avatar_url":"https://github.com/replicate.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `replicate/go`\n\nThis repository contains shared packages used by Go applications at Replicate.\nIf we find ourselves writing the same code repeatedly across different\napplications, we might want to put it here.\n\nIn due course, it may become a monorepo for our services and tools built using\nGo.\n\nFor now, the repository is public, to simplify its use as a Go module in other\napplications.\n\n## Packages\n\n### `cache`\n\nA redis-backed typed object cache implementation supporting serve-from-stale and\nasynchronous cache fills.\n\n### `debug`\n\nDebug server utilities for exposing runtime information and debugging endpoints.\n\n### `errors`\n\nConfigures conventions for recording errors: a wrapper around the Sentry SDK.\n\n### `flags`\n\nFeature flagging functions: a thin wrapper around the LaunchDarkly client.\n\n### `httpclient`\n\nConventions for creating HTTP clients with appropriate pooling and timeout\nconfiguration. Heavily inspired by \u003chttps://github.com/hashicorp/go-cleanhttp\u003e.\n\n### `kv`\n\nConsolidated package for Redis/Valkey client management with Sentinel support,\nTLS configuration, and automatic OpenTelemetry instrumentation.\n\n### `lock`\n\nA redis-backed distributed lock for coordination within multi-instance services.\n\n### `logging`\n\nConfigures logging conventions using [go.uber.org/zap](https://github.com/uber-go/zap).\n\n### `must`\n\nUtility functions for handling errors in initialization code where panicking is appropriate.\n\n### `queue`\n\nRedis streams-based queue implementation with shuffle-sharding for tenant isolation\nand workload distribution.\n\n### `ratelimit`\n\nA redis-backed token-bucket rate limiter implementation.\n\n### `shuffleshard`\n\nImplementation of shuffle sharding for distributing workloads across multiple instances.\n\n### `telemetry`\n\nStandard OpenTelemetry configuration and tracer creation.\n\n### `types`\n\nCommon type definitions and utilities including custom duration parsing and pointer helpers.\n\n### `uuid`\n\nUUID generation utilities with support for UUIDv7 (time-ordered UUIDs).\n\n### `version`\n\nA convention for retrieving service version from the environment.\n\n## Tools\n\nThe repository also contains a `uuid` command that can be used to generate a list\nof uuids using the `uuid` package.\n\n```bash\n% go run ./cmd/uuid/main.go\n\u003e 018d3855-24f0-7531-84b4-4e88f13bab70\n% go run ./cmd/uuid/main.go -timestamps\n\u003e 018d3855-24f0-7531-84b4-4e88f13bab70 2024-01-23T21:58:40.624Z\n% go run ./cmd/uuid/main.go -count 5 -timestamps\n\u003e 018d3855-24f0-7531-84b4-4e88f13bab70 2024-01-23T21:58:40.624Z\n\u003e 018d3855-24f1-7b1e-be24-4ce73f77d3bf 2024-01-23T21:58:40.625Z\n\u003e 018d3855-24f1-7b33-8b7b-50e5e535b510 2024-01-23T21:58:40.625Z\n\u003e 018d3855-24f1-75d7-abb1-0db1ac9ac285 2024-01-23T21:58:40.625Z\n\u003e 018d3855-24f1-78fc-a1ce-a81e26b3fbe8 2024-01-23T21:58:40.625Z\n```\n\n## Development\n\nYou can run the build, check the tests, lint the code, and run a formatter using\nthe scripts provided in `script/`\n\n    script/build\n    script/test\n    script/format\n    script/lint\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicate%2Fgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fgo/lists"}