Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vtex/go-io
Collection of general-purpose packages for writing scalable go services.
https://github.com/vtex/go-io
srv-go-libs xp-developer
Last synced: about 1 month ago
JSON representation
Collection of general-purpose packages for writing scalable go services.
- Host: GitHub
- URL: https://github.com/vtex/go-io
- Owner: vtex
- License: mit
- Created: 2018-06-01T18:40:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T14:35:09.000Z (over 1 year ago)
- Last Synced: 2024-06-20T16:32:41.211Z (7 months ago)
- Topics: srv-go-libs, xp-developer
- Language: Go
- Homepage:
- Size: 4.97 MB
- Stars: 2
- Watchers: 116
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# go-io
## Overview
Collection of general-purpose packages for writing scalable go services.
Many sub-packages are merely compositions or thin layers on top of other
open source packages like for caching, monitoring, etc., offering easy
consumption by providing simplified configuration with sane defaults
and opinionated/higher-level usage interfaces.Initially developed and open-source by VTEX IO Infra team.
## Packages
As we don't have much documentation in the code itself yet, here are some
high level descriptions for each of the root exported packages:
- `cache`: Simplified interfaces for http, local and remote caching,
as well as some ready-to-use implementations for "stale on error" and
multi-layer "hybrid" cache.
- `redis`: Provides an implementation for the `Cache` interface from the above
package using a Redis instance as storage. Also provides implementation of an
optimized and channel-oriented Redis PubSub client.
- `ioext`: Utilities related to I/O that could be in go's `io` package.
* `ChunkedData` implements `gin.Render` interface for serving large responses
with `Transfer-Encoding: chunked` and optimized buffer/memory and async flushing.
* `TarGzWriter` and `Zip...` provide simplified interfaces for extracting and
compressing data on those popular formats.
* `Tee` creates an easy way to clone an `io.Reader`, effectively duplicating the
contents streamed through it. e.g. Useful for caching in background while
concurrently streaming response to client.
- `prometheus`: Opinionated higher-level interfaces for sending metrics of the system
to Prometheus.
- `sharedflight`: Like (and built on top of) [`singleflight`](golang.org/x/sync/singleflight),
but supporting shared cancellation based on all consumers waiting for response.
- `reflext` Utilities related to reflection that could be on `reflect`. Only a single
utility is currently provided, for panic-safely setting the value of a pointer with
explicit error handling, to avoid panicking to users of APIs.