Documentation ¶
Index ¶
- type RundownProtection
- func (r *RundownProtection) Acquire() bool
- func (_ *RundownProtection) Deadline() (deadline time.Time, ok bool)
- func (r *RundownProtection) Done() <-chan struct{}
- func (r *RundownProtection) Err() error
- func (r *RundownProtection) Initialize()
- func (r *RundownProtection) Release()
- func (_ *RundownProtection) Value(_ any) any
- func (r *RundownProtection) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RundownProtection ¶
type RundownProtection struct {
// contains filtered or unexported fields
}
func (*RundownProtection) Acquire ¶
func (r *RundownProtection) Acquire() bool
Acquire increments the usage counter unless a rundown is in progress.
func (*RundownProtection) Deadline ¶ added in v1.1.0
func (_ *RundownProtection) Deadline() (deadline time.Time, ok bool)
Deadline returns the time when work done on behalf of this context should be canceled.
func (*RundownProtection) Done ¶ added in v1.1.0
func (r *RundownProtection) Done() <-chan struct{}
Done returns a channel that's closed when work done on behalf of this context should be canceled.
func (*RundownProtection) Err ¶ added in v1.1.0
func (r *RundownProtection) Err() error
Err returns a non-nil error explaining why the channel was closed or nil if still open.
func (*RundownProtection) Initialize ¶ added in v1.0.2
func (r *RundownProtection) Initialize()
Initialize initializes a rundown protection object.
func (*RundownProtection) Release ¶
func (r *RundownProtection) Release()
Release decrements the usage counter.
func (*RundownProtection) Value ¶ added in v1.1.0
func (_ *RundownProtection) Value(_ any) any
Value returns the value associated with this context for key, if any exists, or nil.
func (*RundownProtection) Wait ¶
func (r *RundownProtection) Wait()
Wait initiates the shutdown process and waits until all acquisitions are released.
Click to show internal directories.
Click to hide internal directories.