store

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewID

func NewID() string

Types

type Disk

type Disk struct{ Dir string }

Disk reads and writes the daemon's persistent state.

func (Disk) Load added in v1.2.0

func (d Disk) Load() (PersistentState, error)

func (Disk) Save

func (d Disk) Save(state PersistentState) error

type PersistentState added in v1.2.0

type PersistentState struct {
	Subscriptions []Subscription
	Active        domain.NodeRef
	Last          domain.NodeRef
	Tun           bool
	Settings      domain.Settings
}

type Subscription

type Subscription struct {
	ID        string         `yaml:"id"`
	Name      string         `yaml:"name"`
	URL       string         `yaml:"url"`
	Nodes     []domain.Node  `yaml:"nodes"`
	UpdatedAt time.Time      `yaml:"updated_at"`
	Traffic   domain.Traffic `yaml:"traffic,omitempty"`
}

Jump to

Keyboard shortcuts

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