writer

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 StoreOption added in v1.0.1

type StoreOption func(*storeOptions) error

StoreOption is a function that configures storeOptions.

func WithPerEntryClaims added in v1.0.1

func WithPerEntryClaims(claims map[string][]byte) StoreOption

WithPerEntryClaims provides per-entry claims that override source-level claims.

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, opts ...StoreOption) 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