bandwidth

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

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

func (m *Monitor) DeleteBucket(bucket string)

DeleteBucket deletes monitoring the 'bucket'

func (*Monitor) GetReport

func (m *Monitor) GetReport(selectBucket SelectionFunction) *madmin.BucketBandwidthReport

GetReport gets the report for all bucket bandwidth details.

type MonitorReaderOptions

type MonitorReaderOptions struct {
	Bucket               string
	Object               string
	HeaderSize           int
	BandwidthBytesPerSec int64
	ClusterBandwidth     int64
}

MonitorReaderOptions provides configurable options for monitor reader implementation.

type MonitoredReader

type MonitoredReader struct {
	// contains filtered or unexported fields
}

MonitoredReader monitors the bandwidth

func NewMonitoredReader

func NewMonitoredReader(ctx context.Context, monitor *Monitor, reader io.Reader, opts *MonitorReaderOptions) *MonitoredReader

NewMonitoredReader returns a io.Reader that reports bandwidth details.

func (*MonitoredReader) Read

func (m *MonitoredReader) Read(p []byte) (n int, err error)

Read wraps the read reader

type SelectionFunction

type SelectionFunction func(bucket string) bool

SelectionFunction for buckets

func SelectBuckets

func SelectBuckets(buckets ...string) SelectionFunction

SelectBuckets will select all the buckets passed in.

Jump to

Keyboard shortcuts

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