strace

package
v0.0.0-...-5143a5f Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParseFailure = errors.New("parse failure")

Functions

This section is empty.

Types

type CommandInfo

type CommandInfo struct {
	Command []string
	Env     []string
}

type FileInfo

type FileInfo struct {
	Path      string
	Read      bool
	Write     bool
	Delete    bool
	WriteInfo WriteInfo
}

type Result

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

func Parse

func Parse(ctx context.Context, r io.Reader, debugLogger *slog.Logger) (*Result, error)

Parse reads the output from strace and collects the files, sockets and commands that were accessed. debugLogger can be used to log verbose information about strace parsing.

func (*Result) Commands

func (r *Result) Commands() []CommandInfo

Commands returns all the exec'd commands from the parsed strace.

func (*Result) Files

func (r *Result) Files() []FileInfo

Files returns all the files access from the parsed strace.

func (*Result) Sockets

func (r *Result) Sockets() []SocketInfo

Sockets returns all the IPv4 and IPv6 sockets from the parsed strace.

type SocketInfo

type SocketInfo struct {
	Address string
	Port    int
}

type WriteContentInfo

type WriteContentInfo struct {
	WriteBufferId string
	BytesWritten  int64
}

type WriteInfo

type WriteInfo []WriteContentInfo

Jump to

Keyboard shortcuts

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