flower

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2018 License: BSD-3-Clause Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type Config

type Config struct {
	ID                string
	Hash              string
	ControlServer     string
	HeartbeatInterval time.Duration
	Timeout           struct {
		GracefulShutdown time.Duration
		Control          util.TimeoutConfig
		Tunnel           util.TimeoutConfig
		Local            util.TimeoutConfig
	}
	Retrier *retry.Retrier
}

func (*Config) BuildRPCClientConf

func (conf *Config) BuildRPCClientConf() *birpc.ClientConfig

type Controler

type Controler struct {
	sync.RWMutex
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewControler

func NewControler(conf *Config) (*Controler, error)

func (*Controler) HandleCloseTunnelRequest

func (c *Controler) HandleCloseTunnelRequest(req *msgpb.CloseTunnelRequest) *msgpb.CloseTunnelResponse

func (*Controler) HandleError

func (c *Controler) HandleError(err error)

func (*Controler) HandleNewTunnelRequest

func (c *Controler) HandleNewTunnelRequest(req *msgpb.NewTunnelRequest) *msgpb.NewTunnelResponse

func (*Controler) HandlePingResponse

func (c *Controler) HandlePingResponse(req *msgpb.PingResponse)

func (*Controler) HandleShutdownRequest

func (c *Controler) HandleShutdownRequest(req *msgpb.ShutdownRequest) bool

func (*Controler) HandleUnknownMessage

func (c *Controler) HandleUnknownMessage(msg interface{})

func (*Controler) Run

func (c *Controler) Run() error

type TCPProxy

type TCPProxy struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTCPProxy

func NewTCPProxy(req *msgpb.NewTunnelRequest, ctl *Controler) (*TCPProxy, error)

func (*TCPProxy) Close

func (p *TCPProxy) Close() error

func (*TCPProxy) Serve

func (p *TCPProxy) Serve()

Jump to

Keyboard shortcuts

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