mirror of
https://github.com/go-kratos/kratos.git
synced 2025-04-17 12:06:49 +02:00
17 lines
335 B
Go
17 lines
335 B
Go
package selector
|
|
|
|
// SelectOptions is Select Options.
|
|
type SelectOptions struct {
|
|
Filters []NodeFilter
|
|
}
|
|
|
|
// SelectOption is Selector option.
|
|
type SelectOption func(*SelectOptions)
|
|
|
|
// WithNodeFilter with filter options
|
|
func WithNodeFilter(fn ...NodeFilter) SelectOption {
|
|
return func(opts *SelectOptions) {
|
|
opts.Filters = fn
|
|
}
|
|
}
|