file

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package file implements the functions, types, and interfaces for the module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileSource added in v0.2.6

func NewFileSource(cfg *sourcev1.SourceConfig, opts ...options.Option) (kratosconfig.Source, error)

NewFileSource creates a new file source based on configuration. It adapts to the new bootstrap mechanism.

func NewSource

func NewSource(path string, opts ...Option) kratosconfig.Source

NewSource creates a new file source instance

func WithFormatter added in v0.2.1

func WithFormatter(formatter Formatter) options.Option

func WithIgnores

func WithIgnores(ignores ...string) options.Option

func WithOptional added in v0.2.7

func WithOptional() options.Option

Types

type Formatter added in v0.2.1

type Formatter func(key string, value []byte) (*config.KeyValue, error)

type Option

type Option = options.Option

Jump to

Keyboard shortcuts

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