known

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 0 Imported by: 0

README

因为是大仓,并且每个子项目的 known 列表规模无法预估,所以可能存在某个子项目的 known 列表很大。

为了规范 internal/pkg/known 目录下的 known 列表,规定 internal/pkg/known 目录存放内容遵循以下规范:

  • internal/pkg/known 存放更应用相关的,通用的 known 列表,例如:annotations.golabels.go
  • internal/pkg/known/{apiserver,usercenter} 存放 apiserverusercenter 私有的 known 列表。

这里没有采用 internal/pkg/known/quota.gointernal/pkg/known/usercenter.go 这种组织方式,原因如下:

  1. quota.go 可能被多个项目使用,导致里面内容杂乱无章,难以阅读;
  2. internal/pkg/known/usercenter.go 起到了文件级别的物理隔离,但 usercenter 项目其实还有很多其他 known 列表,不适合全集中在 usercenter.go 文件中。如果单独存放一个文件,文件名可能会跟其他项目重合;
  3. 所有项目的 known 列表都放在 internal/pkg/known 中,每个子项目随意创建 known 列表会造成 internal/pkg/known 难以阅读;不随意,又丧失了自由定制的优势。

Documentation

Index

Constants

View Source
const (
	// This exposes compute information based on the miner type.
	CPUAnnotation    = "apps.onex.io/vCPU"
	MemoryAnnotation = "apps.onex.io/memoryMb"
)
View Source
const (
	GenericKeystoreFile  = "UTC--2022-09-09T14-37-08.375341118Z--210d9ed12cea87e33a98aa7bcb4359eaba9e800e"
	GenericKeystoreValue = `` /* 491-byte string literal not displayed */
)
View Source
const (
	AdminUsername = "admin"
	AdminUserID   = "user-admin"
)
View Source
const (
	SkipVerifyAnnotation = "apps.onex.io/skip-verify"
)

Variables

View Source
var AllImmutableAnnotations = []string{
	CPUAnnotation,
	MemoryAnnotation,
}

Functions

This section is empty.

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