summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2012-04-10 16:59:32 +0200
committerYorhel <git@yorhel.nl>2012-04-10 16:59:32 +0200
commit675245c2da4c59ce48eb2da0ad0c9e317ad478b2 (patch)
treedc8ce83fb5527601cc1e72754e5dac8eef64d83b
parentb1ac0363015495ebd6a62d6cbcbdbaddcba638a2 (diff)
Added simple design document + mention distclean in README
-rw-r--r--README2
-rw-r--r--design96
2 files changed, 98 insertions, 0 deletions
diff --git a/README b/README
index 85cb085..40a1f18 100644
--- a/README
+++ b/README
@@ -15,6 +15,8 @@ USAGE
Make sure you have Go 1 installed. Then you can just type 'make' to build
globster and 'make install' to install the thing if you wish.
+ If you get build errors after some upgrade, try a 'make distclean' followed
+ by 'make'. If that doesn't solve it then you've probably hit a bug.
CONTACT
diff --git a/design b/design
new file mode 100644
index 0000000..dbe5cae
--- /dev/null
+++ b/design
@@ -0,0 +1,96 @@
+<Session>:
+
+ <action> <pattern>
+
+Actions:
+ < = registered for incoming pattern
+ > = outgoing tuples for notifications
+ (A session may send out more tuples, but those are to control itself or
+ another session, rather than providing a general notification).
+
+Patterns:
+
+ Space separated list of elements.
+
+ * = wildcard
+ $var = variable
+ $var... = one or more fields
+
+ Anything else should be considered a literal.
+
+
+======================
+
+
+
+Hub manager:
+
+ < hub $name create
+ Creates a hub session with $name
+ < hub $name close
+ Closes the hub specified with $name, or all hubs if a wildcard is specified.
+
+
+
+Hub:
+
+ < hub $name exists
+ < hub $name connect $addr
+ < hub $name disconnect
+ < hub $name info
+ Replies with hub information
+
+ < userlist $name Changed "" $data
+
+ > hub $name Created
+ > hub $name Closed
+ > hub $name Connected $addr
+ > hub $name Disconnected $reason...
+
+
+
+UserList:
+
+ < userlist $hub get $id $field...
+ $id may be a wildcard to get a complete list
+ < userlist $hub getid $gid $field...
+ $gid may not be a wildcard here
+ < userlist $hub set $id $data
+ < userlist $hub del $id
+ $id may be a wildcard to clear all
+ < userlist $hub stats
+ Replies with user count and total share size
+
+ > userlist $hub Added $id $data
+ > userlist $hub Changed $id $old $new
+ > userlist $hub Deleted $id
+
+ $hub = $name of the corresponding Hub session
+ $id = This client: ""
+ ADC: SID (FourCC string)
+ NMDC: hex(raw_nick)
+ $gid = The GID field ("global ID")
+ $data = map with information on the user
+ $old, $new = $data, only containing the fields that changed
+ $field = refers to the keys in $data, not present = all
+
+ Fields (used in $data):
+ Name Username (UTF-8)
+ CID ADC: CID (base32 string), NMDC: Empty
+ TID Temp. ID = $id (read only)
+ GID Global ID. ADC: CID, NMDC: $id (read only)
+ Desc Description
+ EMail E-mail address
+ Client Client string (<appname> <space> <version>)
+ Upload Upload speed. ADC: int, bytes/s, NMDC: Some string
+ Download Download speed. ADC: int, bytes/s. NMDC: Empty
+ ShareSize int, number of bytes shared
+ ShareFiles int, number of files shared (ADC only)
+ KeyPrint KP field (ADC only)
+ IP4 IPv4 address
+ Slots int, number of opened slots
+ AutoSlots int, bytes/s, extra slot will be opened if total upload < AutoSlots
+ HubsOp int, number of hubs the user is OP on
+ HubsReg int, number of hubs the user is registered on
+ HubsNorm int, number of hubs the user is neither registered or OP on
+ // TODO: Active/passive + TLS support + ADC: I6, U4, U6, TO, AW