storage

package
v0.0.0-...-6e90328 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter func([]*proxy.Proxy) []*proxy.Proxy

Filter is used to filter a proxy during the selection process

func FilterScore

func FilterScore(threshold int8) Filter

FilterScore is a score based Select Filter which will only return proxies which score >= threshold

type SelectOption

type SelectOption func(*SelectOptions)

func WithFilter

func WithFilter(fn ...Filter) SelectOption

WithFilter adds a filter function to the list of filters used during the Select call

func WithLimit

func WithLimit(limit int) SelectOption

WithLimit sets the limit number of proxies returned

func WithOffset

func WithOffset(offset int) SelectOption

WithLimit sets the proxies return from offset position in backend

type SelectOptions

type SelectOptions struct {
	Filters []Filter
	Limit   int
	Offset  int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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