Documentation
¶
Overview ¶
Package providerbinding connects reviewed provider adapters to the existing Core runtime and recovery seams. It does not schedule updates or own SQL migrations.
Index ¶
- type Dependencies
- type Failure
- type ManagedSource
- type Registry
- func (r *Registry) Preflight(ctx context.Context, provider providerupgrade.Provider, ...) (providerupgrade.Adapter, providerupgrade.Assessment, error)
- func (r *Registry) Resolve(ctx context.Context, provider providerupgrade.Provider) (providerupgrade.Adapter, RuntimeIdentity, error)
- func (r *Registry) ResolveRecovery(ctx context.Context, p providerupgrade.Provider, req providerupgrade.Request) (providerupgrade.Adapter, RuntimeIdentity, error)
- type RuntimeBinding
- type RuntimeIdentity
- type RuntimeInventory
- type RuntimeReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
type Dependencies struct {
Inventory RuntimeInventory
OpenBaoExecutor nativebao.Executor
OpenBaoFiles bhruntime.Files
OpenBaoHooks openbao.RuntimeHooks
KeycloakDataDir string
KeycloakNamespace string
KeycloakInstallationID string
KeycloakIssuer string
KeycloakHooks keycloak.CoreHooks
}
Dependencies are supplied by the existing Core installation/update engine. Snapshot, restore and pinned reconciliation always remain Core-owned.
type Failure ¶
Failure is the central journal-facing classification of a provider adapter failure. The caller must not infer safe retry solely from network errors.
type ManagedSource ¶
type ManagedSource struct {
Project string
Service string
Compose string
OriginalImage string
OriginalDigest string
}
ManagedSource names only existing, installation-owned Core services. Names are configuration/evidence selectors, never user-supplied mutation targets.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry exposes only known providers and does not perform any mutations.
func New ¶
func New(deps Dependencies) (*Registry, error)
func NewFor ¶
func NewFor(provider providerupgrade.Provider, deps Dependencies) (*Registry, error)
NewFor constructs only the selected installed provider. It does not require an unrelated provider to exist and never supplies fallback or fake Core hooks.
func (*Registry) Preflight ¶
func (r *Registry) Preflight(ctx context.Context, provider providerupgrade.Provider, request providerupgrade.Request) (providerupgrade.Adapter, providerupgrade.Assessment, error)
Preflight is the sole plan preparation entrypoint exposed to Session 1A. Every mutation must use the adapter returned by Resolve and the durable central journal; this package must never invoke Execute independently.
func (*Registry) Resolve ¶
func (r *Registry) Resolve(ctx context.Context, provider providerupgrade.Provider) (providerupgrade.Adapter, RuntimeIdentity, error)
func (*Registry) ResolveRecovery ¶
func (r *Registry) ResolveRecovery(ctx context.Context, p providerupgrade.Provider, req providerupgrade.Request) (providerupgrade.Adapter, RuntimeIdentity, error)
ResolveRecovery is only for a verified-backup recovery hook. It checks the fixed native adapter binding and retained protected source, without requiring the failed service to be healthy before it can be restored.
type RuntimeBinding ¶
type RuntimeBinding struct {
Reader RuntimeReader
Engine string
Sources map[providerupgrade.Provider]ManagedSource
}
RuntimeBinding verifies ownership from live project/service labels and resolves the actual image/digest through the selected BaseHarbor RuntimeProvider.
func (*RuntimeBinding) InspectManaged ¶
func (r *RuntimeBinding) InspectManaged(ctx context.Context, p providerupgrade.Provider) (RuntimeIdentity, error)
func (*RuntimeBinding) InspectRecovery ¶
func (r *RuntimeBinding) InspectRecovery(ctx context.Context, p providerupgrade.Provider, req providerupgrade.Request) (RuntimeIdentity, error)
InspectRecovery validates protected installation-owned source state when selected stop has legitimately removed a failed runtime container. Recovery still requires an exact original/target digest and a verified backup receipt.
type RuntimeIdentity ¶
type RuntimeIdentity struct {
Provider providerupgrade.Provider
Project string
Service string
Engine string
Image string
Digest string
Owned bool
}
RuntimeIdentity is evidence obtained from the selected RuntimeProvider, not from a user-supplied provider name. The Engine/project association must be verified by the runtime implementation before marking a service owned.
type RuntimeInventory ¶
type RuntimeInventory interface {
InspectManaged(context.Context, providerupgrade.Provider) (RuntimeIdentity, error)
}
RuntimeInventory must consult runtime resource labels and observed image identities; external or missing provider realizations fail closed.
type RuntimeReader ¶
type RuntimeReader interface {
ListRuntimeContainers(context.Context) ([]bhruntime.RuntimeContainer, error)
ProjectServiceImageIdentity(context.Context, string, string) (bhruntime.ImageIdentity, error)
}
RuntimeReader is the read-only subset of the existing RuntimeProvider. No Docker/Podman command shell or independent control plane is introduced.