filters

package
v0.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

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 AddonFilter

type AddonFilter struct {
	// contains filtered or unexported fields
}

func (*AddonFilter) Filter

func (f *AddonFilter) Filter(ctx sdk.Context, providers []epochstoragetypes.StakeEntry, currentEpoch uint64) []bool

func (*AddonFilter) InitFilter

func (f *AddonFilter) InitFilter(strictestPolicy planstypes.Policy) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL