// Inserts or updates a routes in etcd. func (c *Client) Upsert(r *eskip.Route) error { if r.Id == "" { return missingRouteId } _, err := c.etcd.Set(c.routesRoot+"/"+r.Id, r.String(), 0) return err }
func (c *Client) etcdSet(r *eskip.Route) error { _, err := c.etcdRequest("PUT", c.routesRoot+"/"+r.Id, r.String()) return err }
func routesDiffer(left, right *eskip.Route) bool { return left.String() != right.String() }