datasource

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

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