podman

Форк
0
/
version.go 
49 строк · 1.3 Кб
1
package version
2

3
import (
4
	"github.com/blang/semver/v4"
5
	"github.com/containers/podman/v5/version/rawversion"
6
)
7

8
type (
9
	// Tree determines which API endpoint tree for version
10
	Tree int
11
	// Level determines which API level, current or something from the past
12
	Level int
13
)
14

15
const (
16
	// Libpod supports Libpod endpoints
17
	Libpod = Tree(iota)
18
	// Compat supports Libpod endpoints
19
	Compat
20

21
	// CurrentAPI announces what is the current API level
22
	CurrentAPI = Level(iota)
23
	// MinimalAPI announces what is the oldest API level supported
24
	MinimalAPI
25
)
26

27
// Version is the version of the build.
28
// NOTE: remember to bump the version at the top
29
// of the top-level README.md file when this is
30
// bumped.
31
var Version = semver.MustParse(rawversion.RawVersion)
32

33
// See https://docs.docker.com/engine/api/v1.40/
34
// libpod compat handlers are expected to honor docker API versions
35

36
// APIVersion provides the current and minimal API versions for compat and libpod endpoint trees
37
// Note: GET|HEAD /_ping is never versioned and provides the API-Version and Libpod-API-Version headers to allow
38
//
39
//	clients to shop for the Version they wish to support
40
var APIVersion = map[Tree]map[Level]semver.Version{
41
	Libpod: {
42
		CurrentAPI: Version,
43
		MinimalAPI: semver.MustParse("4.0.0"),
44
	},
45
	Compat: {
46
		CurrentAPI: semver.MustParse("1.41.0"),
47
		MinimalAPI: semver.MustParse("1.24.0"),
48
	},
49
}
50

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

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

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

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