catalog

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactError

type ArtifactError struct {
	Error error
	Path  string
}

type MigrationItem

type MigrationItem struct {
	Name                   string
	NormalizedName         string
	Path                   string
	Type                   MigrationType
	CatalogInFile          *drivers.CatalogEntry
	CatalogInStore         *drivers.CatalogEntry
	NewCatalog             *drivers.CatalogEntry
	HasChanged             bool
	FromName               string
	FromNormalizedName     string
	FromPath               string
	NormalizedDependencies []string
	Error                  *runtimev1.ReconcileError
}

type MigrationMeta added in v0.24.0

type MigrationMeta struct {
	// temporary information. should this be persisted into olap?
	// LastMigration stores the last time migrate was run. Used to filter out repos that didnt change since this time
	LastMigration time.Time

	// used to get path when we only have name. happens when we get name from DAG
	// TODO: should we add path to the DAG instead
	NameToPath map[string]string
	// contains filtered or unexported fields
}

func NewMigrationMeta added in v0.24.0

func NewMigrationMeta() *MigrationMeta

type MigrationType added in v0.19.0

type MigrationType int
const (
	MigrationNoChange     MigrationType = 0
	MigrationCreate       MigrationType = 1
	MigrationRename       MigrationType = 2
	MigrationUpdate       MigrationType = 3
	MigrationReportUpdate MigrationType = 4
	MigrationDelete       MigrationType = 5
)

type ReconcileConfig added in v0.16.0

type ReconcileConfig struct {
	DryRun            bool
	Strict            bool
	ChangedPaths      []string
	ForcedPaths       []string
	SafeSourceRefresh bool
}

type ReconcileResult added in v0.16.0

type ReconcileResult struct {
	AddedObjects   []*drivers.CatalogEntry
	UpdatedObjects []*drivers.CatalogEntry
	DroppedObjects []*drivers.CatalogEntry
	AffectedPaths  []string
	Errors         []*runtimev1.ReconcileError
}

func NewReconcileResult added in v0.16.0

func NewReconcileResult() *ReconcileResult

type Service

type Service struct {
	Catalog       drivers.CatalogStore
	Repo          drivers.RepoStore
	Olap          drivers.OLAPStore
	RegistryStore drivers.RegistryStore
	InstID        string

	Meta *MigrationMeta
	// contains filtered or unexported fields
}

func NewService

func NewService(
	catalog drivers.CatalogStore,
	repo drivers.RepoStore,
	olap drivers.OLAPStore,
	registry drivers.RegistryStore,
	instID string,
	logger *zap.Logger,
	m *MigrationMeta,
	release func(),
	ac activity.Client,
) *Service

func (*Service) Close added in v0.32.0

func (s *Service) Close()

func (*Service) FindEntries added in v0.16.0

func (s *Service) FindEntries(ctx context.Context, typ drivers.ObjectType) ([]*drivers.CatalogEntry, error)

func (*Service) FindEntry added in v0.16.0

func (s *Service) FindEntry(ctx context.Context, name string) (*drivers.CatalogEntry, error)

func (*Service) Reconcile added in v0.16.0

func (s *Service) Reconcile(ctx context.Context, conf ReconcileConfig) (*ReconcileResult, error)

Directories

Path Synopsis
sql
yaml
Package yaml reads and writes artifacts that exactly mirror the internal representation
Package yaml reads and writes artifacts that exactly mirror the internal representation

Jump to

Keyboard shortcuts

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