sync

package
v2.481.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sync wires the shared buffer pool used by go-service.

This package now has a narrow scope: it does not re-export mutexes, maps, or buffer pool types. Code that needs synchronization primitives or concurrency-safe containers should import the standard library sync package or github.com/alexfalkowski/go-sync directly.

Dependency injection (Fx)

Module registers github.com/alexfalkowski/go-sync.NewBufferPool with the Fx graph so packages can share a single upstream buffer pool instance.

This shared pool is consumed by allocation-sensitive helpers such as cache encoding and HTTP request/response helpers.

When to import this package

Import this package when composing go-service Fx modules and you want the standard buffer pool wiring.

If you need the concrete pool type or other synchronization helpers, import github.com/alexfalkowski/go-sync directly.

Index

Constants

This section is empty.

Variables

Module wires the upstream go-sync buffer pool into Fx.

Including this module in an Fx application provides a single shared buffer pool instance constructed via github.com/alexfalkowski/go-sync.NewBufferPool.

This is commonly used to reduce allocations across components that build or transform byte payloads, such as encoders, compressors, caches, and HTTP helpers.

The provided type and its lifecycle/usage contract are defined by the upstream github.com/alexfalkowski/go-sync package.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL