Class SandboxSpec
- Namespace
- Openshell.V1
- Assembly
- OpenShell.Sdk.dll
Desired sandbox configuration provided through the public API.
public sealed class SandboxSpec : IMessage<SandboxSpec>, IEquatable<SandboxSpec>, IDeepCloneable<SandboxSpec>, IBufferMessage, IMessage
- Inheritance
-
SandboxSpec
- Implements
-
IMessage<SandboxSpec>IDeepCloneable<SandboxSpec>IBufferMessageIMessage
- Inherited Members
Constructors
SandboxSpec()
public SandboxSpec()
SandboxSpec(SandboxSpec)
public SandboxSpec(SandboxSpec other)
Parameters
otherSandboxSpec
Fields
CommandFieldNumber
Field number for the "command" field.
public const int CommandFieldNumber = 12
Field Value
EnvironmentFieldNumber
Field number for the "environment" field.
public const int EnvironmentFieldNumber = 5
Field Value
LogLevelFieldNumber
Field number for the "log_level" field.
public const int LogLevelFieldNumber = 1
Field Value
PolicyFieldNumber
Field number for the "policy" field.
public const int PolicyFieldNumber = 7
Field Value
ProviderAttachmentEpochFieldNumber
Field number for the "provider_attachment_epoch" field.
public const int ProviderAttachmentEpochFieldNumber = 14
Field Value
ProvidersFieldNumber
Field number for the "providers" field.
public const int ProvidersFieldNumber = 8
Field Value
ResourceRequirementsFieldNumber
Field number for the "resource_requirements" field.
public const int ResourceRequirementsFieldNumber = 9
Field Value
RestartPolicyFieldNumber
Field number for the "restart_policy" field.
public const int RestartPolicyFieldNumber = 15
Field Value
TemplateFieldNumber
Field number for the "template" field.
public const int TemplateFieldNumber = 6
Field Value
TtyFieldNumber
Field number for the "tty" field.
public const int TtyFieldNumber = 13
Field Value
Properties
Command
Canonical command launched once by the sandbox supervisor. No shell parsing is performed. The gateway normalizes an omitted command to the portable scratch login shell before persistence.
public RepeatedField<string> Command { get; }
Property Value
- RepeatedField<string>
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
Environment
Environment variables injected into the sandbox runtime.
public MapField<string, string> Environment { get; }
Property Value
LogLevel
Log level exposed to processes running inside the sandbox.
public string LogLevel { get; set; }
Property Value
Parser
public static MessageParser<SandboxSpec> Parser { get; }
Property Value
- MessageParser<SandboxSpec>
Policy
Required sandbox policy configuration.
public SandboxPolicy Policy { get; set; }
Property Value
ProviderAttachmentEpoch
Gateway-owned attachment identity, changed atomically with the provider set. Equality only: detach and reattach must not revive an older receipt.
public string ProviderAttachmentEpoch { get; set; }
Property Value
Providers
Provider names to attach to this sandbox.
public RepeatedField<string> Providers { get; }
Property Value
- RepeatedField<string>
ResourceRequirements
Portable resource requirements used by the gateway for driver selection and by drivers for provisioning.
public ResourceRequirements ResourceRequirements { get; set; }
Property Value
RestartPolicy
Gateway-owned policy for replacing the sandbox runtime after the canonical main process exits. Unspecified is normalized to Never before persistence.
public SandboxRestartPolicy RestartPolicy { get; set; }
Property Value
Template
Container or VM template used to provision the sandbox.
public SandboxTemplate Template { get; set; }
Property Value
Tty
Allocate a retained pseudo-terminal for the main process.
public bool Tty { get; set; }
Property Value
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public SandboxSpec Clone()
Returns
- SandboxSpec
A deep clone of this object.
Equals(SandboxSpec)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(SandboxSpec other)
Parameters
otherSandboxSpecAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(SandboxSpec)
Merges the given message into this one.
public void MergeFrom(SandboxSpec other)
Parameters
otherSandboxSpec
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.