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: 0

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