mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #91189 from MikeSpreitzer/fq-comments
Clean up fairqueuing/interface.go
This commit is contained in:
commit
3ccf38dab0
@ -66,16 +66,17 @@ type QueueSet interface {
|
|||||||
IsIdle() bool
|
IsIdle() bool
|
||||||
|
|
||||||
// StartRequest begins the process of handling a request. If the
|
// StartRequest begins the process of handling a request. If the
|
||||||
// request gets queued and the number of queues is greater than
|
// request gets queued and the number of queues is greater than 1
|
||||||
// 1 then Wait uses the given hashValue as the source of entropy
|
// then StartRequest uses the given hashValue as the source of
|
||||||
// as it shuffle-shards the request into a queue. The descr1 and
|
// entropy as it shuffle-shards the request into a queue. The
|
||||||
// descr2 values play no role in the logic but appear in log
|
// descr1 and descr2 values play no role in the logic but appear
|
||||||
// messages. This method always returns quickly (without waiting
|
// in log messages. This method always returns quickly (without
|
||||||
// for the request to be dequeued). If this method returns a nil
|
// waiting for the request to be dequeued). If this method
|
||||||
// Request value then caller should reject the request and the
|
// returns a nil Request value then caller should reject the
|
||||||
// returned bool indicates whether the QueueSet was idle at the
|
// request and the returned bool indicates whether the QueueSet
|
||||||
// moment of the return. Otherwise idle==false and the client
|
// was idle at the moment of the return. Otherwise idle==false
|
||||||
// must call the Wait method of the Request exactly once.
|
// 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)
|
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 is the maximum number of requests of this QueueSet that may be executing at a time
|
||||||
ConcurrencyLimit int
|
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