Debian Codegraph @

debian/control

raw
1 Source: golang-github-crawshaw-iox
2 Section: golang
3 Maintainer: Debian Go Packaging Team <[email protected]>
4 Uploaders:
5 Simon Josefsson <[email protected]>,
6 Build-Depends:
7 debhelper-compat (= 13),
8 dh-sequence-golang,
9 golang-any,
10 Testsuite: autopkgtest-pkg-go
11 Standards-Version: 4.7.3
12 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-crawshaw-iox
13 Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-crawshaw-iox.git
14 Homepage: https://github.com/crawshaw/iox
15 XS-Go-Import-Path: crawshaw.io/iox
16
17 Package: golang-github-crawshaw-iox-dev
18 Architecture: all
19 Multi-Arch: foreign
20 Depends:
21 ${misc:Depends},
22 Description: Go I/O utilities (library)
23 iox: I/O tools for Go programs
24 .
25 Package iox contains two Go objects of note: *Filer* and *BufferFile*.
26 .
27 (https://godoc.org/crawshaw.io/iox)
28 .
29 Filer
30 .
31 Managing file resources in highly-concurrent programs gets tricky. A
32 process easily, even typically, has more in-flight goroutines than
33 allowed file descriptors from the operating system. This requires
34 programmers limit the number of open descriptors with some kind of
35 throttle object.
36 .
37 An iox.Filer wraps the functions used to open file descriptors and makes
38 sure it never opens more than some maximum (typically derived from the
39 processes rlimit).
40 .
41 It wraps *os.File pointers in a new object which returns the file
42 descriptor allotment to the Filer pool when Close is called.
43 .
44 BufferFile
45 .
46 A BufferFile is a file-like object that stores its first N bytes in
47 memory, and the rest in a temporary file on disk.
48 .
49 It is designed for loads where the **typical** case fits in some small
50 amount of memory, but the **worst** case requires more space than can be
51 provisioned in RAM. (This usually means a server is handling tens to
52 hundreds of thousands of simultaneous requests.)
53 .
54 BufferFile does not create its temporary backing file until its contents
55 exceed the memory buffer, so the typical case does not require any file
56 descriptors. Programs can begin (and usually complete) processing a
57 request without ever blocking on file descriptors, meaning a server
58 never runs into file descriptors as a bottleneck when processing a
59 typical workload.
60 .
61 Installation
62 .
63 Install with:
64 .
65 go get crawshaw.io/iox
66 .
67 There are no version numbers yet, this package needs some time to bake.