Documentation
¶
Index ¶
- type Client
- func (c *Client) AcquireHaltLock(ctx context.Context, primaryURL string, nodeID uint64, name string, ...) (*litefs.HaltLock, error)
- func (c *Client) Commit(ctx context.Context, primaryURL string, nodeID uint64, name string, ...) error
- func (c *Client) ReleaseHaltLock(ctx context.Context, primaryURL string, nodeID uint64, name string, ...) error
- func (c *Client) Stream(ctx context.Context, primaryURL string, nodeID uint64, ...) (io.ReadCloser, error)
- type Lease
- type Leaser
- func (l *Leaser) Acquire(ctx context.Context) (litefs.Lease, error)
- func (l *Leaser) AcquireExisting(ctx context.Context, leaseID string) (litefs.Lease, error)
- func (l *Leaser) AdvertiseURL() string
- func (l *Leaser) Close() error
- func (l *Leaser) PrimaryInfo(ctx context.Context) (litefs.PrimaryInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
AcquireHaltLockFunc func(ctx context.Context, primaryURL string, nodeID uint64, name string, lockID int64) (*litefs.HaltLock, error)
ReleaseHaltLockFunc func(ctx context.Context, primaryURL string, nodeID uint64, name string, lockID int64) error
CommitFunc func(ctx context.Context, primaryURL string, nodeID uint64, name string, lockID int64, r io.Reader) error
StreamFunc func(ctx context.Context, primaryURL string, nodeID uint64, posMap map[string]litefs.Pos) (io.ReadCloser, error)
}
func (*Client) AcquireHaltLock ¶ added in v0.4.0
func (*Client) ReleaseHaltLock ¶ added in v0.4.0
type Lease ¶
type Leaser ¶
type Leaser struct {
CloseFunc func() error
AdvertiseURLFunc func() string
AcquireFunc func(ctx context.Context) (litefs.Lease, error)
AcquireExistingFunc func(ctx context.Context, leaseID string) (litefs.Lease, error)
PrimaryInfoFunc func(ctx context.Context) (litefs.PrimaryInfo, error)
}
func (*Leaser) AcquireExisting ¶ added in v0.4.0
func (*Leaser) AdvertiseURL ¶
func (*Leaser) PrimaryInfo ¶
Click to show internal directories.
Click to hide internal directories.