Documentation
¶
Index ¶
- type Backend
- func (m *Backend) AckNotification(id string) error
- func (m *Backend) AddClient(id string) error
- func (m *Backend) AddLease(lease *lease.Lease) error
- func (m *Backend) AddLeaseRequest(request *lease.LeaseRequest) error
- func (m *Backend) AddVolume(volume *server.Volume) error
- func (m *Backend) Clients(f server.ClientFilterFunc) ([]server.ClientInfo, error)
- func (m *Backend) DeleteLease(leaseID string) error
- func (m *Backend) DeleteLeaseRequest(leaseRequestID string) error
- func (m *Backend) DeleteVolume(id string) error
- func (m *Backend) GetClient(id string) (server.ClientInfo, error)
- func (m *Backend) GetVolume(id string) (*server.Volume, error)
- func (m *Backend) ListLeaseRequests(f lease.LeaseRequestFilterFunc) ([]*lease.LeaseRequest, error)
- func (m *Backend) ListLeases(f lease.LeaseFilterFunc) ([]*lease.Lease, error)
- func (m *Backend) ListVolumes(f server.VolumeFilterFunc) ([]*server.Volume, error)
- func (m *Backend) RemoveClient(id string) error
- func (m *Backend) UpdateClient(id string, status server.ClientStatus) error
- func (m *Backend) UpdateLease(lease *lease.Lease) error
- func (m *Backend) UpdateLeaseRequest(request *lease.LeaseRequest) error
- func (m *Backend) UpdateVolume(volume *server.Volume) error
- func (m *Backend) WatchNotification(id string) (chan struct{}, error)
- func (m *Backend) WatchNotifications(id string, ch chan<- server.Notification) error
- func (m *Backend) WriteNotification(id string, n server.Notification) error
- type ClientMap
- type LeaseMap
- type LeaseRequestMap
- type VolumeMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements server.Backend
func (*Backend) AckNotification ¶
AckNotification acks a notification
func (*Backend) AddLeaseRequest ¶
func (m *Backend) AddLeaseRequest(request *lease.LeaseRequest) error
AddLeaseRequest adds a LeaseRequest to the backend
func (*Backend) Clients ¶
func (m *Backend) Clients(f server.ClientFilterFunc) ([]server.ClientInfo, error)
Clients returns a list of server.ClientInfo
func (*Backend) DeleteLease ¶
DeleteLease removes a Lease from the backend
func (*Backend) DeleteLeaseRequest ¶
DeleteLeaseRequest removes a LeaseRequest from the backend
func (*Backend) DeleteVolume ¶
DeleteVolume satisfies server.Backend
func (*Backend) GetClient ¶
func (m *Backend) GetClient(id string) (server.ClientInfo, error)
GetClient returns a ClientInfo for a given client id
func (*Backend) ListLeaseRequests ¶
func (m *Backend) ListLeaseRequests(f lease.LeaseRequestFilterFunc) ([]*lease.LeaseRequest, error)
ListLeaseRequests returns a list of lease.LeaseRequest
func (*Backend) ListLeases ¶
ListLeases returns a list of lease.Lease
func (*Backend) ListVolumes ¶
ListVolumes satisfies server.Backend
func (*Backend) RemoveClient ¶
RemoveClient deletes a given client from the ClientMap
func (*Backend) UpdateClient ¶
func (m *Backend) UpdateClient(id string, status server.ClientStatus) error
UpdateClient updates the client info for a given client
func (*Backend) UpdateLease ¶
UpdateLease updates a Lease in the backend
func (*Backend) UpdateLeaseRequest ¶
func (m *Backend) UpdateLeaseRequest(request *lease.LeaseRequest) error
UpdateLeaseRequest updates a LeaseRequest in the backend
func (*Backend) UpdateVolume ¶
UpdateVolume satisfies server.Backend
func (*Backend) WatchNotification ¶
WatchNotification returns a channel that will be closed when the notification is acked
func (*Backend) WatchNotifications ¶
func (m *Backend) WatchNotifications(id string, ch chan<- server.Notification) error
WatchNotifications writes notifications to a given channel
func (*Backend) WriteNotification ¶
func (m *Backend) WriteNotification(id string, n server.Notification) error
WriteNotification writes a Notification into a channel in a blocking manner
type ClientMap ¶
type ClientMap struct {
// contains filtered or unexported fields
}
ClientMap maps clients to their info
type LeaseMap ¶
type LeaseMap struct {
// contains filtered or unexported fields
}
LeaseMap holds information about leases
type LeaseRequestMap ¶
type LeaseRequestMap struct {
// contains filtered or unexported fields
}
LeaseRequestMap holds information about LeaseRequests
func NewLeaseRequestMap ¶
func NewLeaseRequestMap() *LeaseRequestMap
NewLeaseRequestMap returns an initialized LeaseRequestMap