Documentation
¶
Index ¶
- func IsMCPInstallationSettingsKey(value string) bool
- type BundleOverlay
- type OverlayRepository
- type ServerOverlay
- type SettingsOverlayRepository
- func (r *SettingsOverlayRepository) DeleteBundleOverlay(ctx context.Context, rootID root.RootID, collectionID collection.CollectionID, ...) error
- func (r *SettingsOverlayRepository) DeleteServerOverlay(ctx context.Context, ref artifact.ArtifactRef, expectedRevision uint64) error
- func (r *SettingsOverlayRepository) GetBundleOverlay(ctx context.Context, rootID root.RootID, collectionID collection.CollectionID) (BundleOverlay, bool, error)
- func (r *SettingsOverlayRepository) GetServerOverlay(ctx context.Context, ref artifact.ArtifactRef) (ServerOverlay, bool, error)
- func (r *SettingsOverlayRepository) PurgeRoot(ctx context.Context, rootID root.RootID) error
- func (r *SettingsOverlayRepository) PutBundleOverlay(ctx context.Context, rootID root.RootID, collectionID collection.CollectionID, ...) error
- func (r *SettingsOverlayRepository) PutServerOverlay(ctx context.Context, ref artifact.ArtifactRef, expectedRevision uint64, ...) error
- type SettingsPrefixValueStore
- type SettingsValueStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BundleOverlay ¶
type BundleOverlay struct {
SchemaVersion string `json:"schemaVersion"`
Revision uint64 `json:"revision"`
RuntimeEnabled bool `json:"runtimeEnabled"`
}
func (BundleOverlay) Validate ¶ added in v0.2.21
func (value BundleOverlay) Validate() error
type OverlayRepository ¶
type OverlayRepository interface {
GetServerOverlay(
ctx context.Context,
ref artifact.ArtifactRef,
) (ServerOverlay, bool, error)
GetBundleOverlay(
ctx context.Context,
rootID root.RootID,
collectionID collection.CollectionID,
) (BundleOverlay, bool, error)
PutServerOverlay(
ctx context.Context,
ref artifact.ArtifactRef,
expectedRevision uint64,
value ServerOverlay,
) error
PutBundleOverlay(
ctx context.Context,
rootID root.RootID,
collectionID collection.CollectionID,
expectedRevision uint64,
value BundleOverlay,
) error
DeleteServerOverlay(
ctx context.Context,
ref artifact.ArtifactRef,
expectedRevision uint64,
) error
DeleteBundleOverlay(
ctx context.Context,
rootID root.RootID,
collectionID collection.CollectionID,
expectedRevision uint64,
) error
}
type ServerOverlay ¶
type ServerOverlay struct {
SchemaVersion string `json:"schemaVersion"`
Revision uint64 `json:"revision"`
RuntimeEnabled bool `json:"runtimeEnabled"`
ServerData mcpDomainServer.ServerData `json:"serverData"`
}
ServerOverlay intentionally stores ServerData as a named nested value. Anonymous embedding would produce two schemaVersion fields at JSON encoding time and causes the embedded ServerData schemaVersion to decode as empty.
func (ServerOverlay) Validate ¶ added in v0.2.21
func (value ServerOverlay) Validate() error
type SettingsOverlayRepository ¶
type SettingsOverlayRepository struct {
// contains filtered or unexported fields
}
SettingsOverlayRepository implements OverlayRepository over application settings. It contains only installation metadata and opaque secret refs.
func NewSettingsOverlayRepository ¶
func NewSettingsOverlayRepository( values SettingsValueStore, ) (*SettingsOverlayRepository, error)
func (*SettingsOverlayRepository) DeleteBundleOverlay ¶
func (r *SettingsOverlayRepository) DeleteBundleOverlay( ctx context.Context, rootID root.RootID, collectionID collection.CollectionID, expectedRevision uint64, ) error
func (*SettingsOverlayRepository) DeleteServerOverlay ¶
func (r *SettingsOverlayRepository) DeleteServerOverlay( ctx context.Context, ref artifact.ArtifactRef, expectedRevision uint64, ) error
func (*SettingsOverlayRepository) GetBundleOverlay ¶
func (r *SettingsOverlayRepository) GetBundleOverlay( ctx context.Context, rootID root.RootID, collectionID collection.CollectionID, ) (BundleOverlay, bool, error)
func (*SettingsOverlayRepository) GetServerOverlay ¶
func (r *SettingsOverlayRepository) GetServerOverlay( ctx context.Context, ref artifact.ArtifactRef, ) (ServerOverlay, bool, error)
func (*SettingsOverlayRepository) PurgeRoot ¶
PurgeRoot is intentionally available only through trusted protected hydration. It removes local overlays before a stale protected topology is rebuilt with a new static registration set.
func (*SettingsOverlayRepository) PutBundleOverlay ¶
func (r *SettingsOverlayRepository) PutBundleOverlay( ctx context.Context, rootID root.RootID, collectionID collection.CollectionID, expectedRevision uint64, value BundleOverlay, ) error
func (*SettingsOverlayRepository) PutServerOverlay ¶
func (r *SettingsOverlayRepository) PutServerOverlay( ctx context.Context, ref artifact.ArtifactRef, expectedRevision uint64, value ServerOverlay, ) error
type SettingsPrefixValueStore ¶
type SettingsPrefixValueStore interface {
SettingsValueStore
DeleteMCPInstallationPrefix(
ctx context.Context,
prefix string,
) error
}
SettingsPrefixValueStore is optional. It is used by protected hydration to remove stale installation overlays for a reset protected Root.
type SettingsValueStore ¶
type SettingsValueStore interface {
GetMCPInstallationValue(
ctx context.Context,
key string,
) (json.RawMessage, bool, error)
PutMCPInstallationValue(
ctx context.Context,
key string,
expectedRevision uint64,
value json.RawMessage,
) error
DeleteMCPInstallationValue(
ctx context.Context,
key string,
expectedRevision uint64,
) error
}
SettingsValueStore is the narrow application-settings port required by MCP installation overlays. The application adapter must persist values through the existing Setting Store and implement compare-and-swap atomically.