Documentation
¶
Overview ¶
Package writer contains the SyncWriter interface and implementations
Package writer contains the SyncWriter interface and implementations ¶
Package writer contains the SyncWriter interface and implementations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncWriter ¶
type SyncWriter interface {
// Store saves a UpstreamRegistry instance to persistent storage for a specific registry
Store(ctx context.Context, registryName string, reg *toolhivetypes.UpstreamRegistry) error
}
SyncWriter defines the interface needed to persist the list of MCP servers.
func NewDBSyncWriter ¶ added in v0.3.2
func NewDBSyncWriter(pool *pgxpool.Pool, maxMetaSize int) (SyncWriter, error)
NewDBSyncWriter creates a new dbSyncWriter with the given connection pool. The caller is responsible for closing the pool when done. maxMetaSize specifies the maximum allowed size in bytes for publisher-provided metadata extensions and must be greater than zero.
func NewSyncWriter ¶ added in v0.3.2
func NewSyncWriter(pool *pgxpool.Pool, maxMetaSize int) (SyncWriter, error)
NewSyncWriter creates a database-backed SyncWriter. The pool parameter must not be nil. maxMetaSize specifies the maximum allowed size in bytes for publisher-provided metadata extensions and must be greater than zero.