diff options
| author | Christopher Baines <mail@cbaines.net> | 2026-03-02 12:19:44 +0000 |
|---|---|---|
| committer | Christopher Baines <mail@cbaines.net> | 2026-03-11 15:31:04 +0000 |
| commit | e6581cc5f9567e4bf100e1d3e052b3f467656d49 (patch) | |
| tree | 945f3d6b18515262fd7da734810e798e18b9ea6e | |
| parent | 894349cec86bd2d471d9d37e43f349c9ec95bcd1 (diff) | |
store: Export the %default-store-connection-buffer-size.
So it can be used elsewhere, for example where port->connection is used and
there's a need to setup buffering.
* guix/store.scm (%default-buffer-size): Rename to
%default-store-connection-buffer-size.
(connect-to-daemon, open-connection): Update accordingly.
Change-Id: Ieb932577304786e5dee891ad1652e03c388d4112
| -rw-r--r-- | guix/store.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/store.scm b/guix/store.scm index 30344da91f5..ec72786f347 100644 --- a/guix/store.scm +++ b/guix/store.scm | |||
| @@ -118,6 +118,8 @@ | |||
| 118 | set-store-connection-cache | 118 | set-store-connection-cache |
| 119 | set-store-connection-cache! | 119 | set-store-connection-cache! |
| 120 | 120 | ||
| 121 | %default-store-connection-buffer-size | ||
| 122 | |||
| 121 | connect-to-daemon | 123 | connect-to-daemon |
| 122 | open-connection | 124 | open-connection |
| 123 | port->connection | 125 | port->connection |
| @@ -356,10 +358,11 @@ non-blocking." | |||
| 356 | (errno (system-error-errno args))))) | 358 | (errno (system-error-errno args))))) |
| 357 | (loop rest))))))))) | 359 | (loop rest))))))))) |
| 358 | 360 | ||
| 359 | (define %default-buffer-size 8192) | 361 | (define %default-store-connection-buffer-size 8192) |
| 360 | 362 | ||
| 361 | (define* (connect-to-daemon uri-or-filename #:key non-blocking? | 363 | (define* (connect-to-daemon uri-or-filename #:key non-blocking? |
| 362 | (buffer-size %default-buffer-size)) | 364 | (buffer-size |
| 365 | %default-store-connection-buffer-size)) | ||
| 363 | "Connect to the daemon at URI-OR-FILENAME and return an input/output port. | 366 | "Connect to the daemon at URI-OR-FILENAME and return an input/output port. |
| 364 | If NON-BLOCKING?, use a non-blocking socket when using the file, unix or guix | 367 | If NON-BLOCKING?, use a non-blocking socket when using the file, unix or guix |
| 365 | URI schemes. Use BUFFER-SIZE defaulting to 8192. | 368 | URI schemes. Use BUFFER-SIZE defaulting to 8192. |
| @@ -406,7 +409,8 @@ the daemon. Use 'open-connection' for that." | |||
| 406 | (define* (open-connection #:optional (uri (%daemon-socket-uri)) | 409 | (define* (open-connection #:optional (uri (%daemon-socket-uri)) |
| 407 | #:key port (reserve-space? #t) cpu-affinity | 410 | #:key port (reserve-space? #t) cpu-affinity |
| 408 | non-blocking? built-in-builders | 411 | non-blocking? built-in-builders |
| 409 | (buffer-size %default-buffer-size)) | 412 | (buffer-size |
| 413 | %default-store-connection-buffer-size)) | ||
| 410 | "Connect to the daemon at URI (a string), or, if PORT is not #f, use it as | 414 | "Connect to the daemon at URI (a string), or, if PORT is not #f, use it as |
| 411 | the I/O port over which to communicate to a build daemon. | 415 | the I/O port over which to communicate to a build daemon. |
| 412 | 416 | ||
