1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-28 03:57:02 +02:00
kratos/selector/options.go

17 lines
343 B
Go
Raw Normal View History

package selector
// SelectOptions is Select Options.
type SelectOptions struct {
NodeFilters []NodeFilter
}
// SelectOption is Selector option.
type SelectOption func(*SelectOptions)
// WithNodeFilter with filter options
func WithNodeFilter(fn ...NodeFilter) SelectOption {
return func(opts *SelectOptions) {
opts.NodeFilters = fn
}
}