Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) LocalForward(ctx context.Context, req LocalForwardReq)
- func (c *Client) LocalForwardClose(ctx context.Context, req LocalForwardReq)
- func (c *Client) RemoteForward(ctx context.Context, req RemoteForwardReq)
- func (c *Client) RemoteForwardClose(ctx context.Context, req RemoteForwardReq)
- func (c *Client) Start(ctx context.Context)
- func (c *Client) Stop(ctx context.Context)
- type ClientSet
- func (cs *ClientSet) AddIfNotExist(ctx context.Context, epKey string, cc ssh_util.ClientConfig) bool
- func (cs *ClientSet) ClearAllMark()
- func (cs *ClientSet) CloseForward(ctx context.Context, fk ForwardKey)
- func (cs *ClientSet) ForwardKeySet() ForwardKeySet
- func (cs *ClientSet) LocalForward(ctx context.Context, epKey string, req LocalForwardReq)
- func (cs *ClientSet) RemoteForward(ctx context.Context, epKey string, req RemoteForwardReq)
- func (cs *ClientSet) ResetIfChanged(ctx context.Context, epKey string, cc ssh_util.ClientConfig) bool
- func (cs *ClientSet) ResetUnmarked(ctx context.Context)
- type ForwardKey
- type ForwardKeySet
- type LocalForwardReq
- type RemoteForwardReq
- type TickFunc
Constants ¶
View Source
const ( ForwardKeyTypeL = "L" ForwardKeyTypeR = "R" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cc *ssh_util.ClientConfig) *Client
func (*Client) LocalForward ¶
func (c *Client) LocalForward(ctx context.Context, req LocalForwardReq)
func (*Client) LocalForwardClose ¶
func (c *Client) LocalForwardClose(ctx context.Context, req LocalForwardReq)
func (*Client) RemoteForward ¶
func (c *Client) RemoteForward(ctx context.Context, req RemoteForwardReq)
func (*Client) RemoteForwardClose ¶
func (c *Client) RemoteForwardClose(ctx context.Context, req RemoteForwardReq)
type ClientSet ¶
type ClientSet struct {
// contains filtered or unexported fields
}
func NewClientSet ¶
func NewClientSet() *ClientSet
func (*ClientSet) AddIfNotExist ¶
func (*ClientSet) ClearAllMark ¶
func (cs *ClientSet) ClearAllMark()
func (*ClientSet) CloseForward ¶
func (cs *ClientSet) CloseForward(ctx context.Context, fk ForwardKey)
func (*ClientSet) ForwardKeySet ¶
func (cs *ClientSet) ForwardKeySet() ForwardKeySet
func (*ClientSet) LocalForward ¶
func (cs *ClientSet) LocalForward(ctx context.Context, epKey string, req LocalForwardReq)
func (*ClientSet) RemoteForward ¶
func (cs *ClientSet) RemoteForward(ctx context.Context, epKey string, req RemoteForwardReq)
func (*ClientSet) ResetIfChanged ¶
func (*ClientSet) ResetUnmarked ¶
type ForwardKey ¶
func (*ForwardKey) Key ¶
func (fk *ForwardKey) Key() string
type ForwardKeySet ¶
type ForwardKeySet map[string]ForwardKey
func (ForwardKeySet) Add ¶
func (fks ForwardKeySet) Add(fk ForwardKey)
func (ForwardKeySet) Contains ¶
func (fks ForwardKeySet) Contains(fk ForwardKey) bool
func (ForwardKeySet) Remove ¶
func (fks ForwardKeySet) Remove(fk ForwardKey)
type LocalForwardReq ¶
type RemoteForwardReq ¶
type RemoteForwardReq struct { // LocalAddr is the address the forward will forward to LocalAddr string // LocalPort is the port the forward will forward to LocalPort int // RemoteAddr is the address on the remote to listen on RemoteAddr string // RemotePort is the address on the remote to listen on RemotePort int Tick time.Duration TickCb TickFunc }
Click to show internal directories.
Click to hide internal directories.