Documentation ¶
Overview ¶
Package client implements a client to the apiserver to acquire locks.
Index ¶
- type Driver
- func (d *Driver) AddStopChan(name string) chan struct{}
- func (d *Driver) HeartbeatMount(ttl time.Duration, payload *config.UseMount, stop chan struct{})
- func (d *Driver) RemoveStopChan(name string)
- func (d *Driver) ReportMount(ut *config.UseMount) error
- func (d *Driver) ReportMountStatus(ut *config.UseMount) error
- func (d *Driver) ReportUnmount(ut *config.UseMount) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver is the main force behind the lock module, it controls all methods and several variables.
func (*Driver) AddStopChan ¶
AddStopChan adds a stop channel to a map for heartbeat tracking purposes.
func (*Driver) HeartbeatMount ¶
HeartbeatMount reports a mount to a apiserver periodically. It loops endlessly, and is intended to run as a goroutine. Note the stop channel, AddStopChan and RemoveStopChan are used to manage these entities.
func (*Driver) RemoveStopChan ¶
RemoveStopChan removes a stop channel and mapping from the hearbeat tracker.
func (*Driver) ReportMount ¶
ReportMount reports a new mount to the apiserver.
func (*Driver) ReportMountStatus ¶
ReportMountStatus refreshes the mount status (and lock, by axiom).