Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquisitionCtl ¶
type AcquisitionCtl struct {
// contains filtered or unexported fields
}
AcquisitionCtl is a primitive for controlling acquisition status.
func NewAcquisitionCtl ¶
func NewAcquisitionCtl(max int64, acquired map[string]int64) *AcquisitionCtl
NewAcquisitionCtl creates new AcquisitionCtl.
func (*AcquisitionCtl) Acquire ¶
func (c *AcquisitionCtl) Acquire(ctx context.Context, operator string, exclusive bool) (<-chan AcquisitionResult, bool)
Acquire acquires exclusive/shared lock.
func (*AcquisitionCtl) Acquired ¶ added in v0.0.4
func (c *AcquisitionCtl) Acquired(operator string) bool
func (*AcquisitionCtl) Release ¶
func (c *AcquisitionCtl) Release(operator string) bool
Release releases acquired lock.
type AcquisitionResult ¶
type InitCtl ¶
type InitCtl struct {
// contains filtered or unexported fields
}
InitCtl is a primitive for controlling init status.
type TryInitResult ¶
Click to show internal directories.
Click to hide internal directories.