writer

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL