tracking

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBytesMeter

func WithBytesMeter(ctx context.Context, meter BytesMeter) context.Context

Types

type BytesMeter

type BytesMeter interface {
	AddBytesWritten(n int)
	AddBytesRead(n int)

	BytesWritten() uint64
	BytesRead() uint64

	BytesWrittenDelta() uint64
	BytesReadDelta() uint64

	Launch(ctx context.Context, respFunc substreams.ResponseFunc)
	Send(ctx context.Context, respFunc substreams.ResponseFunc) error
}
var NoopBytesMeter BytesMeter = &noopBytesMeter{}

func GetBytesMeter

func GetBytesMeter(ctx context.Context) BytesMeter

func NewBytesMeter

func NewBytesMeter(ctx context.Context) BytesMeter

Jump to

Keyboard shortcuts

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