aboutsummaryrefslogtreecommitdiff
path: root/guix/forge/webhook.scm
diff options
context:
space:
mode:
authorArun Isaac2022-10-17 16:51:53 +0530
committerArun Isaac2022-10-17 16:51:53 +0530
commite30651ac8d3efb13cc23b843273d780f4da75708 (patch)
tree566492d9df0cf55861ab293333632fe074772933 /guix/forge/webhook.scm
parent78fab4cf716278000eae0884c98ee81b5c2c06c5 (diff)
downloadguix-forge-e30651ac8d3efb13cc23b843273d780f4da75708.tar.gz
guix-forge-e30651ac8d3efb13cc23b843273d780f4da75708.tar.lz
guix-forge-e30651ac8d3efb13cc23b843273d780f4da75708.zip
webhook: Use <forge-*-socket> to configure socket.
* doc/forge.skb (Reference)[<webhook-configuration>]: Replace ip and port fields with the socket field. * guix/forge/webhook.scm: Import (forge socket). (<webhook-configuration>): Replace ip and port fields with the socket field. (webhook-shepherd-service): Reference the socket field instead of the ip and port fields.
Diffstat (limited to 'guix/forge/webhook.scm')
-rw-r--r--guix/forge/webhook.scm15
1 files changed, 8 insertions, 7 deletions
diff --git a/guix/forge/webhook.scm b/guix/forge/webhook.scm
index 0408e91..6f42808 100644
--- a/guix/forge/webhook.scm
+++ b/guix/forge/webhook.scm
@@ -32,11 +32,12 @@
#:use-module (guix git-download)
#:use-module (guix build-system go)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (forge socket)
#:export (webhook-service-type
webhook-configuration
webhook-configuration?
webhook-configuration-package
- webhook-configuration-port
+ webhook-configuration-socket
webhook-configuration-log-directory
webhook-configuration-hooks
webhook-hook
@@ -106,10 +107,10 @@ Everything else is the responsibility of the command's author.")
webhook-configuration?
(package webhook-configuration-package
(default webhook))
- (ip webhook-configuration-ip
- (default "127.0.0.1"))
- (port webhook-configuration-port
- (default 9000))
+ (socket webhook-configuration-socket
+ (default (forge-ip-socket
+ (ip "127.0.0.1")
+ (port 9000))))
(log-directory webhook-configuration-log-directory
(default "/var/log/webhook"))
(hooks webhook-configuration-hooks
@@ -166,8 +167,8 @@ Everything else is the responsibility of the command's author.")
"/bin/webhook")
"-hooks" #$(computed-file "hooks.json"
(hooks-json-gexp config))
- "-ip" #$(webhook-configuration-ip config)
- "-port" #$(number->string (webhook-configuration-port config))
+ "-ip" #$(forge-ip-socket-ip (webhook-configuration-socket config))
+ "-port" #$(number->string (forge-ip-socket-port (webhook-configuration-socket config)))
"-logfile" #$(string-append (webhook-configuration-log-directory config)
"/webhook.log"))
#:mappings (list (file-system-mapping