datasource

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package datasource declares the data source interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigProvider added in v0.14.8

type ConfigProvider func(varName string) (string, error)

ConfigProvider returns the value of the supplied variable as a JSON string. A config provider is used at the time of data source creation to allow the data source to be correctly configured.

type DataSource

type DataSource interface {
	// Name returns the name of this data source and is used to determine if
	// an import path should be processed by the data source importer.
	Name() string
	// Resolve resolves the absolute path defined for the data source to a string.
	Resolve(path string) (string, error)
}

DataSource is a named delegate that can resolve import paths. Multiple VMs may access a single instance of a data source. Thus, data source implementations must be safe for concurrent use.

Jump to

Keyboard shortcuts

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