From 3413a9f3fe0a1b4ebc0f10e80e462e712150be2c Mon Sep 17 00:00:00 2001
From: Arun Isaac
Date: Fri, 28 Jul 2023 16:16:41 +0100
Subject: socket: Introduce <forge-host-socket>.

* guix/forge/socket.scm (<forge-host-socket>): New record type.
* doc/forge.skb (Reference): Document <forge-host-socket>.
---
 doc/forge.skb         |  5 +++++
 guix/forge/socket.scm | 14 +++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/doc/forge.skb b/doc/forge.skb
index 5c5a5fd..e8b535f 100644
--- a/doc/forge.skb
+++ b/doc/forge.skb
@@ -248,6 +248,11 @@ unused unused, and may be deprecated in the future.]))
        (record-field "trigger?"
          [If ,(code [#t]), this job is run on every commit. Else, it
 must be manually set up to run some other way.]))
+     (record-documentation "guix/forge/socket.scm" '<forge-host-socket>
+       (record-field "hostname"
+         [Name of the host])
+       (record-field "port"
+         [Port number]))
      (record-documentation "guix/forge/socket.scm" '<forge-ip-socket>
        (record-field "ip"
          [IP address, either IPv4 or IPv6, as a string. The loopback
diff --git a/guix/forge/socket.scm b/guix/forge/socket.scm
index 6d2c539..e6e38de 100644
--- a/guix/forge/socket.scm
+++ b/guix/forge/socket.scm
@@ -19,7 +19,12 @@
 
 (define-module (forge socket)
   #:use-module (guix records)
-  #:export (<forge-ip-socket>
+  #:export (<forge-host-socket>
+            forge-host-socket
+            forge-host-socket?
+            forge-host-socket-hostname
+            forge-host-socket-port
+            <forge-ip-socket>
             forge-ip-socket
             forge-ip-socket?
             forge-ip-socket-ip
@@ -31,6 +36,13 @@
             forge-unix-socket?
             forge-unix-socket-path))
 
+(define-record-type* <forge-host-socket>
+  forge-host-socket make-forge-host-socket
+  forge-host-socket?
+  (hostname forge-host-socket-hostname
+            (default "localhost"))
+  (port forge-host-socket-port))
+
 (define-record-type* <forge-ip-socket>
   forge-ip-socket make-forge-ip-socket
   forge-ip-socket?
-- 
cgit v1.2.3