Documentation
¶
Index ¶
- func CmdAssert(ctx context.Context, client *clientv3.Client, office string, minRev int64, ...) (int, error)
- func CmdWatch(ctx context.Context, client *clientv3.Client, office string, useJSON bool) (int, error)
- func CmdWho(ctx context.Context, client *clientv3.Client, office string, useJSON bool) (int, error)
- func RunElect(ctx context.Context, logger *slog.Logger, endpoints []string, ...) (int, error)
- type AssertOutput
- type ElectHolder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunElect ¶
func RunElect(ctx context.Context, logger *slog.Logger, endpoints []string, dialTimeout time.Duration, ttl time.Duration, killAfter time.Duration, restart bool, office string, waitLimit time.Duration, stableThreshold time.Duration, onAcquire string, onLose string, hookTimeout time.Duration, cmdArgs []string) (int, error)
Types ¶
type AssertOutput ¶
type ElectHolder ¶
type ElectHolder struct {
// contains filtered or unexported fields
}
func NewElectHolder ¶
func NewElectHolder(sess *core.CoreSession, office string, val string, waitLimit time.Duration) *ElectHolder
func (*ElectHolder) Key ¶
func (eh *ElectHolder) Key() string
func (*ElectHolder) Name ¶
func (eh *ElectHolder) Name() string
Click to show internal directories.
Click to hide internal directories.