Documentation ¶
Index ¶
- Constants
- func BackupFilter[T any]() selector.Filter[T]
- func FIFOStrategy[T any]() selector.Strategy[T]
- func FailFilter[T any](maxFails int, timeout time.Duration) selector.Filter[T]
- func HashStrategy[T any]() selector.Strategy[T]
- func NewSelector[T any](strategy selector.Strategy[T], filters ...selector.Filter[T]) selector.Selector[T]
- func RandomStrategy[T any]() selector.Strategy[T]
- func RoundRobinStrategy[T any]() selector.Strategy[T]
Constants ¶
View Source
const ( DefaultMaxFails = 1 DefaultFailTimeout = 10 * time.Second )
default options for FailFilter
Variables ¶
This section is empty.
Functions ¶
func BackupFilter ¶
BackupFilter filters the backup objects. An object is marked as backup if its metadata has backup flag.
func FIFOStrategy ¶
FIFOStrategy is a strategy for node selector. The node will be selected from first to last, and will stick to the selected node until it is failed.
func FailFilter ¶
FailFilter filters the dead objects. An object is marked as dead if its failed count is greater than MaxFails.
func HashStrategy ¶
func NewSelector ¶
func RandomStrategy ¶
RandomStrategy is a strategy for node selector. The node will be selected randomly.
func RoundRobinStrategy ¶
RoundRobinStrategy is a strategy for node selector. The node will be selected by round-robin algorithm.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.