Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelKeyManagedBy = "app.kubernetes.io/managed-by" LabelValManagedBy = "ksblob" LabelKeyComponent = "app.kubernetes.io/component" LabelValComponent = "chunk" LabelKeyName = "ksblob.guoyk.net/name" LabelKeyRevision = "ksblob.guoyk.net/revision" KeyName = "name" KeyRevision = "revision" KeyChunks = "chunks" KeyChecksum = "checksum" KeyData = "data" )
View Source
const (
DefaultChunkSize = 4096
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrChecksumMismatch = errors.New("checksum mismatch") ErrInvalidHeaderFieldName = errors.New("missing or invalid field in header secret: 'name'") ErrInvalidHeaderFieldChecksum = errors.New("missing or invalid field in header secret: 'checksum'") ErrInvalidHeaderFieldRevision = errors.New("missing or invalid field in header secret: 'revision'") ErrInvalidHeaderFieldChunks = errors.New("missing or invalid field in header secret: 'chunks'") )
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct {
// contains filtered or unexported fields
}
func (*Blob) Load ¶
Load load all data from kubernetes secrets / 从 Kubernetes Secret 载入全部数据
type Options ¶
type Options struct { // Client kubernetes client / kubernetes 客户端 Client *kubernetes.Clientset // Name Blob name, use as Secret name / Blob 名称,同时会用作 Secret 名 Name string // Namespace kubernetes namespace / kubernetes 命名空间 Namespace string // ChunkSize maximum size of each chunk / 最大分片大小 ChunkSize int }
Options options to create Blob / 创建 Blob 所需要的参数
Click to show internal directories.
Click to hide internal directories.