configprovider

package
v0.0.0-...-3b667df Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT-0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMaybeMultipart

func ParseMaybeMultipart(data []byte) (*internalapi.NodeConfig, error)

func ParseMultipart

func ParseMultipart(userDataReader *multipart.Reader) (*internalapi.NodeConfig, error)

Types

type ConfigProvider

type ConfigProvider interface {
	// Provide returns the internal version of the source configuration
	Provide() (*internalapi.NodeConfig, error)
}

ConfigProvider is an interface for providing the node configuration.

func BuildConfigProvider

func BuildConfigProvider(rawConfigSourceURL string) (ConfigProvider, error)

BuildConfigProvider returns a ConfigProvider appropriate for the given source URL. The source URL must have a scheme, and the supported schemes are: - `file`. To use configuration from the filesystem: `file:///path/to/file/or/directory`. - `imds`. To use configuration from the instance's user data: `imds://user-data`.

func NewFileConfigProvider

func NewFileConfigProvider(path string) ConfigProvider

func NewUserDataConfigProvider

func NewUserDataConfigProvider() ConfigProvider

Jump to

Keyboard shortcuts

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