shithub: svcfs

ref: ee36a9bdcdbaeb49fec609580da999a446b03684
dir: /README/

View raw version
# svc/fs

## Creating Services
This mounts a directory at (default) `/mnt/svc`
 - -m <mtpt> 
 - -s <srvname> will post to /srv/srvname

`/mnt/svc` initially has a file, `clone`.
Opening `clone` will create a numerical directory starting at `/mnt/svc/0`.
The first write must be the name of the service. This will post a file to /srv/<service> that clients can mount into their namespace for a session with a given service

Ctl messages on /mnt/svc/n/ctl
(Note, newlines are important!)
- `create <buff>`: This will create a buffer. This must be called before any of the following
- `title <buff>\ntitle text`: This will set the title of a given buffer
- `feed <buff>\nsome text`: This will be appended to a given buffers' feed file

## Working with Services
`mount /srv/<svc> /mnt/<svc>`
eg, mount /srv/oftc /mnt/oftc

/mnt/oftc/aside	- sidebar content, e.g. nicklist
/mnt/oftc/ctl	- control file
/mnt/oftc/feed	- current buffer's feed
/mnt/oftc/input	- write to current buffer
/mnt/oftc/notify 	- any pending notifications
/mnt/oftc/status	- any status (service specific)
/mnt/oftc/tabs	- list of all service buffers for client
/mnt/oftc/title	- title for current buffer

Ctl messages on /mnt/<svc>/ctl
- `buffer <buffname>`: Change the current buffer content displayed 

`echo 'buffer #cat-v' >> /mnt/oftc/ctl`

## Namespace Considerations

- Each unique mount of /srv/<svc> is multiplexed, so you can create clients that can view different/multiple buffers from a single service
- Unreads/read states will be synchronized
-