Table of Contents

Class CellResourceDeclaration

Namespace
KernLab.Cell.Contracts
Assembly
KernLab.Cell.Contracts.dll

资源档声明(§6.3——pack 声明期望资源档,供 spec 翻译 cgroup v2/JobObject;容器不做软件执法)。

public sealed record CellResourceDeclaration : IEquatable<CellResourceDeclaration>
Inheritance
CellResourceDeclaration
Implements
Inherited Members

Constructors

CellResourceDeclaration()

public CellResourceDeclaration()

Properties

CpuCores

CPU 配额(核数,可带小数;null=不声明)。

public double? CpuCores { get; init; }

Property Value

double?

MaxProcesses

进程/线程数上限(null=不声明)。

public int? MaxProcesses { get; init; }

Property Value

int?

MemoryBytes

内存上限(字节;null=不声明——由 spec/部署面决定)。

public long? MemoryBytes { get; init; }

Property Value

long?

None

无声明档(全由部署面决定)。

public static CellResourceDeclaration None { get; }

Property Value

CellResourceDeclaration

Methods

Equals(CellResourceDeclaration?)

public bool Equals(CellResourceDeclaration? other)

Parameters

other CellResourceDeclaration

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CellResourceDeclaration?, CellResourceDeclaration?)

public static bool operator ==(CellResourceDeclaration? left, CellResourceDeclaration? right)

Parameters

left CellResourceDeclaration
right CellResourceDeclaration

Returns

bool

operator !=(CellResourceDeclaration?, CellResourceDeclaration?)

public static bool operator !=(CellResourceDeclaration? left, CellResourceDeclaration? right)

Parameters

left CellResourceDeclaration
right CellResourceDeclaration

Returns

bool