sockstatlog

package
v1.38.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: BSD-3-Clause Imports: 10 Imported by: 2

Documentation

Overview

Package sockstatlog provides a logger for capturing and storing network socket stats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger logs statistics about network sockets.

func NewLogger

func NewLogger(logdir string, logf logger.Logf) (*Logger, error)

NewLogger returns a new Logger that will store stats in logdir. On platforms that do not support sockstat logging, a nil Logger will be returned. The returned Logger must be shut down with Shutdown when it is no longer needed.

func (*Logger) Shutdown

func (l *Logger) Shutdown()

func (*Logger) WriteLogs

func (l *Logger) WriteLogs(w io.Writer)

WriteLogs reads local logs, combining logs into events, and writes them to w. Logs within eventWindow are combined into the same event.

Jump to

Keyboard shortcuts

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