engine

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string
const (
	StartType   ActionType = "Start"
	StopType    ActionType = "Stop"
	RestartType ActionType = "Restart"
	SkipType    ActionType = "Skip"
)

func JudgeAction added in v0.4.3

func JudgeAction(curr, spec bool) ActionType

type Engine

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

func NewEngine

func NewEngine(ctx context.Context, cfg *config.Config) (*Engine, error)

func (*Engine) Cleanup added in v0.4.3

func (e *Engine) Cleanup()

func (*Engine) Start

func (e *Engine) Start()

type Option

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

func NewEngineOption

func NewEngineOption() *Option

func (*Option) GetProxyStatus

func (s *Option) GetProxyStatus() bool

func (*Option) GetTunnelStatus

func (s *Option) GetTunnelStatus() bool

func (*Option) SetProxyStatus

func (s *Option) SetProxyStatus(status bool)

func (*Option) SetTunnelStatus

func (s *Option) SetTunnelStatus(status bool)

type ProxyContext

type ProxyContext interface {
	ReloadClientContext(ctx context.Context)
	ReloadServerContext(ctx context.Context)
	GetClientContext() context.Context
	GetServerContext() context.Context
	GetClientCancelFunc() context.CancelFunc
	GetServerCancelFunc() context.CancelFunc
}

type ProxyEngine

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

func (*ProxyEngine) Handler added in v0.4.3

func (p *ProxyEngine) Handler() error

func (*ProxyEngine) Status added in v0.4.3

func (p *ProxyEngine) Status() bool

type TunnelEngine

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

func (*TunnelEngine) CleanupDriver added in v0.4.3

func (c *TunnelEngine) CleanupDriver()

func (*TunnelEngine) Handler added in v0.4.3

func (c *TunnelEngine) Handler() error

sync syncs full state according to the gateway list.

func (*TunnelEngine) InitDriver added in v0.4.3

func (c *TunnelEngine) InitDriver() error

func (*TunnelEngine) Status added in v0.4.3

func (c *TunnelEngine) Status() bool

Jump to

Keyboard shortcuts

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