core

package
v0.9.8-dev.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: GPL-3.0 Imports: 32 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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapConfig

func BootstrapConfig(settings config.Settings) ([]byte, error)

func CleanupCompletedUpdates added in v0.9.6

func CleanupCompletedUpdates(ctx context.Context, store ProvenanceStore) (resultErr error)

CleanupCompletedUpdates retries completed transactions at daemon startup.

func CompiledAssetDigest added in v0.9.3

func CompiledAssetDigest(ctx context.Context, goos, arch, tag, channel string) (string, error)

CompiledAssetDigest returns the compiled SHA-256 for one supported Unix core.

func DetectVerifiedVersion added in v0.9.3

func DetectVerifiedVersion(ctx context.Context, v *VerifiedCore, x VerifiedExecutor) (string, error)

DetectVerifiedVersion verifies the pair/candidate again immediately before -v.

func DetectVersion

func DetectVersion(ctx context.Context, runner CommandRunner, binaryPath string) (string, error)

func DownloadMigrationCore added in v0.9.3

func DownloadMigrationCore(ctx context.Context, client *http.Client, goos, arch, tag string) (binary, receipt []byte, resultErr error)

DownloadMigrationCore retrieves only the pinned supported asset, then derives a receipt from the independently compiled digest rather than a source receipt.

func EnsureRuntimeConfig

func EnsureRuntimeConfig(path string, settings config.Settings) error

func FileReferenceEnvironment added in v0.9.7

func FileReferenceEnvironment() []string

FileReferenceEnvironment permits approved native mihomo file references. Replace inherited policy rather than relying on duplicate environment keys.

func InterruptedUpdate added in v0.9.6

func InterruptedUpdate(ctx context.Context, store ProvenanceStore) (bool, error)

InterruptedUpdate detects unfinished updates without attempting recovery.

func OpenValidationCore added in v0.9.6

func OpenValidationCore(ctx context.Context, s ProvenanceStore) (bool, error)

OpenValidationCore opens a bundled or local core for install validation. A missing receipt is allowed. Absence is not an error. An unfinished journal or pending core update still fails through OpenInstalledCore.

func ParseAlphaSHA added in v0.5.0

func ParseAlphaSHA(name string) string

func ParseVersion

func ParseVersion(output string) (string, error)

func RebuildMigrationCore added in v0.9.3

func RebuildMigrationCore(ctx context.Context, goos, arch, tag string, archive []byte) ([]byte, []byte, error)

RebuildMigrationCore verifies a compressed artifact against the compiled Unix table and derives both core bytes and provenance. It never executes the core.

func RecoverProvenance added in v0.9.3

func RecoverProvenance(ctx context.Context, s ProvenanceStore) error

RecoverProvenance converges the entire pair before any core execution. The caller must hold the daemon/maintenance lifecycle lease with no core running.

func ReportProgress added in v0.9.7

func ReportProgress(ctx context.Context, progress Progress)

ReportProgress publishes progress when the context carries a reporter.

func ValidateConfig

func ValidateConfig(ctx context.Context, runner CommandRunner, binaryPath, dataDir, configPath string) error

func ValidateVerifiedConfig added in v0.9.3

func ValidateVerifiedConfig(ctx context.Context, v *VerifiedCore, c *ConfigCapability, x VerifiedExecutor) error

ValidateVerifiedConfig preserves the selected candidate identity and hash.

func VerifyCompiledAssetDigest added in v0.9.3

func VerifyCompiledAssetDigest(ctx context.Context, goos, arch, tag, channel, digestHex string) error

VerifyCompiledAssetDigest checks a digest against the compiled Unix core table. Callers must obtain the digest from an independent TLS checksum or a root-only offline manifest; a user-supplied request hash is not the trust root.

func WithProgressReporter added in v0.9.7

func WithProgressReporter(ctx context.Context, report func(Progress)) context.Context

WithProgressReporter returns a context the core installer uses to publish phase changes.

func WriteBootstrapConfig

func WriteBootstrapConfig(path string, settings config.Settings) error

Types

type Asset

type Asset struct {
	ID        int64  `json:"id"`
	Name      string `json:"name"`
	URL       string `json:"browser_download_url"`
	Size      int64  `json:"size"`
	Digest    string `json:"digest"`
	State     string `json:"state"`
	UpdatedAt string `json:"updated_at"`
}

func SelectAsset

func SelectAsset(release Release, goos, goarch, channel string) (Asset, error)

