Documentation
¶
Overview ¶
Package runtimebootstrap owns the Provider-to-Runtime connection input. Providers deliver this document as a private file; only Runtime interprets it.
Index ¶
Constants ¶
const MaxBytes = 16 * 1024
const PublicWorkspace = "/workspace"
PublicWorkspace is the workspace path applications and Core use for a hosted Environment. The Runtime maps it to its bound workspace directory.
const RuntimeWorkspace = "/environment/workspace"
RuntimeWorkspace is the workspace directory of the packaged Runtime layout.
const SuspendControlFile = "/run/oac/daemon-suspend.json"
SuspendControlFile is where the Runtime daemon publishes its suspend control. Its directory is private to the Runtime user. The Runtime publishes it exactly when the bootstrap sets SuspendControl, and Core's wake command reads it.
const Version = 3
Variables ¶
var ErrInvalid = errors.New("invalid Runtime bootstrap input")
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Version int `json:"version"`
CoreURL string `json:"core_url"`
DeviceID string `json:"device_id"`
Credential string `json:"credential"`
EnvironmentID string `json:"environment_id"`
SessionID string `json:"session_id"`
Workspace string `json:"workspace"`
SuspendControl bool `json:"suspend_control"`
}
Connection is a current-version launch input, not Runtime's private auth store. CoreURL includes the machine API base path. The provider owns delivery and file permissions; Runtime owns validation and its authentication representation. EnvironmentID, SessionID and Workspace bind the Runtime to its Environment. SuspendControl is true exactly when the Provider declares checkpoint support.
func Decode ¶
func Decode(raw []byte) (Connection, error)
Decode accepts one exact object. Unknown, duplicate, missing and case-aliased fields reject instead of introducing alternate spellings of this contract.
func (Connection) Marshal ¶
func (c Connection) Marshal() ([]byte, error)
func (Connection) Validate ¶
func (c Connection) Validate() error