Documentation
¶
Overview ¶
Package database provides a database-backed implementation of the RegistryService interface
Package database provides a database-backed implementation of the RegistryService interface
Index ¶
Constants ¶
View Source
const (
// ServiceTracerName is the name used for the database service tracer
ServiceTracerName = "github.com/stacklok/toolhive-registry-server/service/db"
)
Variables ¶
View Source
var ( // DBSystemPostgres is the database system attribute for PostgreSQL DBSystemPostgres = semconv.DBSystemPostgreSQL )
Database semantic convention attributes
View Source
var ( // ErrBug is returned when a server is not found ErrBug = errors.New("bug") )
Functions ¶
Types ¶
type Option ¶
type Option func(*options) error
Option is a functional option for configuring the database service
func WithConnectionPool ¶
WithConnectionPool creates a new database-backed registry service with the given pgx pool. The caller is responsible for closing the pool when it is done.
func WithTracer ¶ added in v0.5.2
WithTracer sets the OpenTelemetry tracer for the database service. If not set, tracing will be disabled (no-op).
Click to show internal directories.
Click to hide internal directories.