type Candidate

type Candidate struct {
	// contains filtered or unexported fields
}

func (*Candidate) BeginReinstall added in v0.9.6

func (c *Candidate) BeginReinstall(ctx context.Context, intent UpdateIntent) (*UpdateTransaction, error)

BeginReinstall supersedes an interrupted update only at explicit user request.

func (*Candidate) BeginUpdate added in v0.9.6

func (c *Candidate) BeginUpdate(ctx context.Context, intent UpdateIntent) (*UpdateTransaction, error)

BeginUpdate binds this already-validated candidate to the owner's update intent.

func (*Candidate) Cleanup

func (c *Candidate) Cleanup()

func (*Candidate) Commit

func (c *Candidate) Commit() (InstallResult, error)

func (*Candidate) Revalidate added in v0.9.7

func (c *Candidate) Revalidate(ctx context.Context, content []byte) error

Revalidate checks retained legacy candidate bytes against current config inputs.

func (*Candidate) UpdateCandidate added in v0.9.6

func (c *Candidate) UpdateCandidate() PreparedUpdate

UpdateCandidate exposes recoverable publication when this candidate has a protected store. Legacy pair candidates are retained only for migration.

func (*Candidate) Updated

func (c *Candidate) Updated() bool

func (*Candidate) Verified added in v0.9.3

func (c *Candidate) Verified(ctx context.Context) (*VerifiedCore, error)

Verified opens this authenticated candidate, including a green installation where no installed pair exists. Commit/Cleanup revoke all candidate commands.

func (*Candidate) Version

func (c *Candidate) Version() string

func (*Candidate) Warnings added in v0.9.6

func (c *Candidate) Warnings() []error

Warnings returns preparation diagnostics for the operation owner to publish.

type CommandRunner

type CommandRunner interface {
	Run(context.Context, string, ...string) ([]byte, error)
}

type ConfigCapability added in v0.9.3

type ConfigCapability struct {
	// contains filtered or unexported fields
}

ConfigCapability binds a selected generated candidate or committed config.

func BindGeneratedConfig added in v0.9.3

func BindGeneratedConfig(ctx context.Context, data *platform.TrustedRoot, relative string, expectedSHA256 [32]byte) (*ConfigCapability, error)

BindGeneratedConfig borrows D and owns a held read descriptor and its parent. expectedSHA256 must be computed by Manager from fresh generated configuration bytes.

func (*ConfigCapability) Close added in v0.9.3

func (c *ConfigCapability) Close() error

func (*ConfigCapability) Path added in v0.9.3

func (c *ConfigCapability) Path(ctx context.Context) (string, error)

Path revalidates and returns this exact config role for the reload adapter.

type CoreCommand added in v0.9.3

type CoreCommand struct {
	Binary, Home, Config string
	Args, Env            []string
}

CoreCommand is the complete command produced by verified capabilities.

type CorePurpose added in v0.9.3

type CorePurpose uint8

CorePurpose selects exactly one supported command shape.

const (
	CoreVersion CorePurpose = iota
	CoreValidate
	CoreRun
)

type CoreSelection added in v0.9.6

type CoreSelection struct {
	Channel  string `json:"channel"`
	Bundle   string `json:"bundle,omitempty"`
	Version  string `json:"version,omitempty"`
	AlphaSHA string `json:"alpha_sha,omitempty"`
}

CoreSelection is the core-owned portion of settings and observed identity. Bundle is the consumed installer sidecar stamp, not an online release tag.

type GeneratedConfig added in v0.9.3

type GeneratedConfig struct {
	// contains filtered or unexported fields
}

GeneratedConfig retains the exact generated bytes selected for validation.

func (*GeneratedConfig) Close added in v0.9.3

func (g *GeneratedConfig) Close() error

Close retires a generated candidate; identity mismatch leaves the object intact.

func (*GeneratedConfig) Hash added in v0.9.3

func (g *GeneratedConfig) Hash() [32]byte

Hash is the hash of the generated bytes, never a caller-supplied trust root.

func (*GeneratedConfig) Path added in v0.9.3

func (g *GeneratedConfig) Path(ctx context.Context) (string, error)

Path is the selected candidate path, for fixed-path reload adapters only.

type InstallRequest

type InstallRequest struct {
	BinaryPath     string
	DataDir        string
	ConfigPath     string
	StagingDir     string
	CurrentVersion string
	Channel        string
	AlphaSHA       string
}

