Documentation ¶
Index ¶
- Constants
- type Executor
- func (p *Executor) AddNode(n adapter.AdapterProxy)
- func (p *Executor) AddNodeByClash(m map[string]any) error
- func (p *Executor) AddNodeByV2rayLink(s string) error
- func (p *Executor) ChooseProxy() adapter.AdapterProxy
- func (p *Executor) CleanDeadNodes()
- func (p *Executor) Listen(port string) error
- func (p *Executor) OnDelayCheck(logic func(node adapter.AdapterProxy, delay time.Duration))
- func (p *Executor) OnNodeAdd(logic func(node adapter.AdapterProxy))
- func (p *Executor) OnNodeDel(logic func(node adapter.AdapterProxy))
- func (p *Executor) SetAdapterRule(ar *rule.AdapterRule)
- type ExecutorCallback
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) AddNodeByV2rayLink ¶
func (*Executor) ChooseProxy ¶
func (p *Executor) ChooseProxy() adapter.AdapterProxy
func (*Executor) CleanDeadNodes ¶
func (p *Executor) CleanDeadNodes()
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) }
Click to show internal directories.
Click to hide internal directories.