Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor implements the monitoring for bandwidth measurements.
func NewMonitor ¶
func NewMonitor(doneCh <-chan struct{}) *Monitor
NewMonitor returns a monitor with defaults.
func (*Monitor) DeleteBucket ¶
DeleteBucket deletes monitoring the 'bucket'
func (*Monitor) GetReport ¶
func (m *Monitor) GetReport(selectBucket SelectionFunction) *bandwidth.Report
GetReport gets the report for all bucket bandwidth details.
func (*Monitor) SubscribeToBuckets ¶
func (m *Monitor) SubscribeToBuckets(subCh chan interface{}, doneCh <-chan struct{}, buckets []string)
SubscribeToBuckets subscribes to buckets. Empty array for monitoring all buckets.
type MonitoredReader ¶
type MonitoredReader struct {
// contains filtered or unexported fields
}
MonitoredReader monitors the bandwidth
func NewMonitoredReader ¶
func NewMonitoredReader(ctx context.Context, monitor *Monitor, bucket string, object string, reader io.ReadCloser, headerSize int, bandwidthBytesPerSecond int64, clusterBandwidth int64) *MonitoredReader
NewMonitoredReader returns a io.ReadCloser that reports bandwidth details. The supplied reader will be closed.
type SelectionFunction ¶
SelectionFunction for buckets
func SelectBuckets ¶
func SelectBuckets(buckets ...string) SelectionFunction
SelectBuckets will select all the buckets passed in.
Click to show internal directories.
Click to hide internal directories.