type InstallResult

type InstallResult struct {
	Version  string
	Updated  bool
	AlphaSHA string
}

type Installer

type Installer struct {
	// Provenance binds protected staging and execution to a verified data root.
	Provenance ProvenanceStore
	// Updates enables daemon-owned transactions without changing execution policy.
	Updates         ProvenanceStore
	GeneratedConfig func(context.Context) (*ConfigCapability, error)
	Executor        VerifiedExecutor
	Reporter        diagnostics.Reporter

	HTTPClient   *http.Client
	APIBase      string
	Repository   string
	GOOS         string
	GOARCH       string
	Runner       CommandRunner
	CheckTimeout time.Duration // 包住"检查最新版"请求,默认 8s。资产下载不设 http.Client.Timeout,只跟随请求 context。
}

func (Installer) CheckExecution added in v0.9.6

func (i Installer) CheckExecution(ctx context.Context) error

CheckExecution refuses an incomplete update outside its owning lifecycle. Normal ordinary-platform starts retain their existing execution policy.

func (Installer) DetectVersion added in v0.2.0

func (i Installer) DetectVersion(ctx context.Context, binaryPath string) (string, error)

DetectVersion reports a local core version after the configured platform checks. Setup uses it to recognize an existing offline or administrator-deployed core.

func (Installer) Download added in v0.2.0

func (i Installer) Download(ctx context.Context, asset Asset, destination string) (resultErr error)

Download 取 asset 并落盘到 destination,校验 asset.Digest 的 sha256:<hex> (bundler 复用入口,design §4.1 export 边界;绝不照 self.go 复刻——其无 Digest 校验)。 以 O_WRONLY|O_TRUNC 写入:调用方需先落盘目标文件(与 Prepare 内 CreateTemp 同契约)。

func (Installer) Install

func (i Installer) Install(ctx context.Context, request InstallRequest) (InstallResult, error)

func (Installer) LatestRelease added in v0.2.0

func (i Installer) LatestRelease(ctx context.Context, channel string) (release Release, resultErr error)

LatestRelease 取 mihomo 最新 release(bundler 复用入口,design §4.1 export 边界)。 channel=="alpha" 走滚动 tag Prerelease-Alpha;其余(含空)走 /releases/latest。

func (Installer) LatestVersion added in v0.9.5

func (i Installer) LatestVersion(ctx context.Context, channel string) (string, error)

LatestVersion checks release metadata without downloading or executing a core.

func (Installer) Prepare

func (i Installer) Prepare(ctx context.Context, request InstallRequest) (PreparedCore, error)

func (Installer) ResolveTarget added in v0.9.6

func (i Installer) ResolveTarget(ctx context.Context, channel string) (ReleaseTarget, error)

ResolveTarget resolves the channel once for an online installation.

func (Installer) UpdateStore added in v0.9.6

func (i Installer) UpdateStore() ProvenanceStore

UpdateStore returns the daemon-owned store used for explicit reinstall.

type LocalCoreInfo added in v0.4.0

type LocalCoreInfo struct {
	Ready   bool
	Version string
}

LocalCoreInfo reports whether an existing local core binary satisfies setup without a network download. Ready mirrors the Install setup fast-path predicate (DetectVersion success + non-empty version), kept DRY with manager.Install (design §4.3). Read-only; never persists or mutates state.

type OSCommandRunner

type OSCommandRunner struct{}

func (OSCommandRunner) Run

func (OSCommandRunner) Run(ctx context.Context, name string, args ...string) ([]byte, error)

type OSVerifiedExecutor added in v0.9.3

type OSVerifiedExecutor struct{}

OSVerifiedExecutor explicitly assigns the allowlisted environment.

func (OSVerifiedExecutor) Execute added in v0.9.3

func (OSVerifiedExecutor) Execute(ctx context.Context, c CoreCommand) ([]byte, error)

type PreparedCore

type PreparedCore interface {
	Version() string
	Updated() bool
	Commit() (InstallResult, error)
	Cleanup()
}

type PreparedUpdate added in v0.9.6

type PreparedUpdate interface {
	BeginUpdate(context.Context, UpdateIntent) (*UpdateTransaction, error)
}

PreparedUpdate binds a validated candidate to a runtime-owned transaction.

type Progress added in v0.9.7

type Progress struct {
	Phase    string
	Received int64
	Total    int64
}

