hlfw.ca

registry

Download patch

ref: b60a5a60b30e5b1fee7d6c48e3fc30ed1f9e861e
parent: 0371d8257827c8f5af27640cd19d91a8354a04aa
author: halfwit <halfwit@hlfw.ca>
date: Thu Aug 22 21:10:51 PDT 2024

update readme

--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
-# Services Registry
 
 This is an interpretation of the Inferno Registry, for Plan9-like systems
 
@@ -5,34 +4,24 @@
 ## Configuration
 
 Update your ipnet in /lib/ndb/local
-```
-ipnet=mynetwork ip=192.168.1.0 ipmask=255.255.255.0
-    ipgw=192.168.1.1
-    dns=1.1.1.1
-    auth=authy
-    registry=authy <---
-    fs=servy
-    cpu=crunchy
-```
+	ipnet=mynetwork ip=192.168.1.0 ipmask=255.255.255.0
+	    ipgw=192.168.1.1
+	    dns=1.1.1.1
+	    auth=authy
+	    registry=authy <---
+	    fs=servy
+	    cpu=crunchy
 
 This is used by `net/services` and `net/svcquery` by default.
-
 Add the following to your /cfg/$sysname/cpurc, where $sysname matches what you entered above.
+	# Assuming you add a "registry" port mapping
+	aux/svcfs -m /mnt/services /adm/services
+	aux/listen1 -t tcp!*!registry /bin/exportfs -r /mnt/services
 
-```
-# Assuming you add a "registry" port mapping
-aux/svcfs -m /mnt/services /adm/services
-aux/listen1 -t tcp!*!registry /bin/exportfs -r /mnt/services
-```
-
 ## aux/svcfs
-
 Usage: `aux/svcfs [-r] [-m mtpt] servicesfile`
-
 - `-r` starts the server in readonly mode
-
 `svcfs` will periodically check a service is still alive with a gradual backoff, capping off at hourly.
-
 `svcfs` manages the contents of a file, `/adm/services`, which it will read in on startup
 It serves up on mtpt, by default using `/mnt/services`
 
@@ -50,12 +39,9 @@
  - `auth` is an optional address for the auth server to use
 
 ## svc/monitor 
-
 Usage: `svc/monitor [-o]  [-s svcfs]`
-
 - `-o` Alternate naming in services, `ipnet.sysname.svcname`
 - `-s` Address of svcfs
-
 monitor connects to a `svcfs`, by default checking for an entry in your local ipnet=. 
 monitor will populate your local /srv with an fd pointing to all records in the given `svcfs`. 
 - If the status of a service changes from Ok, it will be automatically removed
@@ -68,29 +54,24 @@
 - `-s` Address of svcfs. If none is given, it uses `registry=` from your ipnet
 
 Query the svcfs for any services matching query. It returns a tuple for each match
+	$ svc/query speakers
+	service=speakers address=livingroom!12345 
+	    description='Living room speakers'
+	    uptime='4 days, 3 hour, 0 minutes'
+	    status=ok
+	service=speakers address=bedroom!1234
+	    description='Bedroom speakers'  
+	    uptime='55 days, 0 hours, 2 minutes'
+	    status=ok
 
-```
-$ svc/query speakers
-service=speakers address=livingroom!12345 
-    description='Living room speakers'
-    uptime='4 days, 3 hour, 0 minutes'
-    status=ok
-service=speakers address=bedroom!1234
-    description='Bedroom speakers'  
-    uptime='55 days, 0 hours, 2 minutes'
-    status=ok
-```
-
 ## svc/publish 
 Usage: `svc/publsh [-s svcfs] [-a authdom] svcname addr [attr value]`
 
 Create a service entry on the given `svcfs`, by default using the `registry=` value in `/lib/ndb/local`. If a service already exists, it will attempt to update the svcfs with the attr/values given.
-
 - `attr` can be one of `description` or `auth`
 
 ## svc/drop
 Usage: `svc/drop [-s svcfs] [-a authdom] svcname`
-
 This will remove the service entry from the `svcfs`. This must be ran as the user who created the service entry, or the hostowner of `svcfs`.
 
 ## Future