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
Click to show internal directories.
Click to hide internal directories.