Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MaxVdiskAggregationDuration defines the maximum aggregation duration // used for vdisk operation (average) statistics. MaxVdiskAggregationDuration = time.Second * 30 // MinVdiskAggregationDuration defines the minimum aggregation duration // used for vdisk operation (average) statistics. MinVdiskAggregationDuration = time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VdiskLogger ¶
type VdiskLogger interface {
// LogReadOperation logs a read operation,
// using it to keep track of the read IOPS and read throughput (in KiB/s).
LogReadOperation(bytes int64)
// LogWriteOperation logs a write operation,
// using it to keep track of the write IOPS and write throughput (in KiB/s).
LogWriteOperation(bytes int64)
// Close all open resources and
// stop all background goroutines linked to this vdiskLogger.
Close() error
}
VdiskLogger defines an nbd statistics logger interface
func NewVdiskLogger ¶
func NewVdiskLogger(ctx context.Context, configSource config.Source, vdiskID string) (VdiskLogger, error)
NewVdiskLogger creates a new VdiskLogger which tracks the read and write operations of a vdisk for statistics purposes.
Click to show internal directories.
Click to hide internal directories.