service

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*tunnel.NodeInfo
	// bridge address
	Addr string
	// writer
	Writer io.Writer
	// reader
	Reader *bufio.Reader
	// session for mux
	Session *yamux.Session
	// contains filtered or unexported fields
}

func NewClient

func NewClient(nodeInfo *tunnel.NodeInfo, addr string) *Client

func (*Client) Connect

func (c *Client) Connect(r *connectResp)

Connect event

func (*Client) ConnectLoop

func (c *Client) ConnectLoop() error

Wait a task with loop

func (*Client) Register

func (c *Client) Register() error

Register service

func (*Client) Upstream

func (c *Client) Upstream()

first action upstream

type Tower added in v0.0.3

type Tower struct {
	*tunnel.NodeInfo
	Clients map[string]*Client
}

func New added in v0.0.3

func New(config *config.Service) (*Tower, error)

func (*Tower) Upstream added in v0.0.3

func (t *Tower) Upstream()

Jump to

Keyboard shortcuts

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