Documentation ¶
Index ¶
- func Context[I Info](ctx context.Context, buffer int) (context.Context, <-chan I, context.CancelFunc)
- func RegisterProvider(provider Provider, infoType Type, logger log.Logger)
- func Send[I Info](info I) error
- func StartProviders(ctx context.Context, infoType Type, logger log.Logger)
- type DownloadStatistics
- type Info
- type PeerStatistics
- type PeerStatisticsGetter
- type Provider
- type ProviderFunc
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProvider ¶
func StartProviders ¶
Types ¶
type DownloadStatistics ¶
type DownloadStatistics struct { Downloaded uint64 `json:"downloaded"` Total uint64 `json:"total"` TotalTime float64 `json:"totalTime"` DownloadRate uint64 `json:"downloadRate"` UploadRate uint64 `json:"uploadRate"` Peers int32 `json:"peers"` Files int32 `json:"files"` Connections uint64 `json:"connections"` Alloc uint64 `json:"alloc"` Sys uint64 `json:"sys"` DownloadFinished bool `json:"downloadFinished"` StagePrefix string `json:"stagePrefix"` }
func (DownloadStatistics) Type ¶
func (ti DownloadStatistics) Type() Type
type PeerStatistics ¶
type PeerStatistics struct { BytesIn uint64 BytesOut uint64 CapBytesIn map[string]uint64 CapBytesOut map[string]uint64 TypeBytesIn map[string]uint64 TypeBytesOut map[string]uint64 }
func (PeerStatistics) Type ¶
func (p PeerStatistics) Type() Type
type PeerStatisticsGetter ¶
type PeerStatisticsGetter interface {
GetPeersStatistics() map[string]*PeerStatistics
}
type ProviderFunc ¶
func (ProviderFunc) StartDiagnostics ¶
func (f ProviderFunc) StartDiagnostics(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.