common

package
v0.1.2-alpha41 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Localhost = "127.0.0.1"

	InstallerVersion     = "0.1.2"
	InstallerServiceName = "installer"

	ReleaseYAMLFileName   = "release.yaml"
	MigrationListFileName = "migration.list"
	ChecksumsTXTFileName  = "checksums.txt"

	LegacyWithoutVersion = "LEGACY_WITHOUT_VERSION"

	MirrorPlaceHolder = "${MIRROR}"
	ArchPlaceHolder   = "${ARCH}"

	InstallerName       = "installer"
	InstallerConfigType = "conf"
)

Variables

View Source
var (
	EventTypeCheckUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:check-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeCheckUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:check-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeCheckUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:check-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}

	EventTypeDownloadUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:download-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeDownloadUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:download-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeDownloadUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:download-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}

	EventTypeInstallUpdateBegin = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:install-update-begin",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeInstallUpdateEnd = message_bus.EventType{
		SourceID:         InstallerServiceName,
		Name:             "installer:install-update-end",
		PropertyTypeList: []message_bus.PropertyType{},
	}
	EventTypeInstallUpdateError = message_bus.EventType{
		SourceID: InstallerServiceName,
		Name:     "installer:install-update-error",
		PropertyTypeList: []message_bus.PropertyType{
			PropertyTypeAppName,
			PropertyTypeMessage,
		},
	}
)
View Source
var (
	PropertyTypeAppName = message_bus.PropertyType{
		Name:        "app:name",
		Description: utils.Ptr("name of the app which could be a container image name including version, a snap name or the name of any other forms of app"),
		Example:     utils.Ptr("hello-world:latest (this is the name of a container image"),
	}
)
View Source
var (
	PropertyTypeMessage = message_bus.PropertyType{
		Name:        "message",
		Description: utils.Ptr("message at different levels, typically for error"),
	}
)
View Source
var SampleReleaseYAML string

Functions

func PropertiesFromContext

func PropertiesFromContext(ctx context.Context) map[string]string

Returns the properties from the context for events

func WithProperties

func WithProperties(ctx context.Context, properties map[string]string) context.Context

Returns a new context with the given properties for events.

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