dlc

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package dlc provides ways to interact with dlcservice daemon and utilities.

Index

Constants

View Source
const (
	CacheDir    = "/var/cache/dlc"
	JobName     = "dlcservice"
	LibDir      = "/var/lib/dlcservice/dlc"
	PreloadDir  = "/var/cache/dlc-images"
	ServiceName = "org.chromium.DlcService"
	User        = "dlcservice"
)

Dlcservice related constants.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, infos ...Info) error

Cleanup removes all DLC related states and restarts dlcservice. Note that this will delete the DLC image from disk!

func Install

func Install(ctx context.Context, id, omahaURL string) error

Install calls the DBus method to install a DLC.

func List

func List(ctx context.Context) (map[string][]Info, error)

List returns all the installed DLC(s).

func Purge

func Purge(ctx context.Context, id string) error

Purge calls the DBus method to Purge a DLC.

func Uninstall

func Uninstall(ctx context.Context, id string) error

Uninstall calls the DBus method to uninstall a DLC

Types

type Info

type Info struct {
	ID        string `json:"id"`
	Package   string `json:"package"`
	RootMount string `json:"root_mount"`
}

Info holds the fields related to a DLC.

type State

type State struct {
	ID            string  `json:"id"`
	LastErrorCode string  `json:"last_error_code"`
	Progress      float32 `json:"progress"`
	RootPath      string  `json:"root_path"`
	State         int     `json:"state"`
}

State holds the fields related to the DLC state.

func GetDlcState

func GetDlcState(ctx context.Context, id string) (*State, error)

GetDlcState returns the state of a DLC.

Jump to

Keyboard shortcuts

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