file

package
v1.19.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package file implements a Store client for reading and watching configurations from local files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...option) store.Store

New creates a Store object to read configurations from local files

func WithConfigPaths

func WithConfigPaths(paths ...ConfigPath) option

WithConfigPaths sets paths to local configuration files

func WithTemplateData

func WithTemplateData(tData tdata.TemplateData) option

WithTemplateData sets template data source. Will use configurations from `tData` to replace templates in the configurations from local files

Types

type ConfigPath

type ConfigPath struct {
	Path      string // path to the local configuration file/directory. If it's a directory, then all files under the directory will also be read, excluding those start with a dot (.)
	Recursive bool   // true for reading files under `Path` recursively, false for reading only the files right under directory `Path`
}

ConfigPath holds path to the local configuration file/directory

Jump to

Keyboard shortcuts

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