From e30651ac8d3efb13cc23b843273d780f4da75708 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 17 Oct 2022 16:51:53 +0530 Subject: webhook: Use to configure socket. * doc/forge.skb (Reference)[]: Replace ip and port fields with the socket field. * guix/forge/webhook.scm: Import (forge socket). (): Replace ip and port fields with the socket field. (webhook-shepherd-service): Reference the socket field instead of the ip and port fields. --- guix/forge/webhook.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'guix/forge') 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 -- cgit v1.2.3