Documentation ¶
Index ¶
- Variables
- 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) FailedHistory(context.Context, *emptypb.Empty) (*gs.FailedHistoryList, error)
- 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)
- type FailedHistory
- type TotalCache
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 Connections ¶
type Connections struct { gs.UnimplementedConnectionsServer netapi.Proxy Cache *TotalCache // contains filtered or unexported fields }
func NewConnStore ¶
func NewConnStore(cache cache.Cache, dialer netapi.Proxy) *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) FailedHistory ¶ added in v0.3.7
func (c *Connections) FailedHistory(context.Context, *emptypb.Empty) (*gs.FailedHistoryList, error)
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)
type FailedHistory ¶ added in v0.3.7
type FailedHistory struct {
// contains filtered or unexported fields
}
func (*FailedHistory) Get ¶ added in v0.3.7
func (h *FailedHistory) Get() *gs.FailedHistoryList
type TotalCache ¶
type TotalCache struct {
// contains filtered or unexported fields
}
func NewTotalCache ¶
func NewTotalCache(cache cache.Cache) *TotalCache
func (*TotalCache) AddDownload ¶
func (c *TotalCache) AddDownload(d uint64)
func (*TotalCache) AddUpload ¶
func (c *TotalCache) AddUpload(d uint64)
func (*TotalCache) Close ¶
func (c *TotalCache) Close()
func (*TotalCache) LoadDownload ¶
func (c *TotalCache) LoadDownload() uint64
func (*TotalCache) LoadUpload ¶
func (c *TotalCache) LoadUpload() uint64
Click to show internal directories.
Click to hide internal directories.