configstate

package
v0.0.0-...-1a99902 Latest Latest
Warning

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

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

Documentation

Overview

Package configstate implements the manager and state aspects responsible for the configuration of snaps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(st *state.State, snapName string, patch map[string]interface{}, flags int) *state.TaskSet

Configure returns a taskset to apply the given configuration patch.

func ConfigureHookTimeout

func ConfigureHookTimeout() time.Duration

func ConfigureInstalled

func ConfigureInstalled(st *state.State, snapName string, patch map[string]interface{}, flags int) (*state.TaskSet, error)

ConfigureInstalled returns a taskset to apply the given configuration patch for an installed snap. It returns snap.NotInstalledError if the snap is not installed.

func ContextTransaction

func ContextTransaction(context *hookstate.Context) *config.Transaction

ContextTransaction retrieves the transaction cached within the context (and creates one if it hasn't already been cached).

func Init

func Init(st *state.State, hookManager *hookstate.HookManager) error

func MockConfigcoreExportExperimentalFlags

func MockConfigcoreExportExperimentalFlags(mock func(tr config.ConfGetter) error) (restore func())

func MockConfigcoreRun

func MockConfigcoreRun(f func(config.Conf) error) (restore func())

func RemapSnapFromRequest

func RemapSnapFromRequest(snapName string) string

RemapSnapFromRequest renames a snap as received from an API request

func RemapSnapToResponse

func RemapSnapToResponse(snapName string) string

RemapSnapToResponse renames a snap as about to be sent from an API response

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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