Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterProviders ¶ added in v0.13.1
func FilterProviders(ctx sdk.Context, filters []Filter, providers []epochstoragetypes.StakeEntry, strictestPolicy planstypes.Policy, currentEpoch uint64) ([]epochstoragetypes.StakeEntry, error)
Types ¶
type Filter ¶
type Filter interface { Filter(ctx sdk.Context, providers []epochstoragetypes.StakeEntry, currentEpoch uint64) []bool InitFilter(strictestPolicy planstypes.Policy) bool // return if filter is usable (by the policy) }
func GetAllFilters ¶
func GetAllFilters() []Filter
type FrozenProvidersFilter ¶
type FrozenProvidersFilter struct{}
func (*FrozenProvidersFilter) Filter ¶
func (f *FrozenProvidersFilter) Filter(ctx sdk.Context, providers []epochstoragetypes.StakeEntry, currentEpoch uint64) []bool
func (*FrozenProvidersFilter) InitFilter ¶
func (f *FrozenProvidersFilter) InitFilter(strictestPolicy planstypes.Policy) bool
type GeolocationFilter ¶
type GeolocationFilter struct {
// contains filtered or unexported fields
}
func (*GeolocationFilter) Filter ¶
func (f *GeolocationFilter) Filter(ctx sdk.Context, providers []epochstoragetypes.StakeEntry, currentEpoch uint64) []bool
func (*GeolocationFilter) InitFilter ¶
func (f *GeolocationFilter) InitFilter(strictestPolicy planstypes.Policy) bool
type SelectedProvidersFilter ¶
type SelectedProvidersFilter struct {
// contains filtered or unexported fields
}
func (*SelectedProvidersFilter) Filter ¶
func (f *SelectedProvidersFilter) Filter(ctx sdk.Context, providers []epochstoragetypes.StakeEntry, currentEpoch uint64) []bool
func (*SelectedProvidersFilter) InitFilter ¶
func (f *SelectedProvidersFilter) InitFilter(strictestPolicy planstypes.Policy) bool
Click to show internal directories.
Click to hide internal directories.