Progress is one observation of a core install phase. Total is the compressed release asset size; zero means the publisher did not give one.

type ProvenanceMutation added in v0.9.3

type ProvenanceMutation struct {
	Role, Source             ProvenanceRole
	Transaction              string
	Expected, SourceExpected ProvenanceObject
}

ProvenanceMutation replaces/removes one observed fixed-role object.

type ProvenanceObject added in v0.9.3

type ProvenanceObject struct {
	Present  bool   `json:"present"`
	SHA256   string `json:"sha256,omitempty"`
	Identity string `json:"identity,omitempty"`
	BootID   string `json:"boot_id,omitempty"`
}

ProvenanceObject is an observation, not authority to bypass store checks.

type ProvenanceReceipt added in v0.9.3

type ProvenanceReceipt struct {
	Schema       string `json:"schema"`
	PolicyID     string `json:"policy_id"`
	AssetSHA256  string `json:"asset_sha256"`
	BinarySHA256 string `json:"binary_sha256"`
	OS           string `json:"os"`
	Arch         string `json:"arch"`
	Tag          string `json:"tag"`
}

ProvenanceReceipt records a binary derived from an immutable supported asset. Receipts are accepted only from the private store, never from a caller or migration tree.

type ProvenanceRole added in v0.9.3

type ProvenanceRole string

ProvenanceRole identifies a fixed object within the private data root.

const (
	InstalledBinary   ProvenanceRole = "binary"
	InstalledReceipt  ProvenanceRole = "receipt"
	CandidateBinary   ProvenanceRole = "candidate_binary"
	CandidateReceipt  ProvenanceRole = "candidate_receipt"
	BackupBinary      ProvenanceRole = "backup_binary"
	BackupReceipt     ProvenanceRole = "backup_receipt"
	RestoreBinary     ProvenanceRole = "restore_binary"
	RestoreReceipt    ProvenanceRole = "restore_receipt"
	QuarantineBinary  ProvenanceRole = "quarantine_binary"
	QuarantineReceipt ProvenanceRole = "quarantine_receipt"
	PairJournal       ProvenanceRole = "journal"
	TransactionMarker ProvenanceRole = "transaction_marker"
)
const (
	UpdateJournal     ProvenanceRole = "update_journal"
	UpdateCandidate   ProvenanceRole = "update_candidate"
	UpdateBackup      ProvenanceRole = "update_backup"
	UpdateRestore     ProvenanceRole = "update_restore"
	UpdateMarker      ProvenanceRole = "update_marker"
	UpdateInterrupted ProvenanceRole = "update_interrupted"
	// UpdateCleanup retains a completed transaction until a later startup.
	UpdateCleanup ProvenanceRole = "update_cleanup"
)

type ProvenanceStore added in v0.9.3

type ProvenanceStore interface {
	Load(context.Context, ProvenanceRole, string) ([]byte, error)
	Save(context.Context, ProvenanceRole, string, []byte) error
	Apply(context.Context, ProvenanceMutation) error
	Inspect(context.Context, ProvenanceRole, string) (ProvenanceObject, error)
	Sync(context.Context) error
	// contains filtered or unexported methods
}

ProvenanceStore is implemented by the core-owned Unix capability adapter. Its private method prevents callers from supplying an untrusted path/hash store.

func NewProvenanceStore added in v0.9.3

func NewProvenanceStore(ctx context.Context, data *platform.TrustedRoot) (ProvenanceStore, error)

NewProvenanceStore borrows a root-owned 0700 D capability. The caller keeps D and its lifecycle lease alive until all store/config/core capabilities close.

func NewUpdateStore added in v0.9.6

func NewUpdateStore(root string) (ProvenanceStore, error)

NewUpdateStore binds transaction IO to the existing private application root. It deliberately provides no installed-core execution capability. The daemon retains responsibility for validating its platform data-root access policy.

type Release

