From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: 72565@debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Subject: [bug#72565] [PATCH 2/7] gnu: Add go-github-com-libp2p-go-buffer-pool.
Date: Sun, 11 Aug 2024 00:09:53 +0300 [thread overview]
Message-ID: <910eaf513b148410231565bc6e443a28eeca4e87.1723324012.git.poptsov.artyom@gmail.com> (raw)
In-Reply-To: <cover.1723324012.git.poptsov.artyom@gmail.com>
* gnu/packages/golang.scm (go-github-com-libp2p-go-buffer-pool): New variable.
Change-Id: Id4de38a91dd7186e1aa6f06289c6bfa2cb0abbbb
---
gnu/packages/golang.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 50ac5328c6..4efd2d1a36 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4413,6 +4413,42 @@ (define-public go-github-com-gogo-protobuf
(home-page "https://github.com/gogo/protobuf")
(license license:bsd-3)))
+(define-public go-github-com-libp2p-go-buffer-pool
+ (package
+ (name "go-github-com-libp2p-go-buffer-pool")
+ (version "0.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libp2p/go-buffer-pool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0514rsnin6wjqifpg66dp5nrwh40smqlkgs3kxyz9cansi78c2n1"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/libp2p/go-buffer-pool"))
+ (home-page "https://github.com/libp2p/go-buffer-pool")
+ (synopsis "Variable size buffer pool for Golang")
+ (description
+ "A variable size buffer pool for Golang.
+
+@code{go-buffer-pool} provides:
+@itemize
+@item @code{BufferPool}: A pool for re-using byte slices of varied sizes.
+This pool will always return a slice with at least the size requested and a capacity
+up to the next power of two. Each size class is pooled independently which makes the
+@code{BufferPool} more space efficient than a plain @code{sync.Pool} when used in
+situations where data size may vary over an arbitrary range.
+@item @code{Buffer}: a buffer compatible with @code{bytes.Buffer} but backed by a
+@code{BufferPool}. Unlike @code{bytes.Buffer}, @code{Buffer} will automatically
+shrink on read, using the buffer pool to avoid causing too much work for the
+allocator. This is primarily useful for long lived buffers that usually sit empty.
+@end itemize")
+ (license license:expat)))
+
(define-public go-github-com-libp2p-go-flow-metrics
(let ((commit "7e5a55af485341567f98d6847a373eb5ddcdcd43")
(revision "0"))
--
2.45.2
next prev parent reply other threads:[~2024-08-10 21:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-10 21:08 [bug#72565] [PATCH 0/7] Add some networking libraries for Golang Artyom V. Poptsov
2024-08-10 21:09 ` [bug#72565] [PATCH 1/7] gnu: Add go-github-com-ipfs-go-verifcid Artyom V. Poptsov
2024-08-10 21:09 ` Artyom V. Poptsov [this message]
2024-08-10 21:09 ` [bug#72565] [PATCH 3/7] gnu: Add go-github-com-libp2p-go-msgio Artyom V. Poptsov
2024-08-10 21:09 ` [bug#72565] [PATCH 4/7] gnu: Add go-github-com-huin-goupnp Artyom V. Poptsov
2024-08-10 21:09 ` [bug#72565] [PATCH 5/7] gnu: Add go-github-com-koron-go-ssdp Artyom V. Poptsov
2024-08-10 21:09 ` [bug#72565] [PATCH 6/7] gnu: Add go-github-com-libp2p-go-netroute Artyom V. Poptsov
2024-08-10 21:09 ` [bug#72565] [PATCH 7/7] gnu: Add go-github-com-libp2p-go-nat Artyom V. Poptsov
2024-08-21 13:55 ` bug#72565: [PATCH 0/7] Add some networking libraries for Golang Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=910eaf513b148410231565bc6e443a28eeca4e87.1723324012.git.poptsov.artyom@gmail.com \
--to=poptsov.artyom@gmail.com \
--cc=72565@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.