mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Clean up fairqueuing/interface.go
Fixed outdated comment on QueueSet::StartRequest. Removed unused interface EmptyHandler.
This commit is contained in:
parent
323f34858d
commit
28671fc4cf
@ -66,16 +66,17 @@ type QueueSet interface {
|
||||
IsIdle() bool
|
||||
|
||||
// StartRequest begins the process of handling a request. If the
|
||||
// request gets queued and the number of queues is greater than
|
||||
// 1 then Wait uses the given hashValue as the source of entropy
|
||||
// as it shuffle-shards the request into a queue. The descr1 and
|
||||
// descr2 values play no role in the logic but appear in log
|
||||
// messages. This method always returns quickly (without waiting
|
||||
// for the request to be dequeued). If this method returns a nil
|
||||
// Request value then caller should reject the request and the
|
||||
// returned bool indicates whether the QueueSet was idle at the
|
||||
// moment of the return. Otherwise idle==false and the client
|
||||
// must call the Wait method of the Request exactly once.
|
||||
// request gets queued and the number of queues is greater than 1
|
||||
// then StartRequest uses the given hashValue as the source of
|
||||
// entropy as it shuffle-shards the request into a queue. The
|
||||
// descr1 and descr2 values play no role in the logic but appear
|
||||
// in log messages. This method always returns quickly (without
|
||||
// waiting for the request to be dequeued). If this method
|
||||
// returns a nil Request value then caller should reject the
|
||||
// request and the returned bool indicates whether the QueueSet
|
||||
// was idle at the moment of the return. Otherwise idle==false
|
||||
// and the client must call the Finish method of the Request
|
||||
// exactly once.
|
||||
StartRequest(ctx context.Context, hashValue uint64, fsName string, descr1, descr2 interface{}) (req Request, idle bool)
|
||||
}
|
||||
|
||||
@ -116,10 +117,3 @@ type DispatchingConfig struct {
|
||||
// ConcurrencyLimit is the maximum number of requests of this QueueSet that may be executing at a time
|
||||
ConcurrencyLimit int
|
||||
}
|
||||
|
||||
// EmptyHandler is used to notify the callee when all the queues
|
||||
// of a QueueSet have been drained.
|
||||
type EmptyHandler interface {
|
||||
// HandleEmpty is called to deliver the notification
|
||||
HandleEmpty()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user