Documentation ¶
Index ¶
- type DiskEvent
- type DiskMonitor
- type EventAction
- type EventQueue
- func (q *EventQueue) Add(event *DiskEvent)
- func (q *EventQueue) AddRateLimited(event *DiskEvent)
- func (q *EventQueue) Done(event *DiskEvent)
- func (q *EventQueue) Forget(event *DiskEvent)
- func (q *EventQueue) Get() (*DiskEvent, bool)
- func (q *EventQueue) NumRequeues(event *DiskEvent) int
- func (q *EventQueue) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskEvent ¶
type DiskEvent struct { DevName string Action EventAction Content string Major string Minor string Subsystem string SeqNum int }
DiskEvent struct
type EventAction ¶
type EventAction string
EventAction type
const ( ActionAdd EventAction = "add" ActionRemove EventAction = "remove" ActionChange EventAction = "change" )
consts
type EventQueue ¶
type EventQueue struct {
// contains filtered or unexported fields
}
EventQueue is rate limiting queue for event
func (*EventQueue) AddRateLimited ¶
func (q *EventQueue) AddRateLimited(event *DiskEvent)
AddRateLimited a event
func (*EventQueue) Done ¶
func (q *EventQueue) Done(event *DiskEvent)
Done completes the event and remove from the queue
func (*EventQueue) Forget ¶
func (q *EventQueue) Forget(event *DiskEvent)
Forget cleanup the rate limit on the event
func (*EventQueue) Get ¶
func (q *EventQueue) Get() (*DiskEvent, bool)
Get a event from queue. It's a blocking call
func (*EventQueue) NumRequeues ¶
func (q *EventQueue) NumRequeues(event *DiskEvent) int
NumRequeues get number of event retried
Click to show internal directories.
Click to hide internal directories.