known

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 0 Imported by: 0 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.

README

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

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

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

这里没有采用 internal/pkg/known/quota.go、internal/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 (
	// XTraceID 用来定义上下文中的键,代表请求 ID.
	XTraceID = "x-trace-id"

	// XUserID 用来定义上下文的键,代表请求用户 ID. UserID 整个用户生命周期唯一.
	XUserID = "x-user-id"

	// XUsername 用来定义上下文的键,代表请求用户名.
	XUsername = "x-username"
)
View Source
const (
	// MaxErrGroupConcurrency defines the maximum concurrency level
	// for error group operations.
	MaxErrGroupConcurrency = 100
)
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