Documentation
¶
Overview ¶
Package pluginruntime implements the internal framework-owned plugin kernel.
This package is distinct from the public companion-host package at github.com/monstercameron/GoWebComponents/plugin. The public companion host remains the app-owned extension surface. pluginruntime owns framework-managed lifecycle, guarded execution, service resolution, and contribution registration for trusted internal plugins.
Index ¶
- func RegisterBuiltinPlugin(parseRegistration PluginRegistration) error
- func RegisterBuiltinService(parseRegistration ServiceRegistration) error
- func ResetGlobalKernelForTesting() error
- func ResolveServiceAs[T any](parseKernel *Kernel, parseKey ServiceKey) (T, error)
- type ActivationPolicy
- type AssetEntry
- type AssetService
- type AssetSnapshot
- type BackendID
- type BootstrapOptions
- type CaptureService
- type CaptureSnapshot
- type CleanupFunc
- type CommandOptions
- type Context
- type ContributionKind
- type ContributionMetadata
- type ContributionRegistration
- type DOMNodeSnapshot
- type DOMService
- type DOMSnapshot
- type DevtoolsAction
- type DevtoolsActionContext
- type DevtoolsActionProvider
- type DevtoolsActionProviderFunc
- type DevtoolsIssue
- type DevtoolsSection
- type DevtoolsSectionProvider
- type DevtoolsSectionProviderFunc
- type DiagnosticsService
- type DiagnosticsSnapshot
- type EventRecord
- type EventService
- type EventSnapshot
- type ExecutionClass
- type FetchCacheEntry
- type FetchService
- type FetchSnapshot
- type Handle
- type HealthReason
- type HealthReport
- type HealthState
- type Kernel
- func (parseKernel *Kernel) Close() error
- func (parseKernel *Kernel) Diagnostics() []PluginDiagnostic
- func (parseKernel *Kernel) HealthReports() []HealthReport
- func (parseKernel *Kernel) Info() KernelInfo
- func (parseKernel *Kernel) ListDevtoolsActions() []DevtoolsAction
- func (parseKernel *Kernel) ListDevtoolsSections() []DevtoolsSection
- func (parseKernel *Kernel) ResolveService(parseKey ServiceKey) (any, bool)
- func (parseKernel *Kernel) SetService(parseKey ServiceKey, parseValue any)
- type KernelInfo
- type Manifest
- type Plugin
- type PluginDiagnostic
- type PluginFactory
- type PluginManifestOverride
- type PluginRegistration
- type QueryBudget
- type RouteLoaderEntry
- type RouteMetadata
- type RouteRedirect
- type RouteService
- type RouteSnapshot
- type RouteStackEntry
- type Runtime2Diagnostic
- type Runtime2MetaService
- type Runtime2MetaSnapshot
- type Runtime2RegionSnapshot
- type RuntimeBranch
- type RuntimeComponentRenderTrace
- type RuntimeDiagnostic
- type RuntimeFlamegraphFrame
- type RuntimeHook
- type RuntimeHydration
- type RuntimeInspectionService
- type RuntimeLog
- type RuntimeNode
- type RuntimeProfiling
- type RuntimeProfilingEvent
- type RuntimeProfilingPhaseTotals
- type RuntimeRouteStartupBudget
- type RuntimeSnapshot
- type RuntimeStartupProfiling
- type RuntimeStats
- type SecurityFinding
- type SecurityService
- type SecuritySnapshot
- type ServiceKey
- type ServiceRegistration
- type SnapshotMeta
- type StylePatchHandle
- type StyleService
- type StyleSnapshot
- type SubscriptionHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBuiltinPlugin ¶
func RegisterBuiltinPlugin(parseRegistration PluginRegistration) error
RegisterBuiltinPlugin registers one built-in internal plugin factory.
func RegisterBuiltinService ¶
func RegisterBuiltinService(parseRegistration ServiceRegistration) error
RegisterBuiltinService registers one built-in kernel service value.
func ResetGlobalKernelForTesting ¶
func ResetGlobalKernelForTesting() error
ResetGlobalKernelForTesting clears global kernel state for tests.
func ResolveServiceAs ¶
func ResolveServiceAs[T any](parseKernel *Kernel, parseKey ServiceKey) (T, error)
ResolveServiceAs resolves one service and casts it to the requested type.
Types ¶
type ActivationPolicy ¶
type ActivationPolicy string
ActivationPolicy describes when one plugin or contribution should become active.
const ( ActivationPolicyBoot ActivationPolicy = "boot" ActivationPolicyView ActivationPolicy = "view" ActivationPolicySession ActivationPolicy = "session" ActivationPolicyOpportunistic ActivationPolicy = "opportunistic" )
type AssetEntry ¶
AssetEntry stores one normalized asset/cache summary entry.
type AssetService ¶
type AssetService interface {
GetAssetSnapshot(QueryBudget) (AssetSnapshot, error)
RefreshAssets(CommandOptions) error
}
AssetService exposes asset inspection and invalidation commands.
type AssetSnapshot ¶
type AssetSnapshot struct {
Meta SnapshotMeta
Entries []AssetEntry
}
AssetSnapshot stores one normalized asset-management summary.
type BackendID ¶
type BackendID string
BackendID identifies one implementation backend normalized by the kernel.
type BootstrapOptions ¶
type BootstrapOptions struct {
Registrations []PluginRegistration
Services []ServiceRegistration
DisabledPluginIDs []string
}
BootstrapOptions stores kernel bootstrap registrations and service values.
type CaptureService ¶
type CaptureService interface {
GetCaptureSnapshot(QueryBudget) (CaptureSnapshot, error)
}
CaptureService exposes capture and replay lifecycle reads.
type CaptureSnapshot ¶
type CaptureSnapshot struct {
Meta SnapshotMeta
Sessions []string
}
CaptureSnapshot stores one normalized capture/export summary.
type CleanupFunc ¶
type CleanupFunc func() error
CleanupFunc stores one kernel-managed cleanup callback.
type CommandOptions ¶
type CommandOptions struct {
Reason string
}
CommandOptions describes one typed command invocation.
type Context ¶
type Context interface {
ResolveService(ServiceKey) (any, bool)
RegisterContribution(ContributionRegistration) error
RegisterCleanup(CleanupFunc)
KernelInfo() KernelInfo
}
Context exposes the kernel-facing API available to one running plugin.
type ContributionKind ¶
type ContributionKind string
ContributionKind identifies one built-in contribution family.
const ( ContributionKindDevtoolsSection ContributionKind = "devtools-section" ContributionKindDevtoolsAction ContributionKind = "devtools-action" ContributionKindDevtoolsPanel ContributionKind = "devtools-panel" )
type ContributionMetadata ¶
type ContributionMetadata struct {
ID string
Kind ContributionKind
ExecutionClass ExecutionClass
ActivationPolicy ActivationPolicy
Order int
}
ContributionMetadata stores stable metadata for one registered contribution.
type ContributionRegistration ¶
type ContributionRegistration struct {
Metadata ContributionMetadata
Value any
}
ContributionRegistration stores one plugin-owned contribution registration.
type DOMNodeSnapshot ¶
type DOMNodeSnapshot struct {
ID string
Tag string
Text string
Attributes map[string]string
Children []DOMNodeSnapshot
}
DOMNodeSnapshot stores one normalized DOM node summary.
type DOMService ¶
type DOMService interface {
GetDOMSnapshot(QueryBudget) (DOMSnapshot, error)
HighlightNode(string, CommandOptions) error
ScrollNodeIntoView(string, CommandOptions) error
}
DOMService exposes bounded DOM inspection and focus helpers.
type DOMSnapshot ¶
type DOMSnapshot struct {
Meta SnapshotMeta
Root *DOMNodeSnapshot
}
DOMSnapshot stores one normalized DOM inspection result.
type DevtoolsAction ¶
type DevtoolsAction struct {
Label string
MatchCodes []string
MatchSources []string
Run func(DevtoolsActionContext) error
}
DevtoolsAction stores one kernel-owned overlay action payload.
type DevtoolsActionContext ¶
type DevtoolsActionContext struct {
Issue DevtoolsIssue
}
DevtoolsActionContext stores one overlay action invocation context.
type DevtoolsActionProvider ¶
type DevtoolsActionProvider interface {
GetDevtoolsActions() ([]DevtoolsAction, error)
}
DevtoolsActionProvider resolves overlay actions at read time.
type DevtoolsActionProviderFunc ¶
type DevtoolsActionProviderFunc func() ([]DevtoolsAction, error)
DevtoolsActionProviderFunc adapts one function into an action provider.
func (DevtoolsActionProviderFunc) GetDevtoolsActions ¶
func (parseFunc DevtoolsActionProviderFunc) GetDevtoolsActions() ([]DevtoolsAction, error)
GetDevtoolsActions resolves one function-backed action contribution.
type DevtoolsIssue ¶
type DevtoolsIssue struct {
Source string
Code string
Message string
Path string
Docs string
TopFrame string
}
DevtoolsIssue stores one overlay issue summary visible to plugin actions.
type DevtoolsSection ¶
DevtoolsSection stores one kernel-owned devtools section contribution payload.
type DevtoolsSectionProvider ¶
type DevtoolsSectionProvider interface {
GetDevtoolsSections() ([]DevtoolsSection, error)
}
DevtoolsSectionProvider resolves devtools sections at read time.
type DevtoolsSectionProviderFunc ¶
type DevtoolsSectionProviderFunc func() ([]DevtoolsSection, error)
DevtoolsSectionProviderFunc adapts one function into a section provider.
func (DevtoolsSectionProviderFunc) GetDevtoolsSections ¶
func (parseFunc DevtoolsSectionProviderFunc) GetDevtoolsSections() ([]DevtoolsSection, error)
GetDevtoolsSections resolves one function-backed section contribution.
type DiagnosticsService ¶
type DiagnosticsService interface {
GetDiagnosticsSnapshot(QueryBudget) (DiagnosticsSnapshot, error)
}
DiagnosticsService exposes aggregated diagnostic reads.
type DiagnosticsSnapshot ¶
type DiagnosticsSnapshot struct {
Meta SnapshotMeta
Runtime []RuntimeDiagnostic
PluginReports []HealthReport
PluginEvents []PluginDiagnostic
KernelAPIVersion string
}
DiagnosticsSnapshot stores aggregated runtime and plugin diagnostics.
type EventRecord ¶
type EventRecord struct {
Type string
Phase string
Target string
Current string
OccurredAt time.Time
}
EventRecord stores one bounded normalized event record.
type EventService ¶
type EventService interface {
GetEventSnapshot(QueryBudget) (EventSnapshot, error)
}
EventService exposes event observation reads.
type EventSnapshot ¶
type EventSnapshot struct {
Meta SnapshotMeta
Events []EventRecord
}
EventSnapshot stores one bounded event ring snapshot.
type ExecutionClass ¶
type ExecutionClass string
ExecutionClass describes the expected cost profile for one plugin operation.
const ( ExecutionClassHot ExecutionClass = "hot" ExecutionClassWarm ExecutionClass = "warm" ExecutionClassBackground ExecutionClass = "background" )
type FetchCacheEntry ¶
type FetchCacheEntry struct {
Key string
Loading bool
Ready bool
Stale bool
LastError string
UpdatedAt time.Time
LastLoaded time.Time
SubscriberCount int
OwnerPaths []string
ResumePolicy string
}
FetchCacheEntry stores one normalized cache entry.
type FetchService ¶
type FetchService interface {
GetFetchSnapshot(QueryBudget) (FetchSnapshot, error)
ClearFetchEntry(string, CommandOptions) error
RevalidateFetchEntry(string, CommandOptions) error
}
FetchService exposes normalized fetch-cache inspection and command APIs.
type FetchSnapshot ¶
type FetchSnapshot struct {
Meta SnapshotMeta
Entries []FetchCacheEntry
}
FetchSnapshot stores one normalized fetch-cache summary.
type Handle ¶
type Handle interface {
StopPlugin() error
}
Handle describes one running plugin handle.
type HealthReason ¶
type HealthReason string
HealthReason describes the cause of one health transition.
const ( HealthReasonStartupError HealthReason = "startup-error" HealthReasonPanic HealthReason = "panic" HealthReasonCompatibilityFailure HealthReason = "compatibility-failure" HealthReasonRepeatedErrors HealthReason = "repeated-errors" HealthReasonBudgetOverrun HealthReason = "budget-overrun" HealthReasonStopped HealthReason = "stopped" )
type HealthReport ¶
type HealthReport struct {
PluginID string
State HealthState
Reason HealthReason
Message string
ErrorCount int
UpdatedAt time.Time
}
HealthReport stores one stable health snapshot for one plugin.
type HealthState ¶
type HealthState string
HealthState describes one plugin runtime health state.
const ( HealthStateStarting HealthState = "starting" HealthStateHealthy HealthState = "healthy" HealthStateDegraded HealthState = "degraded" HealthStateQuarantined HealthState = "quarantined" HealthStateStopped HealthState = "stopped" )
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
Kernel owns framework-managed plugin lifecycle, services, and contributions.
func BootGlobalKernel ¶
func BootGlobalKernel(parseOptions BootstrapOptions) (*Kernel, error)
BootGlobalKernel constructs and stores the process-global kernel when needed.
func GetGlobalKernel ¶
func GetGlobalKernel() *Kernel
GetGlobalKernel returns the process-global kernel when booted.
func NewKernel ¶
func NewKernel(parseOptions BootstrapOptions) (*Kernel, error)
NewKernel constructs and starts one kernel from bootstrap options.
func (*Kernel) Diagnostics ¶
func (parseKernel *Kernel) Diagnostics() []PluginDiagnostic
Diagnostics returns one cloned plugin diagnostic event slice.
func (*Kernel) HealthReports ¶
func (parseKernel *Kernel) HealthReports() []HealthReport
HealthReports returns stable health snapshots for every tracked plugin.
func (*Kernel) Info ¶
func (parseKernel *Kernel) Info() KernelInfo
Info reports stable kernel identity metadata.
func (*Kernel) ListDevtoolsActions ¶
func (parseKernel *Kernel) ListDevtoolsActions() []DevtoolsAction
ListDevtoolsActions resolves all active devtools action contributions.
func (*Kernel) ListDevtoolsSections ¶
func (parseKernel *Kernel) ListDevtoolsSections() []DevtoolsSection
ListDevtoolsSections resolves all active devtools section contributions.
func (*Kernel) ResolveService ¶
func (parseKernel *Kernel) ResolveService(parseKey ServiceKey) (any, bool)
ResolveService returns one registered service value.
func (*Kernel) SetService ¶
func (parseKernel *Kernel) SetService(parseKey ServiceKey, parseValue any)
SetService stores or replaces one service on the kernel.
type KernelInfo ¶
type KernelInfo struct {
APIVersion string
}
KernelInfo reports stable kernel identity metadata.
type Manifest ¶
type Manifest struct {
ID string
Version string
Description string
RequiredServices []ServiceKey
OptionalServices []ServiceKey
ActivationPolicy ActivationPolicy
}
Manifest describes one internal plugin registration contract.
type PluginDiagnostic ¶
type PluginDiagnostic struct {
PluginID string
Operation string
Reason HealthReason
Message string
When time.Time
Report diagnostics.Report
}
PluginDiagnostic stores one kernel-attributed plugin event.
type PluginFactory ¶
type PluginFactory func() Plugin
PluginFactory creates one plugin instance for kernel startup.
type PluginManifestOverride ¶
type PluginManifestOverride struct {
ID string
Version string
Description string
RequiredServices []ServiceKey
OptionalServices []ServiceKey
ActivationPolicy ActivationPolicy
}
PluginManifestOverride stores one optional manifest override for registration wiring.
type PluginRegistration ¶
type PluginRegistration struct {
Manifest PluginManifestOverride
Factory PluginFactory
}
PluginRegistration stores one boot-time plugin registration.
func RegisteredBuiltinPlugins ¶
func RegisteredBuiltinPlugins() []PluginRegistration
RegisteredBuiltinPlugins returns cloned built-in plugin registrations.
type QueryBudget ¶
type QueryBudget struct {
MaxItems int
}
QueryBudget describes one bounded query budget for service reads.
type RouteLoaderEntry ¶
RouteLoaderEntry stores one current route loader entry.
type RouteMetadata ¶
RouteMetadata stores one normalized route metadata summary.
type RouteRedirect ¶
RouteRedirect stores one last-redirect summary.
type RouteService ¶
type RouteService interface {
GetRouteSnapshot(QueryBudget) (RouteSnapshot, error)
RevalidateRoute(CommandOptions) error
RetryRouteLoader(string, CommandOptions) error
}
RouteService exposes normalized route inspection and command APIs.
type RouteSnapshot ¶
type RouteSnapshot struct {
Meta SnapshotMeta
Path string
Query map[string][]string
Params map[string]string
Loading bool
Stack []RouteStackEntry
Loaders []RouteLoaderEntry
LastRedirect RouteRedirect
Metadata RouteMetadata
}
RouteSnapshot stores one normalized current-route snapshot.
type RouteStackEntry ¶
type RouteStackEntry struct {
ID string
Path string
Params map[string]string
HasLoader bool
HasBeforeEnter bool
HasBeforeLeave bool
Metadata RouteMetadata
}
RouteStackEntry stores one route stack entry.
type Runtime2Diagnostic ¶
type Runtime2Diagnostic struct {
RegionInstanceID string
Type string
Text string
TransportTier string
ShardID string
FallbackDomain string
FallbackReason string
DowngradePath string
DowngradeReason string
QueueNs uint64
RenderNs uint64
SnapshotBytes uint64
PatchBytes uint64
}
Runtime2Diagnostic stores one normalized runtime2 diagnostic record.
type Runtime2MetaService ¶
type Runtime2MetaService interface {
GetRuntime2MetaSnapshot(QueryBudget) (Runtime2MetaSnapshot, error)
}
Runtime2MetaService exposes optional runtime2 capability metadata.
type Runtime2MetaSnapshot ¶
type Runtime2MetaSnapshot struct {
Meta SnapshotMeta
Capabilities map[string]bool
Regions []Runtime2RegionSnapshot
Diagnostics []Runtime2Diagnostic
}
Runtime2MetaSnapshot stores optional runtime2 capability metadata.
type Runtime2RegionSnapshot ¶
type Runtime2RegionSnapshot struct {
RegionInstanceID string
RegionMode string
AssignedWorkerShard string
RendererID string
Epoch uint64
IsHydrationComplete bool
HasHydratedShellAnchor bool
HasPostHydrationAttached bool
LastSnapshotVersion uint64
LastDispatchedVersion uint64
LastCommittedVersion uint64
TransportTier string
HasSnapshotDowngrade bool
SnapshotDowngradePath string
SnapshotDowngradeReason string
HasPatchDowngrade bool
PatchDowngradePath string
PatchDowngradeReason string
DroppedStalePatchCount uint64
IgnoredStaleDiagnosticCount uint64
RepairTriggeredRemountCount uint64
FallbackReason string
DispatchToPatchReadyNs uint64
DispatchToCommitNs uint64
PatchReadyToCommitNs uint64
DiagnosticCount int
}
Runtime2RegionSnapshot stores one normalized runtime2 region-status summary.
type RuntimeBranch ¶
type RuntimeBranch struct {
Name string
Kind string
Path string
RenderDurationNs int64
DiffDurationNs int64
CommitDurationNs int64
EffectDurationNs int64
CleanupDurationNs int64
SelfDurationNs int64
SubtreeDurationNs int64
}
RuntimeBranch stores one normalized hot branch.
type RuntimeComponentRenderTrace ¶
type RuntimeComponentRenderTrace struct {
Name string
Path string
RenderCount int
RerenderCount int
LastTrigger string
LastRenderDurationNs int64
TotalRenderDurationNs int64
AverageRenderDurationNs int64
LastRenderedAt string
TriggerCounts map[string]int
}
RuntimeComponentRenderTrace stores per-component render activity.
type RuntimeDiagnostic ¶
type RuntimeDiagnostic struct {
Source string
Severity string
Classification string
Code string
Docs string
Remediation string
Recoverable bool
TopFrame string
Consequence string
Message string
Count int
Path string
ComponentStack []string
Fields map[string]string
}
RuntimeDiagnostic stores one normalized runtime diagnostic.
type RuntimeFlamegraphFrame ¶
type RuntimeFlamegraphFrame struct {
Name string
Kind string
Path string
Depth int
StartNs int64
DurationNs int64
SelfDurationNs int64
RenderDurationNs int64
DiffDurationNs int64
CommitDurationNs int64
EffectDurationNs int64
CleanupDurationNs int64
}
RuntimeFlamegraphFrame stores one normalized flamegraph frame.
type RuntimeHook ¶
RuntimeHook stores one normalized hook inspection value.
type RuntimeHydration ¶
type RuntimeHydration struct {
CorrelationID string
StartedAt string
FinishedAt string
DurationNs int64
ExistingDOMNodeCount int
FallbackCount int
MismatchCount int
DiscardedNodeCount int
Strict bool
Failed bool
Failure string
RecentMessages []string
}
RuntimeHydration stores one normalized hydration summary.
type RuntimeInspectionService ¶
type RuntimeInspectionService interface {
GetRuntimeSnapshot(QueryBudget) (RuntimeSnapshot, error)
}
RuntimeInspectionService exposes normalized runtime inspection reads.
type RuntimeLog ¶
type RuntimeLog struct {
Domain string
Level string
Classification string
Code string
Docs string
Remediation string
Recoverable bool
TopFrame string
Consequence string
Message string
Timestamp string
CorrelationID string
Fields map[string]string
}
RuntimeLog stores one normalized runtime log entry.
type RuntimeNode ¶
type RuntimeNode struct {
Name string
Path string
Kind string
Dirty bool
NeedsUpdate bool
FineGrained bool
ReactiveSource string
UpdateOrigin string
EffectCount int
HookCount int
Signature string
RenderDurationNs int64
DiffDurationNs int64
CommitDurationNs int64
EffectDurationNs int64
CleanupDurationNs int64
SelfDurationNs int64
SubtreeDurationNs int64
Hooks []RuntimeHook
Children []RuntimeNode
}
RuntimeNode stores one normalized runtime tree node.
type RuntimeProfiling ¶
type RuntimeProfiling struct {
RenderCalls int
ScheduledRootUpdates int
ScheduledFiberMarks int
ScheduledGranularMarks int
WorkLoopPasses int
ProcessedUnits int
CommitCount int
FineGrainedCommits int
FineGrainedDescendantHostCommits int
FineGrainedDescendantTextCommits int
EffectExecutions int
CleanupExecutions int
LastRenderDurationNs int64
LastCommitDurationNs int64
LastEffectDurationNs int64
LastCleanupDurationNs int64
PhaseTotals RuntimeProfilingPhaseTotals
ComponentRenders []RuntimeComponentRenderTrace
RecentEvents []RuntimeProfilingEvent
FlamegraphFrames []RuntimeFlamegraphFrame
Startup RuntimeStartupProfiling
HotBranches []RuntimeBranch
}
RuntimeProfiling stores one normalized runtime profiling snapshot.
type RuntimeProfilingEvent ¶
type RuntimeProfilingEvent struct {
Domain string
Name string
Phase string
Target string
CorrelationID string
DurationNs int64
Timestamp string
Fields map[string]string
}
RuntimeProfilingEvent stores one profiling event record.
type RuntimeProfilingPhaseTotals ¶
type RuntimeProfilingPhaseTotals struct {
RenderDurationNs int64
DiffDurationNs int64
CommitDurationNs int64
EffectDurationNs int64
CleanupDurationNs int64
}
RuntimeProfilingPhaseTotals stores attributed profiling phase time totals.
type RuntimeRouteStartupBudget ¶
type RuntimeRouteStartupBudget struct {
RouteFamily string
LastRoutePath string
SampleCount int
AverageBootstrapReadDurationNs int64
AverageWASMTransferBytes int64
AverageWASMDecodedBytes int64
AverageBootstrapDecodedBytes int64
AverageCacheWarmupDurationNs int64
AverageServiceWorkerOverheadNs int64
AverageInitialRouteDataBytes int64
AverageHydrationDurationNs int64
AverageStartupCommitDurationNs int64
AverageFirstInteractionDurationNs int64
}
RuntimeRouteStartupBudget stores one grouped startup budget sample.
type RuntimeSnapshot ¶
type RuntimeSnapshot struct {
Meta SnapshotMeta
Root *RuntimeNode
Stats RuntimeStats
Profiling RuntimeProfiling
Hydration RuntimeHydration
Diagnostics []RuntimeDiagnostic
Logs []RuntimeLog
}
RuntimeSnapshot stores one normalized runtime inspection snapshot.
type RuntimeStartupProfiling ¶
type RuntimeStartupProfiling struct {
Mode string
StartedAt string
BootstrapReadDurationNs int64
WASMTransferBytes int64
WASMDecodedBytes int64
BootstrapDecodedBytes int64
CacheWarmupDurationNs int64
ServiceWorkerOverheadNs int64
InitialRouteDataBytes int64
HydrationDurationNs int64
StartupCommitDurationNs int64
FirstInteractionDurationNs int64
FirstInteractionCaptured bool
FirstInteractionEvent string
RouteBudgets []RuntimeRouteStartupBudget
}
RuntimeStartupProfiling stores startup and hydration milestones.
type RuntimeStats ¶
type RuntimeStats struct {
TotalFibers int
DirtyFibers int
ComponentFibers int
HostFibers int
TextFibers int
FineGrainedFibers int
HookEntries int
Effects int
}
RuntimeStats stores one normalized runtime stats snapshot.
type SecurityFinding ¶
SecurityFinding stores one normalized security finding.
type SecurityService ¶
type SecurityService interface {
GetSecuritySnapshot(QueryBudget) (SecuritySnapshot, error)
}
SecurityService exposes advisory security inspection.
type SecuritySnapshot ¶
type SecuritySnapshot struct {
Meta SnapshotMeta
Findings []SecurityFinding
}
SecuritySnapshot stores one normalized security summary.
type ServiceKey ¶
type ServiceKey string
ServiceKey identifies one built-in kernel service family.
const ( ServiceKeyRuntime ServiceKey = "runtime" ServiceKeyDiagnostics ServiceKey = "diagnostics" ServiceKeyRoute ServiceKey = "route" ServiceKeyFetch ServiceKey = "fetch" ServiceKeyDOM ServiceKey = "dom" ServiceKeyStyle ServiceKey = "style" ServiceKeyEvents ServiceKey = "events" ServiceKeyAssets ServiceKey = "assets" ServiceKeySecurity ServiceKey = "security" ServiceKeyCapture ServiceKey = "capture" ServiceKeyRuntime2Meta ServiceKey = "runtime2-meta" )
type ServiceRegistration ¶
type ServiceRegistration struct {
Key ServiceKey
Value any
}
ServiceRegistration stores one built-in service value for kernel bootstrap.
func RegisteredBuiltinServices ¶
func RegisteredBuiltinServices() []ServiceRegistration
RegisteredBuiltinServices returns cloned built-in service registrations.
type SnapshotMeta ¶
SnapshotMeta reports metadata about one normalized snapshot.
func BuildSnapshotMeta ¶
func BuildSnapshotMeta(parseBackend BackendID, isParseTruncated bool) SnapshotMeta
BuildSnapshotMeta returns one normalized snapshot metadata value.
type StylePatchHandle ¶
type StylePatchHandle interface {
RemoveStylePatch() error
}
StylePatchHandle stores one reversible style patch handle.
type StyleService ¶
type StyleService interface {
GetStyleSnapshot(QueryBudget) (StyleSnapshot, error)
ApplyStyleVariables(map[string]string, CommandOptions) (StylePatchHandle, error)
}
StyleService exposes style inspection and reversible patch APIs.
type StyleSnapshot ¶
type StyleSnapshot struct {
Meta SnapshotMeta
Variables map[string]string
Stylesheet []string
}
StyleSnapshot stores one style inspection summary.
type SubscriptionHandle ¶
type SubscriptionHandle struct {
// contains filtered or unexported fields
}
SubscriptionHandle stores one cleanup-backed subscription handle.
func (*SubscriptionHandle) Stop ¶
func (parseHandle *SubscriptionHandle) Stop() error
Stop stops one subscription handle once.