Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blocker ¶
type Blocker struct {
// contains filtered or unexported fields
}
Blocker provides a function which can block some process. Unblock strategy bases on Priority. The higher the priority, the earlier it will be unblocked. Unblocking is done by consuming tickets. If ticket chan is nil when new a Blocker, Blocker will keep printing tickets itself.
func NewBlocker ¶
func NewBlocker(ticketChan <-chan struct{}) *Blocker
NewBlocker create a new Blocker instance.
func (*Blocker) Block ¶
Block the process, until a ticket with the priority of the flag consumed.
func (*Blocker) GetPriority ¶
GetPriority query the priority of the flag. If never set, will return PriorityLevel5.
Click to show internal directories.
Click to hide internal directories.