talos

Форк
0
/
overlay.go 
35 строк · 1.1 Кб
1
// This Source Code Form is subject to the terms of the Mozilla Public
2
// License, v. 2.0. If a copy of the MPL was not distributed with this
3
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4

5
// Package overlay provides an interface for overlay installers.
6
package overlay
7

8
// Installer is an interface for overlay installers.
9
type Installer[T any] interface {
10
	GetOptions(extra T) (Options, error)
11
	Install(options InstallOptions[T]) error
12
}
13

14
// Options for the overlay installer.
15
type Options struct {
16
	Name             string           `yaml:"name"`
17
	KernelArgs       []string         `yaml:"kernelArgs,omitempty"`
18
	PartitionOptions PartitionOptions `yaml:"partitionOptions,omitempty"`
19
}
20

21
// PartitionOptions for the overlay installer.
22
type PartitionOptions struct {
23
	Offset uint64 `yaml:"offset,omitempty"`
24
}
25

26
// InstallOptions for the overlay installer.
27
type InstallOptions[T any] struct {
28
	InstallDisk   string `yaml:"installDisk"`
29
	MountPrefix   string `yaml:"mountPrefix"`
30
	ArtifactsPath string `yaml:"artifactsPath"`
31
	ExtraOptions  T      `yaml:"extraOptions,omitempty"`
32
}
33

34
// ExtraOptions for the overlay installer.
35
type ExtraOptions map[string]any
36

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.