type Release struct {
	ID      int64   `json:"id"`
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

type ReleaseTarget added in v0.9.6

type ReleaseTarget struct {
	// contains filtered or unexported fields
}

ReleaseTarget binds one update to an official release and asset observation. Its fields cannot be supplied by control clients or mutated after resolution.

type TrustedExecution added in v0.9.3

type TrustedExecution struct {
	// contains filtered or unexported fields
}

TrustedExecution binds core and generated configuration IO to one trusted D. Unix construction borrows D; no public fields can replace its authorities.

func NewTrustedExecution added in v0.9.3

func NewTrustedExecution(ctx context.Context, data *platform.TrustedRoot, executor VerifiedExecutor) (*TrustedExecution, error)

NewTrustedExecution borrows the root-owned data capability and an optional test executor. The daemon closes all capabilities before releasing its lease.

func (*TrustedExecution) BindRepairConfig added in v0.9.6

func (t *TrustedExecution) BindRepairConfig(ctx context.Context) error

BindRepairConfig retains the existing configuration without executing the interrupted core. Only a freshly downloaded candidate will validate it.

func (*TrustedExecution) CheckPaths added in v0.9.3

func (t *TrustedExecution) CheckPaths(root, binary, configuration string) error

CheckPaths prevents a root assembly from mixing capabilities with another tree.

func (*TrustedExecution) CommittedConfig added in v0.9.3

func (t *TrustedExecution) CommittedConfig(ctx context.Context) (*ConfigCapability, error)

CommittedConfig requires the hash accepted by initialization or publication.

func (*TrustedExecution) InitializeConfig added in v0.9.3

func (t *TrustedExecution) InitializeConfig(ctx context.Context, generated []byte) error

InitializeConfig validates and publishes already-generated startup bytes. A bootstrap may be accepted when no local core exists and no recovery is pending.

func (*TrustedExecution) InstalledAvailable added in v0.9.3

func (t *TrustedExecution) InstalledAvailable(ctx context.Context) (bool, error)

InstalledAvailable checks local executable availability after legacy recovery. An orphan historical receipt does not turn a missing core into a broken pair.

func (*TrustedExecution) Installer added in v0.9.3

func (t *TrustedExecution) Installer() Installer

Installer returns the root installer; path/args Runner is never used.

func (*TrustedExecution) PrepareGenerated added in v0.9.3

func (t *TrustedExecution) PrepareGenerated(ctx context.Context, generated []byte) (*GeneratedConfig, error)

PrepareGenerated receives fresh generated bytes from Manager's generator. The caller's revision check remains in the mutation coordinator.

func (*TrustedExecution) PreviousConfig added in v0.9.3

func (t *TrustedExecution) PreviousConfig(ctx context.Context) ([]byte, error)

PreviousConfig captures the last bound bytes for rollback under the mutation lease.

func (*TrustedExecution) Provenance added in v0.9.3

func (t *TrustedExecution) Provenance() ProvenanceStore

Provenance returns the fixed-role store for startup recovery under the lease.

func (*TrustedExecution) Publish added in v0.9.3

func (t *TrustedExecution) Publish(ctx context.Context, g *GeneratedConfig, expected [32]byte) (*ConfigCapability, error)

Publish verifies the selected candidate again and atomically writes those same bytes. Manager invokes this only after its mutation/revision check, then reloads.

func (*TrustedExecution) RestoreConfig added in v0.9.3

func (t *TrustedExecution) RestoreConfig(ctx context.Context, previous []byte) (*ConfigCapability, error)

RestoreConfig reinstalls bytes captured through PreviousConfig, then rebinds.

func (*TrustedExecution) RunCommand added in v0.9.3

func (t *TrustedExecution) RunCommand(ctx context.Context) (CoreCommand, func() error, error)

RunCommand obtains a fresh installed pair plus committed configuration for Start. release must run after OS Start, including any failed Start path.

func (*TrustedExecution) SetDiagnosticReporter added in v0.9.4

func (t *TrustedExecution) SetDiagnosticReporter(reporter diagnostics.Reporter)

SetDiagnosticReporter borrows the daemon's existing file diagnostic outlet. Assembly calls it before the trusted execution is published to concurrent users.

func (*TrustedExecution) ValidateCandidateConfig added in v0.9.7

func (t *TrustedExecution) ValidateCandidateConfig(ctx context.Context, prepared PreparedCore, content []byte) (resultErr error)

ValidateCandidateConfig validates fresh Manager-generated bytes with the exact protected core candidate, without executing the old installed core.

type UpdateIntent added in v0.9.6

type UpdateIntent struct {
	Previous   CoreSelection `json:"previous"`
	Next       CoreSelection `json:"next"`
	WasRunning bool          `json:"was_running"`
	StartNew   bool          `json:"start_new"`
	Reinstall  bool          `json:"reinstall,omitempty"`
}

UpdateIntent captures the settings and running intent reserved by Manager.

type UpdateTransaction added in v0.9.6

type UpdateTransaction struct {
	// contains filtered or unexported fields
}

UpdateTransaction keeps recovery objects until the whole update is accepted.

func BeginUpdate added in v0.9.6

func BeginUpdate(ctx context.Context, store ProvenanceStore, transaction string, expected ProvenanceObject, intent UpdateIntent) (*UpdateTransaction, error)

BeginUpdate snapshots a prepared fixed-role candidate and the old local core. The caller must reserve the mutation and keep the execution lifecycle stopped before Publish; taking the snapshot itself does not stop or replace a core.

func OpenUpdate added in v0.9.6

func OpenUpdate(ctx context.Context, store ProvenanceStore) (*UpdateTransaction, error)

OpenUpdate reads a pending transaction without running a core or changing it.

func (*UpdateTransaction) Commit added in v0.9.6

func (u *UpdateTransaction) Commit(ctx context.Context, save func(CoreSelection) error) error

Commit records intent before saving settings and then the logical commit point.

func (*UpdateTransaction) CompleteRollback added in v0.9.6

func (u *UpdateTransaction) CompleteRollback(ctx context.Context) error

CompleteRollback records that the owner has also restored running intent. Rollback alone restores files and settings, not the health of the old process.

func (*UpdateTransaction) DeferCleanup added in v0.9.6

func (u *UpdateTransaction) DeferCleanup(ctx context.Context) error

DeferCleanup records a terminal transaction for a later daemon startup. It does not remove the old binary, candidate, restoration copy or marker.

func (*UpdateTransaction) ExecutionContext added in v0.9.6

func (u *UpdateTransaction) ExecutionContext(ctx context.Context) context.Context

ExecutionContext authorizes only this transaction's internal lifecycle work.

func (*UpdateTransaction) HasPreviousCore added in v0.9.6

func (u *UpdateTransaction) HasPreviousCore() bool

HasPreviousCore distinguishes first installation from a stopped existing core.

func (*UpdateTransaction) Intent added in v0.9.6

func (u *UpdateTransaction) Intent() UpdateIntent

Intent returns the original and target selections recorded before publication.

func (*UpdateTransaction) Phase added in v0.9.6

func (u *UpdateTransaction) Phase() string

Phase reports the internal durable phase for local recovery orchestration.

func (*UpdateTransaction) Publish added in v0.9.6

func (u *UpdateTransaction) Publish(ctx context.Context) error

Publish installs the prepared binary while retaining recovery material.

func (*UpdateTransaction) ReinstallSelection added in v0.9.6

func (u *UpdateTransaction) ReinstallSelection() (CoreSelection, bool)

ReinstallSelection returns the accepted channel and saved running intent. A completed commit is already accepted even when cleanup was interrupted.

func (*UpdateTransaction) RequireRecovery added in v0.9.6

func (u *UpdateTransaction) RequireRecovery(ctx context.Context, cause error) error

RequireRecovery retains recovery material and blocks ordinary core execution.

func (*UpdateTransaction) Rollback added in v0.9.6

func (u *UpdateTransaction) Rollback(ctx context.Context, restore func(CoreSelection) error) error

Rollback restores old bytes and calls the owner to restore only core settings.

func (*UpdateTransaction) Warnings added in v0.9.6

func (u *UpdateTransaction) Warnings() []error

Warnings returns successful operations whose final sync or cleanup failed.

type VerifiedCore added in v0.9.3

type VerifiedCore struct {
	// contains filtered or unexported fields
}

VerifiedCore holds a platform-verified local core or a private candidate. Its zero value is unusable; callers cannot fill in trust identities.

func OpenInstalledCore added in v0.9.3

func OpenInstalledCore(ctx context.Context, s ProvenanceStore) (*VerifiedCore, error)

OpenInstalledCore binds a recovered local binary to its platform-checked file identity. Historical origin receipts are not execution authority. It never recovers while a process may run.

func (*VerifiedCore) Close added in v0.9.3

func (c *VerifiedCore) Close() error

func (*VerifiedCore) Command added in v0.9.3

func (c *VerifiedCore) Command(ctx context.Context, purpose CorePurpose, configuration *ConfigCapability) (CoreCommand, error)

type VerifiedExecutor added in v0.9.3

type VerifiedExecutor interface {
	Execute(context.Context, CoreCommand) ([]byte, error)
}

VerifiedExecutor consumes only a complete capability-generated command. Injected executors in tests record calls without starting an actual core.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL