executor

package
v0.0.0-...-98358cc Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Alive    = "alive"
	Delay    = "delay"
	Speed    = "speed"
	SpeedStr = "speed_str"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

func NewExecutor

func NewExecutor() *Executor

func (*Executor) AddNode

func (p *Executor) AddNode(n adapter.AdapterProxy)

func (*Executor) AddNodeByClash

func (p *Executor) AddNodeByClash(m map[string]any) error
func (p *Executor) AddNodeByV2rayLink(s string) error

func (*Executor) ChooseProxy

func (p *Executor) ChooseProxy() adapter.AdapterProxy

func (*Executor) CleanDeadNodes

func (p *Executor) CleanDeadNodes()

func (*Executor) Listen

func (p *Executor) Listen(port string) error

func (*Executor) OnDelayCheck

func (p *Executor) OnDelayCheck(logic func(node adapter.AdapterProxy, delay time.Duration))

func (*Executor) OnNodeAdd

func (p *Executor) OnNodeAdd(logic func(node adapter.AdapterProxy))

func (*Executor) OnNodeDel

func (p *Executor) OnNodeDel(logic func(node adapter.AdapterProxy))

func (*Executor) SetAdapterRule

func (p *Executor) SetAdapterRule(ar *rule.AdapterRule)

type ExecutorCallback

type ExecutorCallback struct {
	OnNodeAdd    func(node adapter.AdapterProxy)
	OnNodeDel    func(node adapter.AdapterProxy)
	OnDelayCheck func(node adapter.AdapterProxy, delay time.Duration)
}

Jump to

Keyboard shortcuts

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