Documentation
¶
Index ¶
- func ArtifactRefForRuntimeServerID(id mcpServer.ServerID) (artifact.ArtifactRef, error)
- func CollectionRefForRuntimeCatalogID(id mcpServer.CatalogID) (collection.CollectionRef, error)
- func RuntimeCatalogIDForCollection(ref collection.CollectionRef) (mcpServer.CatalogID, error)
- func RuntimeServerIDForArtifact(ref artifact.ArtifactRef) (mcpServer.ServerID, error)
- type ArtifactServerResolver
- type AuthState
- type Dependencies
- type Lifecycle
- func (l *Lifecycle) InvalidateCollection(ctx context.Context, ref collection.CollectionRef) error
- func (l *Lifecycle) InvalidateServer(ctx context.Context, ref artifact.ArtifactRef) error
- func (l *Lifecycle) PurgeBundle(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) error
- func (l *Lifecycle) RefreshBundle(ctx context.Context, ref collection.CollectionRef, allowProtected bool) (mcpConsumerAPI.Bundle, error)
- func (l *Lifecycle) ReplaceDocument(ctx context.Context, request mcpConsumerAPI.ReplaceDocumentRequest) (mcpConsumerAPI.Bundle, error)
- func (l *Lifecycle) RetireBundle(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) (collection.Collection, error)
- func (l *Lifecycle) UpdateBundleEnabled(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ...) (mcpConsumerAPI.Bundle, error)
- func (l *Lifecycle) UpdateProtectedBundleInstallation(ctx context.Context, ref collection.CollectionRef, ...) error
- func (l *Lifecycle) UpdateProtectedServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, ...) error
- func (l *Lifecycle) UpdateServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, ...) (artifact.Artifact, error)
- type OAuthTokenStore
- func (s *OAuthTokenStore) DeleteOAuthToken(ctx context.Context, status mcpAuth.MCPAuthStatus) error
- func (s *OAuthTokenStore) LoadOAuthToken(ctx context.Context, status mcpAuth.MCPAuthStatus) (*oauth2.Token, error)
- func (s *OAuthTokenStore) SaveOAuthToken(ctx context.Context, status mcpAuth.MCPAuthStatus, token *oauth2.Token) error
- type RuntimeInvalidator
- type RuntimeServerSource
- type SecretStore
- type SecretWriteResult
- type Service
- func (s *Service) DeleteServerSecret(ctx context.Context, ref artifact.ArtifactRef, ...) error
- func (s *Service) GetServerAuthHealth(ctx context.Context, ref artifact.ArtifactRef) (mcpAuth.MCPAuthHealth, error)
- func (s *Service) InspectRuntimeConfig(ctx context.Context, ref artifact.ArtifactRef) (mcpServer.RuntimeConfig, mcpDomainServer.Resolved, error)
- func (s *Service) PurgeBundle(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) error
- func (s *Service) PutServerSecret(ctx context.Context, ref artifact.ArtifactRef, ...) (SecretWriteResult, error)
- func (s *Service) RefreshBundle(ctx context.Context, ref collection.CollectionRef, allowProtected bool) (mcpConsumerAPI.Bundle, error)
- func (s *Service) ReplaceDocument(ctx context.Context, request mcpConsumerAPI.ReplaceDocumentRequest) (mcpConsumerAPI.Bundle, error)
- func (s *Service) RetireBundle(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64) (collection.Collection, error)
- func (s *Service) UpdateBundleEnabled(ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ...) (mcpConsumerAPI.Bundle, error)
- func (s *Service) UpdateProtectedBundleInstallation(ctx context.Context, ref collection.CollectionRef, ...) error
- func (s *Service) UpdateProtectedServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, ...) error
- func (s *Service) UpdateServerInstallation(ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, ...) (artifact.Artifact, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArtifactRefForRuntimeServerID ¶
func ArtifactRefForRuntimeServerID( id mcpServer.ServerID, ) (artifact.ArtifactRef, error)
func CollectionRefForRuntimeCatalogID ¶
func CollectionRefForRuntimeCatalogID( id mcpServer.CatalogID, ) (collection.CollectionRef, error)
func RuntimeCatalogIDForCollection ¶
func RuntimeCatalogIDForCollection( ref collection.CollectionRef, ) (mcpServer.CatalogID, error)
func RuntimeServerIDForArtifact ¶
func RuntimeServerIDForArtifact( ref artifact.ArtifactRef, ) (mcpServer.ServerID, error)
Types ¶
type ArtifactServerResolver ¶
type ArtifactServerResolver struct {
// contains filtered or unexported fields
}
ArtifactServerResolver translates a runtime-owned opaque ServerID only at the Aggregate boundary, then delegates Store resolution to the narrow port.
func NewArtifactServerResolver ¶
func NewArtifactServerResolver( store mcpConsumerAPI.ServerStore, ) (*ArtifactServerResolver, error)
func (*ArtifactServerResolver) InspectMCPServer ¶
func (r *ArtifactServerResolver) InspectMCPServer( ctx context.Context, ref artifact.ArtifactRef, ) (mcpDomainServer.Resolved, error)
func (*ArtifactServerResolver) ResolveMCPServer ¶
func (r *ArtifactServerResolver) ResolveMCPServer( ctx context.Context, serverID mcpServer.ServerID, ) (mcpDomainServer.Resolved, error)
type AuthState ¶
type AuthState interface {
ClearAuthStatus(server mcpServer.ServerID)
BuildAuthHealth(
ctx context.Context,
config mcpServer.RuntimeConfig,
) mcpAuth.MCPAuthHealth
}
type Dependencies ¶
type Dependencies struct {
Lifecycle *Lifecycle
Servers *ArtifactServerResolver
Source *RuntimeServerSource
Bundles mcpConsumerAPI.BundleServerStore
Auth AuthState
Secrets SecretStore
}
type Lifecycle ¶
type Lifecycle struct {
// contains filtered or unexported fields
}
func NewLifecycle ¶
func NewLifecycle( store mcpConsumerAPI.BundleMutator, runtime RuntimeInvalidator, ) (*Lifecycle, error)
func (*Lifecycle) InvalidateCollection ¶
func (l *Lifecycle) InvalidateCollection( ctx context.Context, ref collection.CollectionRef, ) error
func (*Lifecycle) InvalidateServer ¶
func (*Lifecycle) PurgeBundle ¶
func (l *Lifecycle) PurgeBundle( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) error
func (*Lifecycle) RefreshBundle ¶
func (l *Lifecycle) RefreshBundle( ctx context.Context, ref collection.CollectionRef, allowProtected bool, ) (mcpConsumerAPI.Bundle, error)
func (*Lifecycle) ReplaceDocument ¶
func (l *Lifecycle) ReplaceDocument( ctx context.Context, request mcpConsumerAPI.ReplaceDocumentRequest, ) (mcpConsumerAPI.Bundle, error)
func (*Lifecycle) RetireBundle ¶
func (l *Lifecycle) RetireBundle( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) (collection.Collection, error)
func (*Lifecycle) UpdateBundleEnabled ¶
func (l *Lifecycle) UpdateBundleEnabled( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, enabled bool, ) (mcpConsumerAPI.Bundle, error)
func (*Lifecycle) UpdateProtectedBundleInstallation ¶
func (l *Lifecycle) UpdateProtectedBundleInstallation( ctx context.Context, ref collection.CollectionRef, expectedOverlayRevision uint64, runtimeEnabled bool, ) error
func (*Lifecycle) UpdateProtectedServerInstallation ¶
func (l *Lifecycle) UpdateProtectedServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, runtimeEnabled bool, data mcpDomainServer.ServerData, ) error
func (*Lifecycle) UpdateServerInstallation ¶
func (l *Lifecycle) UpdateServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, data mcpDomainServer.ServerData, ) (artifact.Artifact, error)
type OAuthTokenStore ¶
type OAuthTokenStore struct {
// contains filtered or unexported fields
}
OAuthTokenStore translates runtime-owned opaque ServerID values at the Aggregate boundary before using artifact-scoped secret references.
func NewOAuthTokenStore ¶
func NewOAuthTokenStore(secrets SecretStore) (*OAuthTokenStore, error)
func (*OAuthTokenStore) DeleteOAuthToken ¶
func (s *OAuthTokenStore) DeleteOAuthToken( ctx context.Context, status mcpAuth.MCPAuthStatus, ) error
func (*OAuthTokenStore) LoadOAuthToken ¶
func (s *OAuthTokenStore) LoadOAuthToken( ctx context.Context, status mcpAuth.MCPAuthStatus, ) (*oauth2.Token, error)
func (*OAuthTokenStore) SaveOAuthToken ¶
func (s *OAuthTokenStore) SaveOAuthToken( ctx context.Context, status mcpAuth.MCPAuthStatus, token *oauth2.Token, ) error
type RuntimeInvalidator ¶
type RuntimeInvalidator interface {
Invalidate(
ctx context.Context,
server mcpServer.ServerID,
) error
InvalidateCollection(
ctx context.Context,
catalog mcpServer.CatalogID,
) error
}
RuntimeInvalidator is the only Runtime capability required by Store mutation coordination. Runtime does not know who persists a server.
type RuntimeServerSource ¶
type RuntimeServerSource struct {
// contains filtered or unexported fields
}
RuntimeServerSource is the Store-to-Runtime anti-corruption adapter. Runtime receives only runtime/spec values and never Store values.
func NewRuntimeServerSource ¶
func NewRuntimeServerSource( servers *ArtifactServerResolver, secrets mcpDomainServer.SecretResolver, environment mcpDomainServer.EnvironmentResolver, ) (*RuntimeServerSource, error)
func (*RuntimeServerSource) InspectRuntimeConfig ¶
func (s *RuntimeServerSource) InspectRuntimeConfig( ctx context.Context, ref artifact.ArtifactRef, ) (mcpServer.RuntimeConfig, mcpDomainServer.Resolved, error)
func (*RuntimeServerSource) ResolveServer ¶
func (s *RuntimeServerSource) ResolveServer( ctx context.Context, serverID mcpServer.ServerID, ) (mcpServer.ResolvedServer, error)
type SecretStore ¶
type SecretStore interface {
ResolveSecret(ctx context.Context, ref string) (string, error)
SetMCPSecret(
ctx context.Context,
ref string,
value string,
) (hash string, nonEmpty bool, err error)
DeleteSecret(ctx context.Context, ref string) error
}
SecretStore is deliberately narrow. Aggregate owns the mapping from runtime identity to artifact-scoped secret identity; the app supplies persistence.
type SecretWriteResult ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(dependencies Dependencies) (*Service, error)
func (*Service) DeleteServerSecret ¶
func (s *Service) DeleteServerSecret( ctx context.Context, ref artifact.ArtifactRef, kind mcpDomainSecret.MCPSecretKind, slot string, ) error
func (*Service) GetServerAuthHealth ¶
func (s *Service) GetServerAuthHealth( ctx context.Context, ref artifact.ArtifactRef, ) (mcpAuth.MCPAuthHealth, error)
func (*Service) InspectRuntimeConfig ¶
func (s *Service) InspectRuntimeConfig( ctx context.Context, ref artifact.ArtifactRef, ) (mcpServer.RuntimeConfig, mcpDomainServer.Resolved, error)
func (*Service) PurgeBundle ¶
func (s *Service) PurgeBundle( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) error
func (*Service) PutServerSecret ¶
func (s *Service) PutServerSecret( ctx context.Context, ref artifact.ArtifactRef, kind mcpDomainSecret.MCPSecretKind, slot string, value string, ) (SecretWriteResult, error)
func (*Service) RefreshBundle ¶
func (s *Service) RefreshBundle( ctx context.Context, ref collection.CollectionRef, allowProtected bool, ) (mcpConsumerAPI.Bundle, error)
func (*Service) ReplaceDocument ¶
func (s *Service) ReplaceDocument( ctx context.Context, request mcpConsumerAPI.ReplaceDocumentRequest, ) (mcpConsumerAPI.Bundle, error)
func (*Service) RetireBundle ¶
func (s *Service) RetireBundle( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, ) (collection.Collection, error)
func (*Service) UpdateBundleEnabled ¶
func (s *Service) UpdateBundleEnabled( ctx context.Context, ref collection.CollectionRef, expectedRevision uint64, enabled bool, ) (mcpConsumerAPI.Bundle, error)
func (*Service) UpdateProtectedBundleInstallation ¶
func (s *Service) UpdateProtectedBundleInstallation( ctx context.Context, ref collection.CollectionRef, expectedOverlayRevision uint64, runtimeEnabled bool, ) error
func (*Service) UpdateProtectedServerInstallation ¶
func (s *Service) UpdateProtectedServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedOverlayRevision uint64, runtimeEnabled bool, data mcpDomainServer.ServerData, ) error
func (*Service) UpdateServerInstallation ¶
func (s *Service) UpdateServerInstallation( ctx context.Context, ref artifact.ArtifactRef, expectedArtifactRevision uint64, data mcpDomainServer.ServerData, ) (artifact.Artifact, error)