status

package
v1.6.24 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SecurityLevelOff     uint8 = 0
	SecurityLevelNormal  uint8 = 1
	SecurityLevelHigh    uint8 = 2
	SecurityLevelExtreme uint8 = 4
)

Security levels.

View Source
const DisplayHintSecurityLevel string = "security level"

DisplayHintSecurityLevel is an external option hint for security levels. It's meant to be used as a value for config.DisplayHintAnnotation.

Variables

This section is empty.

Functions

func AddToDebugInfo

func AddToDebugInfo(di *debug.Info)

AddToDebugInfo adds the system status to the given debug.Info.

func MigrateSecurityLevelToBoolean

func MigrateSecurityLevelToBoolean(option *config.Option, value any) any

MigrateSecurityLevelToBoolean migrates a security level (int) option value to a boolean option value.

Types

type Status added in v1.6.19

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

Status Module manages status information.

func New added in v1.6.19

func New(instance instance) (*Status, error)

New returns a new status module.

func (*Status) Manager added in v1.6.19

func (s *Status) Manager() *mgr.Manager

Manager returns the module manager.

func (*Status) Start added in v1.6.19

func (s *Status) Start() error

Start starts the module.

func (*Status) Stop added in v1.6.19

func (s *Status) Stop() error

Stop stops the module.

type SystemStatusRecord

type SystemStatusRecord struct {
	record.Base
	sync.Mutex

	// OnlineStatus holds the current online status as
	// seen by the netenv package.
	OnlineStatus netenv.OnlineStatus
	// CaptivePortal holds all information about the captive
	// portal of the network the portmaster is currently
	// connected to, if any.
	CaptivePortal *netenv.CaptivePortal

	Modules    []mgr.StateUpdate
	WorstState struct {
		Module string
		mgr.State
	}
}

SystemStatusRecord describes the overall status of the Portmaster. It's a read-only record exposed via runtime:system/status.

Jump to

Keyboard shortcuts

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