netapp

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRemoteTunnel added in v0.4.0

func AddRemoteTunnel(ctx context.Context, daemonConn net.Conn, entry *AppEntry) error

does not own `daemonConn`.

func DelRemoteTunnel added in v0.4.0

func DelRemoteTunnel(ctx context.Context, daemonConn net.Conn, entry *AppEntry) error

Types

type AppEntry added in v0.4.0

type AppEntry struct {
	SrcURL, DstURL *url.URL
	Temporary      bool
}

func ListRemoteTunnel added in v0.4.0

func ListRemoteTunnel(ctx context.Context, daemonConn net.Conn) ([]*AppEntry, error)

func (*AppEntry) Clone added in v0.4.0

func (p *AppEntry) Clone() *AppEntry

type AppEntryRequest added in v0.4.0

type AppEntryRequest struct {
	Action   string
	AppEntry *AppEntry
}

type AppEntryResponse added in v0.4.0

type AppEntryResponse struct {
	Entries []*AppEntry
}

type Context

type Context struct {
	Transport         *transport.Transport
	HTTPHandler       map[string]http.HandlerFunc
	TunnelDeviceTable map[string]*tuntable.PeerTable
	TunnelTracker     TunnelTrackerFunc

	// For Android library
	Device tun.Device
}

func NewContext

func NewContext(IdleUDPTimeout time.Duration, xConfig *xconn.Config, EnableGRO bool) *Context

func (*Context) Clone

func (c *Context) Clone() *Context

func (*Context) Serve

func (tunnelContext *Context) Serve(ctx context.Context, srcURL, dstURL *url.URL) error

func (*Context) ServeDaemon added in v0.4.0

func (tunnelContext *Context) ServeDaemon(ctx context.Context, lis net.Listener, provider EntryProvider) error

type EntryProvider added in v0.4.0

type EntryProvider interface {
	Load() ([]*AppEntry, error)
	Save([]*AppEntry) error
}

type TunnelTrackerFunc

type TunnelTrackerFunc func(SourceURL *url.URL, DestinationURLs []*url.URL) io.Closer

Jump to

Keyboard shortcuts

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