snapshot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package snapshot provides protocol library snapshot and session recording.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages protocol snapshots.

func NewManager

func NewManager(dir string) *Manager

NewManager creates a new snapshot manager.

func (*Manager) Create

func (m *Manager) Create(name string, protocols []string) (*Snapshot, error)

Create creates a new snapshot.

func (*Manager) List

func (m *Manager) List() ([]*Snapshot, error)

List lists all snapshots.

func (*Manager) Load

func (m *Manager) Load(name string) (*Snapshot, error)

Load loads a snapshot by name.

type SessionRecord

type SessionRecord struct {
	ID        string    `json:"id"`
	StartTime time.Time `json:"start_time"`
	EndTime   time.Time `json:"end_time"`
	Packets   int       `json:"packets"`
	Protocol  string    `json:"protocol"`
}

SessionRecord represents a recorded protocol session.

type Snapshot

type Snapshot struct {
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	Hash      string    `json:"hash"`
	Protocols []string  `json:"protocols"`
	Size      int64     `json:"size"`
}

Snapshot represents a saved protocol library state.

Jump to

Keyboard shortcuts

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