config

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	DefaultPathName = "bootstrap.json"
	Type            = "consul"
)

Variables

This section is empty.

Functions

func FileConfigPath

func FileConfigPath(serviceName, filename string) string

func New

func New(client *api.Client, opts ...Option) (config.KSource, error)

New returns a new consul config source

func NewConsulConfig

func NewConsulConfig(ccfg *configv1.SourceConfig, ss ...config.OptionSetting) (config.KConfig, error)

NewConsulConfig create a new consul config.

func SyncConfig

func SyncConfig(ccfg *configv1.SourceConfig, v any, ss ...config.OptionSetting) error

Types

type Option

type Option = consul.Option

func WithContext

func WithContext(ctx context.Context) Option

WithContext with registry context

func WithPath

func WithPath(p string) Option

WithPath with registry path

Jump to

Keyboard shortcuts

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