loaned-samples

command
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Command loaned-samples demonstrates zero-copy publishing with LoaningPublisher.

LoaningPublisher.Loan returns a buffer owned by the pool. The caller fills it and calls Commit to publish and recycle it. No allocation occurs on the publish hot path once the pool is warm.

Run:

go run ./examples/loaned-samples

Jump to

Keyboard shortcuts

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