Documentation
¶
Overview ¶
Copyright 2014 The Serviced Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 The Serviced Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 The Serviced Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func AddHost(conn client.Connection, host *host.Host) error
- func AddResourcePool(conn client.Connection, pool *pool.ResourcePool) error
- func EnsureServiceLock(cancel, finish <-chan interface{}, conn client.Connection) error
- func GetActiveHosts(conn client.Connection, poolID string) ([]string, error)
- func GetServiceState(conn client.Connection, state *servicestate.ServiceState, serviceID string, ...) error
- func GetServiceStates(conn client.Connection, serviceIDs ...string) (states []servicestate.ServiceState, err error)
- func GetServiceStatus(conn client.Connection, serviceID string) (map[string]dao.ServiceStatus, error)
- func InitHostRegistry(conn client.Connection) error
- func IsServiceLocked(conn client.Connection) (bool, error)
- func LoadRunningService(conn client.Connection, serviceID, ssID string) (*dao.RunningService, error)
- func LoadRunningServices(conn client.Connection) ([]dao.RunningService, error)
- func LoadRunningServicesByHost(conn client.Connection, hostIDs ...string) ([]dao.RunningService, error)
- func LoadRunningServicesByService(conn client.Connection, serviceIDs ...string) ([]dao.RunningService, error)
- func MonitorResourcePool(shutdown <-chan interface{}, conn client.Connection, poolID string) <-chan *pool.ResourcePool
- func NewHostSynchronizer(handler HostSyncHandler, poolID string) *zzk.Synchronizer
- func NewPoolSynchronizer(handler PoolSyncHandler, getConnection zzk.GetConnection) *zzk.Synchronizer
- func NewRunningService(service *service.Service, state *servicestate.ServiceState) (*dao.RunningService, error)
- func NewServiceSynchronizer(handler ServiceSyncHandler, poolID string) *zzk.Synchronizer
- func RemoveHost(cancel <-chan interface{}, conn client.Connection, hostID string) error
- func RemoveResourcePool(conn client.Connection, poolID string) error
- func RemoveService(conn client.Connection, serviceID string) error
- func RemoveServiceVhost(conn client.Connection, serviceID, vhostname string) error
- func RemoveServiceVhosts(conn client.Connection, svc *service.Service) error
- func ServiceLock(conn client.Connection) client.Lock
- func StartService(conn client.Connection, serviceID string) error
- func StopService(conn client.Connection, serviceID string) error
- func StopServiceInstance(conn client.Connection, hostID, stateID string) error
- func SyncHosts(conn client.Connection, hosts []host.Host) error
- func SyncResourcePools(conn client.Connection, pools []pool.ResourcePool) error
- func SyncServices(conn client.Connection, services []service.Service) error
- func UpdateHost(conn client.Connection, host *host.Host) error
- func UpdateResourcePool(conn client.Connection, pool *pool.ResourcePool) error
- func UpdateService(conn client.Connection, svc *service.Service) error
- func UpdateServiceState(conn client.Connection, state *servicestate.ServiceState) error
- func UpdateServiceVhost(conn client.Connection, serviceID, vhostname string) error
- func UpdateServiceVhosts(conn client.Connection, svc *service.Service) error
- func WaitService(shutdown <-chan interface{}, conn client.Connection, serviceID string, ...) error
- func WaitServiceLock(shutdown <-chan interface{}, conn client.Connection, enabled bool) error
- type HostNode
- type HostRegistryListener
- func (l *HostRegistryListener) Done()
- func (l *HostRegistryListener) GetHosts() (hosts []*host.Host, err error)
- func (l *HostRegistryListener) GetPath(nodes ...string) string
- func (l *HostRegistryListener) PostProcess(p map[string]struct{})
- func (l *HostRegistryListener) Ready() (err error)
- func (l *HostRegistryListener) SetConnection(conn client.Connection)
- func (l *HostRegistryListener) Spawn(shutdown <-chan interface{}, eHostID string)
- type HostState
- type HostStateHandler
- type HostStateListener
- func (l *HostStateListener) Done()
- func (l *HostStateListener) GetPath(nodes ...string) string
- func (l *HostStateListener) PostProcess(p map[string]struct{})
- func (l *HostStateListener) Ready() error
- func (l *HostStateListener) SetConnection(conn client.Connection)
- func (l *HostStateListener) Spawn(shutdown <-chan interface{}, stateID string)
- type HostSyncHandler
- type HostSynchronizer
- func (l *HostSynchronizer) AddUpdate(id string, node zzk.Node) (string, error)
- func (l *HostSynchronizer) Allocate() zzk.Node
- func (l *HostSynchronizer) Delete(id string) error
- func (l *HostSynchronizer) Done()
- func (l *HostSynchronizer) GetAll() ([]zzk.Node, error)
- func (l *HostSynchronizer) GetConnection(path string) (client.Connection, error)
- func (l *HostSynchronizer) GetPath(nodes ...string) string
- func (l *HostSynchronizer) Ready() error
- type PoolNode
- type PoolSyncHandler
- type PoolSynchronizer
- func (l *PoolSynchronizer) AddUpdate(id string, node zzk.Node) (string, error)
- func (l *PoolSynchronizer) Allocate() zzk.Node
- func (l *PoolSynchronizer) Delete(id string) error
- func (l *PoolSynchronizer) Done()
- func (l *PoolSynchronizer) GetAll() ([]zzk.Node, error)
- func (l *PoolSynchronizer) GetConnection(path string) (client.Connection, error)
- func (l *PoolSynchronizer) GetPath(nodes ...string) string
- func (l *PoolSynchronizer) Ready() error
- type ServiceHandler
- type ServiceListener
- func (l *ServiceListener) Done()
- func (l *ServiceListener) GetPath(nodes ...string) string
- func (l *ServiceListener) PostProcess(p map[string]struct{})
- func (l *ServiceListener) Ready() (err error)
- func (l *ServiceListener) SetConnection(conn client.Connection)
- func (l *ServiceListener) Spawn(shutdown <-chan interface{}, serviceID string)
- type ServiceLockListener
- func (l *ServiceLockListener) Done()
- func (l *ServiceLockListener) GetPath(nodes ...string) string
- func (l *ServiceLockListener) PostProcess(p map[string]struct{})
- func (l *ServiceLockListener) Ready() error
- func (l *ServiceLockListener) SetConnection(conn client.Connection)
- func (l *ServiceLockListener) Spawn(shutdown <-chan interface{}, poolID string)
- type ServiceNode
- type ServiceStateNode
- type ServiceSyncHandler
- type ServiceSynchronizer
- func (l *ServiceSynchronizer) AddUpdate(id string, node zzk.Node) (string, error)
- func (l *ServiceSynchronizer) Allocate() zzk.Node
- func (l *ServiceSynchronizer) Delete(id string) error
- func (l *ServiceSynchronizer) Done()
- func (l *ServiceSynchronizer) GetAll() ([]zzk.Node, error)
- func (l *ServiceSynchronizer) GetConnection(path string) (client.Connection, error)
- func (l *ServiceSynchronizer) GetPath(nodes ...string) string
- func (l *ServiceSynchronizer) Ready() error
- type ServiceVhostNode
Constants ¶
This section is empty.
Variables ¶
var ( ErrHostInvalid = errors.New("invalid host") ErrShutdown = errors.New("listener shut down") )
var (
ErrUnknownState = errors.New("unknown state")
)
Functions ¶
func AddResourcePool ¶
func AddResourcePool(conn client.Connection, pool *pool.ResourcePool) error
func EnsureServiceLock ¶
func EnsureServiceLock(cancel, finish <-chan interface{}, conn client.Connection) error
Attempt to acquire a service lock, ensuring that it is held until the finish channel is closed. Function blocks until the lock is held by someone (not necessarily by us).
func GetActiveHosts ¶
func GetActiveHosts(conn client.Connection, poolID string) ([]string, error)
func GetServiceState ¶
func GetServiceState(conn client.Connection, state *servicestate.ServiceState, serviceID string, stateID string) error
GetServiceState gets a service state
func GetServiceStates ¶
func GetServiceStates(conn client.Connection, serviceIDs ...string) (states []servicestate.ServiceState, err error)
GetServiceStates gets all service states for a particular service
func GetServiceStatus ¶
func GetServiceStatus(conn client.Connection, serviceID string) (map[string]dao.ServiceStatus, error)
GetServiceStatus creates a map of service states to their corresponding status
func InitHostRegistry ¶
func InitHostRegistry(conn client.Connection) error
InitHostRegistry initializes the host registry
func IsServiceLocked ¶
func IsServiceLocked(conn client.Connection) (bool, error)
IsServiceLocked verifies whether services are locked
func LoadRunningService ¶
func LoadRunningService(conn client.Connection, serviceID, ssID string) (*dao.RunningService, error)
LoadRunningService returns a RunningService object given a coordinator connection
func LoadRunningServices ¶
func LoadRunningServices(conn client.Connection) ([]dao.RunningService, error)
LoadRunningServices gets all RunningServices
func LoadRunningServicesByHost ¶
func LoadRunningServicesByHost(conn client.Connection, hostIDs ...string) ([]dao.RunningService, error)
LoadRunningServicesByHost returns a slice of RunningServices given a host(s)
func LoadRunningServicesByService ¶
func LoadRunningServicesByService(conn client.Connection, serviceIDs ...string) ([]dao.RunningService, error)
LoadRunningServicesByService returns a slice of RunningServices per service id(s)
func MonitorResourcePool ¶
func MonitorResourcePool(shutdown <-chan interface{}, conn client.Connection, poolID string) <-chan *pool.ResourcePool
func NewHostSynchronizer ¶
func NewHostSynchronizer(handler HostSyncHandler, poolID string) *zzk.Synchronizer
NewHostSynchronizer instantiates a new Synchronizer for host data
func NewPoolSynchronizer ¶
func NewPoolSynchronizer(handler PoolSyncHandler, getConnection zzk.GetConnection) *zzk.Synchronizer
NewPoolSynchronizer initializes a new Synchronizer
func NewRunningService ¶
func NewRunningService(service *service.Service, state *servicestate.ServiceState) (*dao.RunningService, error)
NewRunningService instantiates a RunningService object from a given service and service state
func NewServiceSynchronizer ¶
func NewServiceSynchronizer(handler ServiceSyncHandler, poolID string) *zzk.Synchronizer
NewServiceSynchronizer initializes a new Synchronizer for Service data
func RemoveHost ¶
func RemoveHost(cancel <-chan interface{}, conn client.Connection, hostID string) error
func RemoveResourcePool ¶
func RemoveResourcePool(conn client.Connection, poolID string) error
func RemoveService ¶
func RemoveService(conn client.Connection, serviceID string) error
RemoveService deletes a service
func RemoveServiceVhost ¶
func RemoveServiceVhost(conn client.Connection, serviceID, vhostname string) error
RemoveServiceVhost deletes a service vhost
func RemoveServiceVhosts ¶
func RemoveServiceVhosts(conn client.Connection, svc *service.Service) error
RemoveServiceVhosts removes vhosts of a service
func ServiceLock ¶
func ServiceLock(conn client.Connection) client.Lock
ServiceLock initializes a new lock for services
func StartService ¶
func StartService(conn client.Connection, serviceID string) error
StartService schedules a service to start
func StopService ¶
func StopService(conn client.Connection, serviceID string) error
StopService schedules a service to stop
func StopServiceInstance ¶
func StopServiceInstance(conn client.Connection, hostID, stateID string) error
func SyncResourcePools ¶
func SyncResourcePools(conn client.Connection, pools []pool.ResourcePool) error
func SyncServices ¶
func SyncServices(conn client.Connection, services []service.Service) error
SyncServices synchronizes all services into zookeeper
func UpdateHost ¶
func UpdateHost(conn client.Connection, host *host.Host) error
func UpdateResourcePool ¶
func UpdateResourcePool(conn client.Connection, pool *pool.ResourcePool) error
func UpdateService ¶
func UpdateService(conn client.Connection, svc *service.Service) error
UpdateService updates a service node if it exists, otherwise creates it
func UpdateServiceState ¶
func UpdateServiceState(conn client.Connection, state *servicestate.ServiceState) error
UpdateServiceState updates a particular service state
func UpdateServiceVhost ¶
func UpdateServiceVhost(conn client.Connection, serviceID, vhostname string) error
UpdateServiceVhost updates a service vhost node if it exists, otherwise creates it
func UpdateServiceVhosts ¶
func UpdateServiceVhosts(conn client.Connection, svc *service.Service) error
UpdateServiceVhosts updates vhosts of a service
func WaitService ¶
func WaitService(shutdown <-chan interface{}, conn client.Connection, serviceID string, desiredState service.DesiredState) error
WaitService waits for a particular service's instances to reach a particular state
func WaitServiceLock ¶
func WaitServiceLock(shutdown <-chan interface{}, conn client.Connection, enabled bool) error
WatchServiceLock waits for a service lock to be enabled/disabled
Types ¶
type HostNode ¶
HostNode is the zk node for Host
func (*HostNode) Create ¶
func (node *HostNode) Create(conn client.Connection) error
Create implements zzk.Node
func (*HostNode) SetVersion ¶
func (node *HostNode) SetVersion(version interface{})
SetVersion implements client.Node
type HostRegistryListener ¶
type HostRegistryListener struct {
// contains filtered or unexported fields
}
HostRegistryListener watches ephemeral nodes on /registry/hosts and provides information about available hosts
func NewHostRegistryListener ¶
func NewHostRegistryListener() *HostRegistryListener
NewHostRegistryListener instantiates a new HostRegistryListener
func (*HostRegistryListener) Done ¶
func (l *HostRegistryListener) Done()
Done shuts down any running processes outside of the main listener, like l.GetHosts()
func (*HostRegistryListener) GetHosts ¶
func (l *HostRegistryListener) GetHosts() (hosts []*host.Host, err error)
GetHosts returns all of the registered hosts
func (*HostRegistryListener) GetPath ¶
func (l *HostRegistryListener) GetPath(nodes ...string) string
GetPath implements zzk.Listener
func (*HostRegistryListener) PostProcess ¶
func (l *HostRegistryListener) PostProcess(p map[string]struct{})
PostProcess implments zzk.Listener
func (*HostRegistryListener) Ready ¶
func (l *HostRegistryListener) Ready() (err error)
Ready implements zzk.Listener
func (*HostRegistryListener) SetConnection ¶
func (l *HostRegistryListener) SetConnection(conn client.Connection)
SetConnection implements zzk.Listener
func (*HostRegistryListener) Spawn ¶
func (l *HostRegistryListener) Spawn(shutdown <-chan interface{}, eHostID string)
Spawn listens on the host registry and waits til the node is deleted to unregister
type HostState ¶
type HostState struct { HostID string ServiceID string ServiceStateID string DesiredState int // contains filtered or unexported fields }
HostState is the zookeeper node for storing service instance information per host
func NewHostState ¶
func NewHostState(state *servicestate.ServiceState) *HostState
NewHostState instantiates a new HostState node for client.Node
func (*HostState) SetVersion ¶
func (node *HostState) SetVersion(version interface{})
SetVersion implements client.Node
type HostStateHandler ¶
type HostStateHandler interface { AttachService(*service.Service, *servicestate.ServiceState, func(string)) error StartService(*service.Service, *servicestate.ServiceState, func(string)) error PauseService(*service.Service, *servicestate.ServiceState) error ResumeService(*service.Service, *servicestate.ServiceState) error StopService(*servicestate.ServiceState) error }
HostHandler is the handler for running the HostListener
type HostStateListener ¶
type HostStateListener struct {
// contains filtered or unexported fields
}
HostStateListener is the listener for monitoring service instances
func NewHostStateListener ¶
func NewHostStateListener(handler HostStateHandler, hostID string) *HostStateListener
NewHostListener instantiates a HostListener object
func (*HostStateListener) Done ¶
func (l *HostStateListener) Done()
Done removes the ephemeral node from the host registry
func (*HostStateListener) GetPath ¶
func (l *HostStateListener) GetPath(nodes ...string) string
GetPath implements zzk.Listener
func (*HostStateListener) PostProcess ¶
func (l *HostStateListener) PostProcess(p map[string]struct{})
PostProcess implements zzk.Listener
func (*HostStateListener) Ready ¶
func (l *HostStateListener) Ready() error
Ready adds an ephemeral node to the host registry
func (*HostStateListener) SetConnection ¶
func (l *HostStateListener) SetConnection(conn client.Connection)
GetConnection implements zzk.Listener
func (*HostStateListener) Spawn ¶
func (l *HostStateListener) Spawn(shutdown <-chan interface{}, stateID string)
Spawn listens for changes in the host state and manages running instances
type HostSyncHandler ¶
type HostSyncHandler interface { // GetHostsByPool looks up all host given the pool ID GetHostsByPool(string) ([]host.Host, error) // AddUpdateHost adds or updates a host AddUpdateHost(*host.Host) error // RemoteHost removes an existing host RemoveHost(string) error }
HostSyncHandler is the handler for synchronizing local host data
type HostSynchronizer ¶
type HostSynchronizer struct {
// contains filtered or unexported fields
}
HostSynchronizer is the synchronizer for Host data
func (*HostSynchronizer) Allocate ¶
func (l *HostSynchronizer) Allocate() zzk.Node
Allocate implements zzk.SyncHandler
func (*HostSynchronizer) Delete ¶
func (l *HostSynchronizer) Delete(id string) error
Delete implements zzk.SyncHandler
func (*HostSynchronizer) GetAll ¶
func (l *HostSynchronizer) GetAll() ([]zzk.Node, error)
GetAll implements zzk.SyncHandler
func (*HostSynchronizer) GetConnection ¶
func (l *HostSynchronizer) GetConnection(path string) (client.Connection, error)
GetConnection implements zzk.SyncHandler
func (*HostSynchronizer) GetPath ¶
func (l *HostSynchronizer) GetPath(nodes ...string) string
GetPath implements zzk.SyncHandler
func (*HostSynchronizer) Ready ¶
func (l *HostSynchronizer) Ready() error
Ready implements zzk.SyncHandler
type PoolNode ¶
type PoolNode struct { *pool.ResourcePool // contains filtered or unexported fields }
func (*PoolNode) Create ¶
func (node *PoolNode) Create(conn client.Connection) error
Create implements zzk.Node
func (*PoolNode) SetVersion ¶
func (node *PoolNode) SetVersion(version interface{})
SetVersion implements client.Node
type PoolSyncHandler ¶
type PoolSyncHandler interface { // GetResourcePools gets all resource pools GetResourcePools() ([]pool.ResourcePool, error) // AddUpdateResourcePool adds or updates a resource pool AddUpdateResourcePool(*pool.ResourcePool) error // RemoveResourcePool deletes a resource pool RemoveResourcePool(string) error }
PoolSyncHandler is the handler for synchronizing ResourcePool data
type PoolSynchronizer ¶
type PoolSynchronizer struct {
// contains filtered or unexported fields
}
PoolSynchronizer is the synchronizer for ResourcePool data
func (*PoolSynchronizer) Allocate ¶
func (l *PoolSynchronizer) Allocate() zzk.Node
Allocate implements zzk.SyncHandler
func (*PoolSynchronizer) Delete ¶
func (l *PoolSynchronizer) Delete(id string) error
Delete implements zzk.SyncHandler
func (*PoolSynchronizer) GetAll ¶
func (l *PoolSynchronizer) GetAll() ([]zzk.Node, error)
GetAll implements zzk.SyncHandler
func (*PoolSynchronizer) GetConnection ¶
func (l *PoolSynchronizer) GetConnection(path string) (client.Connection, error)
GetConnection implements zzk.SyncHandler
func (*PoolSynchronizer) GetPath ¶
func (l *PoolSynchronizer) GetPath(nodes ...string) string
GetPath implements zzk.SyncHandler
func (*PoolSynchronizer) Ready ¶
func (l *PoolSynchronizer) Ready() error
Ready implements zzk.SyncHandler
type ServiceHandler ¶
ServiceHandler handles all non-zookeeper interactions required by the service
type ServiceListener ¶
ServiceListener is the listener for /services
func NewServiceListener ¶
func NewServiceListener(handler ServiceHandler) *ServiceListener
NewServiceListener instantiates a new ServiceListener
func (*ServiceListener) GetPath ¶
func (l *ServiceListener) GetPath(nodes ...string) string
GetPath implements zzk.Listener
func (*ServiceListener) PostProcess ¶
func (l *ServiceListener) PostProcess(p map[string]struct{})
PostProcess implements zzk.Listener
func (*ServiceListener) Ready ¶
func (l *ServiceListener) Ready() (err error)
Ready implements zzk.Listener
func (*ServiceListener) SetConnection ¶
func (l *ServiceListener) SetConnection(conn client.Connection)
SetConnection implements zzk.Listener
func (*ServiceListener) Spawn ¶
func (l *ServiceListener) Spawn(shutdown <-chan interface{}, serviceID string)
Spawn watches a service and syncs the number of running instances
type ServiceLockListener ¶
type ServiceLockListener struct {
// contains filtered or unexported fields
}
func NewServiceLockListener ¶
func NewServiceLockListener() *ServiceLockListener
func (*ServiceLockListener) Done ¶
func (l *ServiceLockListener) Done()
func (*ServiceLockListener) GetPath ¶
func (l *ServiceLockListener) GetPath(nodes ...string) string
func (*ServiceLockListener) PostProcess ¶
func (l *ServiceLockListener) PostProcess(p map[string]struct{})
func (*ServiceLockListener) Ready ¶
func (l *ServiceLockListener) Ready() error
func (*ServiceLockListener) SetConnection ¶
func (l *ServiceLockListener) SetConnection(conn client.Connection)
func (*ServiceLockListener) Spawn ¶
func (l *ServiceLockListener) Spawn(shutdown <-chan interface{}, poolID string)
type ServiceNode ¶
ServiceNode is the zookeeper client Node for services
func (*ServiceNode) Create ¶
func (node *ServiceNode) Create(conn client.Connection) error
Create implements zzk.Node
func (*ServiceNode) SetVersion ¶
func (node *ServiceNode) SetVersion(version interface{})
SetVersion implements client.Node
func (*ServiceNode) Update ¶
func (node *ServiceNode) Update(conn client.Connection) error
Update implements zzk.Node
func (*ServiceNode) Version ¶
func (node *ServiceNode) Version() interface{}
Version implements client.Node
type ServiceStateNode ¶
type ServiceStateNode struct { *servicestate.ServiceState // contains filtered or unexported fields }
ServiceStateNode is the zookeeper client node for service states
func (*ServiceStateNode) SetVersion ¶
func (node *ServiceStateNode) SetVersion(version interface{})
SetVersion implements client.Node
func (*ServiceStateNode) Version ¶
func (node *ServiceStateNode) Version() interface{}
Version implements client.Node
type ServiceSyncHandler ¶
type ServiceSyncHandler interface { // GetServicesByPool gets all the services for a pool ID GetServicesByPool(string) ([]service.Service, error) // AddUpdateService adds or updates a service AddUpdateService(*service.Service) error // RemoveService removes an existing service RemoveService(string) error }
ServiceSyncHandler is the handler for local Service data
type ServiceSynchronizer ¶
type ServiceSynchronizer struct {
// contains filtered or unexported fields
}
ServiceSynchonizer is the Synchronizer for Service data
func (*ServiceSynchronizer) Allocate ¶
func (l *ServiceSynchronizer) Allocate() zzk.Node
Allocate implements zzk.SyncHandler
func (*ServiceSynchronizer) Delete ¶
func (l *ServiceSynchronizer) Delete(id string) error
Delete implements zzk.SyncHandler
func (*ServiceSynchronizer) Done ¶
func (l *ServiceSynchronizer) Done()
Done implements zzk.SyncHandler
func (*ServiceSynchronizer) GetAll ¶
func (l *ServiceSynchronizer) GetAll() ([]zzk.Node, error)
GetAll implements zzk.SyncHandler
func (*ServiceSynchronizer) GetConnection ¶
func (l *ServiceSynchronizer) GetConnection(path string) (client.Connection, error)
GetConnection implements zzk.SyncHandler
func (*ServiceSynchronizer) GetPath ¶
func (l *ServiceSynchronizer) GetPath(nodes ...string) string
GetPath implements zzk.SyncHandler
func (*ServiceSynchronizer) Ready ¶
func (l *ServiceSynchronizer) Ready() error
Ready implements zzk.SyncHandler
type ServiceVhostNode ¶
type ServiceVhostNode struct { ServiceID string Vhost string // contains filtered or unexported fields }
ServiceVhostNode is the zookeeper client Node for service vhosts
func (*ServiceVhostNode) Create ¶
func (node *ServiceVhostNode) Create(conn client.Connection) error
Create implements zzk.Node
func (*ServiceVhostNode) GetID ¶
func (node *ServiceVhostNode) GetID() string
GetID implements zzk.Node
func (*ServiceVhostNode) SetVersion ¶
func (node *ServiceVhostNode) SetVersion(version interface{})
SetVersion implements client.Node
func (*ServiceVhostNode) Update ¶
func (node *ServiceVhostNode) Update(conn client.Connection) error
Update implements zzk.Node
func (*ServiceVhostNode) Version ¶
func (node *ServiceVhostNode) Version() interface{}
Version implements client.Node