Documentation ¶
Index ¶
- type FSM
- func (fsm *FSM) Apply(log *raft.Log) interface{}
- func (fsm *FSM) Persist(sink raft.SnapshotSink) error
- func (fsm *FSM) PrimaryInfo() litefs.PrimaryInfo
- func (fsm *FSM) RedirectURL() string
- func (fsm *FSM) Release()
- func (fsm *FSM) Restore(snapshot io.ReadCloser) error
- func (fsm *FSM) Snapshot() (raft.FSMSnapshot, error)
- type PrimaryRedirectInfo
- type RaftLeaser
- func (l *RaftLeaser) Acquire(ctx context.Context) (litefs.Lease, error)
- func (l *RaftLeaser) AcquireExisting(ctx context.Context, leaseID string) (litefs.Lease, error)
- func (l *RaftLeaser) AdvertiseURL() string
- func (l *RaftLeaser) Close() error
- func (l *RaftLeaser) ClusterID(ctx context.Context) (string, error)
- func (l *RaftLeaser) Hostname() string
- func (l *RaftLeaser) PrimaryInfo(ctx context.Context) (litefs.PrimaryInfo, error)
- func (l *RaftLeaser) RedirectURL() string
- func (l *RaftLeaser) SetClusterID(ctx context.Context, clusterID string) error
- func (l *RaftLeaser) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSM ¶
type FSM struct {
// contains filtered or unexported fields
}
func (*FSM) PrimaryInfo ¶
func (fsm *FSM) PrimaryInfo() litefs.PrimaryInfo
func (*FSM) RedirectURL ¶
type PrimaryRedirectInfo ¶
type PrimaryRedirectInfo struct { PrimaryInfo litefs.PrimaryInfo RedirectURL string }
type RaftLeaser ¶
type RaftLeaser struct {
// contains filtered or unexported fields
}
func New ¶
func New(r *raft.Raft, localInfo PrimaryRedirectInfo, fsm *FSM, ttl time.Duration) *RaftLeaser
func (*RaftLeaser) AcquireExisting ¶
func (*RaftLeaser) AdvertiseURL ¶
func (l *RaftLeaser) AdvertiseURL() string
func (*RaftLeaser) Close ¶
func (l *RaftLeaser) Close() error
func (*RaftLeaser) Hostname ¶
func (l *RaftLeaser) Hostname() string
func (*RaftLeaser) PrimaryInfo ¶
func (l *RaftLeaser) PrimaryInfo(ctx context.Context) (litefs.PrimaryInfo, error)
func (*RaftLeaser) RedirectURL ¶
func (l *RaftLeaser) RedirectURL() string
func (*RaftLeaser) SetClusterID ¶
func (l *RaftLeaser) SetClusterID(ctx context.Context, clusterID string) error
func (*RaftLeaser) Type ¶
func (l *RaftLeaser) Type() string
Click to show internal directories.
Click to hide internal directories.