Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGetter ¶ added in v0.4.0
func NewGetter(stores map[string]*v1alpha1store.Store) v1alpha1.GetterFunc
NewGetter returns a v1alpha1.GetterFunc that dispatches a cross-kind ResourceRef fetch against the supplied Stores map and decodes the RawObject into its typed envelope via v1alpha1.Default. Consumers: reconcilers / runtime adapters that need the referenced object's Spec (not just an existence check).
Dangling references return v1alpha1.ErrDanglingRef; unknown kinds return wrapped v1alpha1.ErrInvalidRef.
func NewResolver ¶ added in v0.4.0
func NewResolver(stores map[string]*v1alpha1store.Store) v1alpha1.ResolverFunc
NewResolver returns a v1alpha1.ResolverFunc that dispatches cross-kind ResourceRef existence checks against the supplied Stores map. The router wires one into its apply handler.
Dangling references return v1alpha1.ErrDanglingRef so callers can distinguish "row missing" from "database unavailable"; unknown kinds return wrapped v1alpha1.ErrInvalidRef.
Types ¶
type PostgreSQL ¶
type PostgreSQL struct {
// contains filtered or unexported fields
}
PostgreSQL is the root PostgreSQL-backed store. It owns the connection pool; per-kind v1alpha1 access happens via NewStores against db.Pool().
func NewPostgreSQL ¶
func NewPostgreSQL(ctx context.Context, connectionURI string, authz auth.Authorizer, skipMigrations bool) (*PostgreSQL, error)
NewPostgreSQL opens a pool against connectionURI, runs the v1alpha1 migrations against it (unless skipMigrations is true), and returns a *PostgreSQL ready for use by the generic v1alpha1 Store.
skipMigrations short-circuits the startup migrator entirely. Used when migrations have been applied out-of-band by `arctl db migrate up`. The pool is still parsed, opened, and pinged so a misconfigured DB fails fast.
func (*PostgreSQL) Pool ¶ added in v0.4.0
func (db *PostgreSQL) Pool() *pgxpool.Pool
Pool exposes the underlying pgxpool for callers that need direct pgx access.