traced

package
v0.0.0-...-a345226 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MaxLogSize is the size threshold at which the current trace file will be
	// rotated. The default value is 10Mb.
	MaxLogSize = 1024 * 1024 * 64

	// MaxLogTime is the maximum amount of time a file will remain open before
	// being rotated.
	MaxLogTime = time.Hour
)

Functions

This section is empty.

Types

type TraceCollector

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

func NewTraceCollector

func NewTraceCollector(host host.Host, dir, jsonTrace string) (*TraceCollector, error)

NewTraceCollector creates a new pubsub traces collector. A collector is a process that listens on a libp2p endpoint, accepts pubsub tracing streams from peers, and records the incoming data into rotating gzip files. If the json argument is not empty, then every time a new trace is generated, it will be written to this directory in json format for online processing.

func (*TraceCollector) Flush

func (tc *TraceCollector) Flush()

Flush flushes and rotates the current file.

func (*TraceCollector) Stop

func (tc *TraceCollector) Stop()

Stop stops the collector.

Jump to

Keyboard shortcuts

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