Help us shape the future of Go! Take the 2026 Go Developer Survey

regcatalog

package
v1.152.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package regcatalog writes each table a registration records to the platform catalog, with a lineage edge from the file the table reads (#1918, #1922): a decorator over the registration store, so a registration made through manage_table and a webhook source's table are cataloged by the time the call that made them returns rather than on the next scan.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	tableregister.Store
	// contains filtered or unexported fields
}

Store is a registration store that also writes each table it records to the platform catalog, with a lineage edge from the file the table reads. A registration made through manage_table and a webhook source's table both pass through Insert, so both are cataloged by the time the call that made them returns rather than on the next scan.

A catalog write that fails is logged and does not fail the registration: the table exists and is recorded, and the next scan catalogs it.

func New

func New(inner tableregister.Store, cat Writer, instance func(bound string) string) *Store

New wraps inner. instance maps a registration's connection to the instance name catalog references carry; nil uses it as it stands.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

Delete removes the registration, then marks its table removed in the catalog: a scan does not mark a registered table removed, so without this an unregistered table would stay listed. Its curation stays readable.

func (*Store) Insert

Insert records the registration, then catalogs its table.

func (*Store) Relocate

func (s *Store) Relocate(ctx context.Context, id, location, format string, columns []tableregister.Column) error

Relocate moves the registration, then records the columns the table now declares.

type Writer

type Writer interface {
	PutDataset(ctx context.Context, in catalog.DatasetInput) (*catalog.Dataset, error)
	MarkDatasetRemoved(ctx context.Context, ref catalog.Ref) error
	AddEdges(ctx context.Context, edges []catalog.Edge) error
}

Writer is what cataloging a registered table needs from the platform catalog (#1918, #1922).

Jump to

Keyboard shortcuts

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