datasource

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package datasource reads a repo's data_sources.yml. The host owns this (it holds connection config / credentials and runs queries); only the name->dbtype mapping is ever passed to the sidecar for SQL-dialect selection, so secrets never cross the IPC boundary.

Index

Constants

View Source
const FileName = "data_sources.yml"

FileName is the data source manifest, inside the repo's config dir (repo.Repo.ConfigDir()).

Variables

This section is empty.

Functions

func Load

func Load(configDir string) (map[string]DataSource, error)

Load reads <configDir>/data_sources.yml into a name->DataSource map.

Types

type DataSource

type DataSource struct {
	Name       string         `json:"name"`
	DBType     string         `json:"dbtype"`
	Connection map[string]any `json:"-"`
}

DataSource describes one data source. Name/DBType are what the sidecar needs to compile SQL (dialect). Connection holds the host-side connection config (passed to canal-query as dbconfig) and is never serialized to the sidecar.

Jump to

Keyboard shortcuts

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