Commit Graph
15 Commits
Author SHA1 Message Date
Bryan Boreham d868d27263 Look up by IP 2014-10-24 14:47:49 +01:00
Michael Bridgen ad44a8816f Remove subnets from API, since we don't use them 2014-10-23 16:43:41 +01:00
Michael Bridgen 840c0b9f86 Renamed variables for consistency 2014-10-23 16:23:55 +01:00
Michael Bridgen 5c6410a3c6 Refactored indexOf* 2014-10-21 15:49:42 +01:00
Michael Bridgen 23edd79177 Changed Lock to RLock when matching 2014-10-21 14:01:07 +01:00
Bryan Boreham 1b0066cc98 Commented on stop-gap data structure 2014-10-20 17:51:00 +01:00
Michael Bridgen a3cede3027 Tidied up a few printfs 2014-10-17 15:24:51 +01:00
Michael Bridgen 0749460652 Moved updater into server
While we're only reacting to containers going away, it's more
convenient to bundle the docker events watcher into the server.

I've added a flag to switch it on; and switched it on by default in
the container.

I also implemented `Zone.DeleteRecordsFor(ident)`, which removes all
records for a particular container.

One minor change to the structure of the code is that the Zone is now
constructed *outside* the server, and given to it and the updater.
2014-10-16 15:38:32 +01:00
Bryan Boreham 6e3e7dcd68 Support DELETE function 2014-10-14 17:01:13 +01:00
Bryan Boreham 4709f852c3 Better error reporting 2014-10-14 16:59:00 +01:00
Bryan Boreham 8ebc06315c Detect duplicate add 2014-10-14 16:06:08 +01:00
Bryan Boreham 7f6e0a1e42 Make error message more helpful 2014-10-14 15:19:20 +01:00
Bryan Boreham 6bff651e87 Changed to new URL scheme with container identifier
Implementation matches design.md better:
 - http action changes from POST /add to PUT /name
 - each record now has the container identifier
2014-10-14 11:55:45 +01:00
Michael Bridgen e8e86dadc0 Changed to accept a CIDR address and use net.IP
* In general we'll have an IP address and a subnet mask for the weave
   network address; account for this in the zone DB and in the HTTP
   server.

 * Use the net.IP type rather than string, which gives us a bit more
   generality (in theory it'll deal with Ipv6 too) and validation (we
   attempt to parse the input)
2014-10-07 12:49:52 +01:00
Michael Bridgen 3976e5ceaf Moved main to top, libs to subpackage 2014-10-04 14:51:46 +01:00