standby

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockStandbyWait

func MockStandbyWait(d time.Duration) (restore func())

Types

type Opinionator

type Opinionator interface {
	CanStandby() bool
}

type StandbyOpinions

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

StandbyOpinions tracks if snapd can go into socket activation mode

func New

func New(st *state.State) *StandbyOpinions

func (*StandbyOpinions) AddOpinion

func (m *StandbyOpinions) AddOpinion(opi Opinionator)

func (*StandbyOpinions) CanStandby

func (m *StandbyOpinions) CanStandby() bool

CanStandby returns true if the main ensure loop can go into "socket-activation" mode. This is only possible once seeding is done and there are no snaps on the system. This is to reduce the memory footprint on e.g. containers.

func (*StandbyOpinions) Start

func (m *StandbyOpinions) Start()

func (*StandbyOpinions) Stop

func (m *StandbyOpinions) Stop()

Jump to

Keyboard shortcuts

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