Documentation ¶
Index ¶
- Variables
- type Cache
- type Connections
- func (c *Connections) Close() error
- func (c *Connections) CloseConn(_ context.Context, x *gs.NotifyRemoveConnections) (*emptypb.Empty, error)
- func (c *Connections) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)
- func (c *Connections) Conns(context.Context, *emptypb.Empty) (*gs.NotifyNewConnections, error)
- func (c *Connections) DumpProcess(ctx context.Context, addr netapi.Address) (s string)
- func (c *Connections) Notify(_ *emptypb.Empty, s gs.Connections_NotifyServer) error
- func (c *Connections) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)
- func (c *Connections) Remove(id uint64)
- func (c *Connections) Total(context.Context, *emptypb.Empty) (*gs.TotalFlow, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DownloadKey = []byte{'D', 'O', 'W', 'N', 'L', 'O', 'A', 'D'} UploadKey = []byte{'U', 'P', 'L', 'O', 'A', 'D'} SyncThreshold int64 = 1024 * 1024 * 50 // bytes )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) AddDownload ¶
func (*Cache) LoadDownload ¶
func (*Cache) LoadUpload ¶
type Connections ¶
type Connections struct { gs.UnimplementedConnectionsServer netapi.Proxy Cache *Cache // contains filtered or unexported fields }
func NewConnStore ¶
func NewConnStore(cache *cache.Cache, dialer netapi.Proxy, processDumper listener.ProcessDumper) *Connections
func (*Connections) Close ¶
func (c *Connections) Close() error
func (*Connections) CloseConn ¶
func (c *Connections) CloseConn(_ context.Context, x *gs.NotifyRemoveConnections) (*emptypb.Empty, error)
func (*Connections) Conns ¶
func (c *Connections) Conns(context.Context, *emptypb.Empty) (*gs.NotifyNewConnections, error)
func (*Connections) DumpProcess ¶
func (*Connections) Notify ¶
func (c *Connections) Notify(_ *emptypb.Empty, s gs.Connections_NotifyServer) error
func (*Connections) PacketConn ¶
func (c *Connections) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)
func (*Connections) Remove ¶
func (c *Connections) Remove(id uint64)
Click to show internal directories.
Click to hide internal directories.