Exemplo n.º 1
0
// newStateLock sets up the zk state lock for a given service id
func newStateLock(conn client.Connection, serviceID string) client.Lock {
	return conn.NewLock(path.Join(zkStateLock, serviceID))
}
Exemplo n.º 2
0
// newInstanceLock sets up a new zk instance lock for a given service state id
func newInstanceLock(conn client.Connection, stateID string) client.Lock {
	return conn.NewLock(path.Join(zkInstanceLock, stateID))
}
Exemplo n.º 3
0
// ServiceLock initializes a new lock for services
func ServiceLock(conn client.Connection) client.Lock {
	return conn.NewLock(zkServiceLock)
}