consul

package
v1.2.0 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 consul implements the functions, types, and interfaces for the module.

Package consul contains generated code by adptool.

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

Package consul 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 ...consul.Option) (config.Source, error)

func NewSource

func NewSource(srcConfig *sourcev1.SourceConfig, opts ...options.Option) (kratosconfig.Source, error)

NewSource create a new consul config.

func SyncConfig

func SyncConfig(ccfg *sourcev1.SourceConfig, v any, opts ...options.Option) error

func WithConsulOption

func WithConsulOption(opts ...consul.Option) options.Option

func WithContext

func WithContext(ctx context.Context) consul.Option

func WithPath

func WithPath(p string) consul.Option

Types

type Option

type Option = consul.Option

type Options

type Options struct {
	Options []consul.Option
}

func FromOptions

func FromOptions(opts []options.Option) *Options

Jump to

Keyboard shortcuts

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