handler

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package handler contains experiment events handler

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks interface {
	// OnDataUsage provides information about data usage.
	OnDataUsage(dloadKiB, uploadKiB float64)

	// OnProgress provides information about an experiment progress.
	OnProgress(percentage float64, message string)
}

Callbacks contains event handling callbacks

type PrinterCallbacks

type PrinterCallbacks struct {
	log.Logger
}

PrinterCallbacks is the default event handler

func NewPrinterCallbacks

func NewPrinterCallbacks(logger log.Logger) PrinterCallbacks

NewPrinterCallbacks returns a new default callback handler

func (PrinterCallbacks) OnDataUsage

func (d PrinterCallbacks) OnDataUsage(dloadKiB, uploadKiB float64)

OnDataUsage provides information about data usage.

func (PrinterCallbacks) OnProgress

func (d PrinterCallbacks) OnProgress(percentage float64, message string)

OnProgress provides information about an experiment progress.

Jump to

Keyboard shortcuts

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