guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38059] [PATCH 3/3] services: Add pagekite-service-type.


From: Ludovic Courtès
Subject: [bug#38059] [PATCH 3/3] services: Add pagekite-service-type.
Date: Sun, 10 Nov 2019 12:31:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi,

"Alex Griffin" <address@hidden> skribis:

> From 46a5e48f5e89be4da3611bd11b55ed0e325c6538 Mon Sep 17 00:00:00 2001
> From: Alex Griffin <address@hidden>
> Date: Mon, 4 Nov 2019 19:29:24 -0600
> Subject: [PATCH 3/3] services: Add pagekite-service-type.
>
> * gnu/services/networking.scm (pagekite-service-type): New service type.
> (<pagekite-configuration>): New record type.
> (pagekite-shepherd-service): New procedure.
> * doc/guix.texi (Networking Services): Document it.

[...]

> +(define pagekite-configuration-file
> +  (match-lambda
> +    (($ <pagekite-configuration> package kitename kitesecret
> +                                 frontend kites extra-file)

[...]

> +(define (pagekite-shepherd-service config)
> +  (match config
> +    (($ <pagekite-configuration> package kitename kitesecret
> +                                 frontend kites extra-file)

I recommend using ‘match-record’ in these two cases since it matches
fields by name and is thus less error-prone.

> +        (start #~(make-forkexec-constructor/container

Nice.  :-)

Is there some meaningful test that could be written for this service?  I
suppose it’d be hard to test without also running a relay.  Anyway, if
you can think of a non-trivial test that could detect regressions,
you’re welcome to add it to (gnu tests …).

Otherwise LGTM!

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]