config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

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

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

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

Index

Constants

View Source
const Type = "config"

Variables

View Source
var (
	// ErrNotFound defined error from kratos config package
	ErrNotFound = kratosconfig.ErrNotFound
)

Functions

func WithDiscovery added in v0.0.9

func WithDiscovery(discovery registry.Discovery) func(*ServiceConfig)

func WithEndpointURL added in v0.0.9

func WithEndpointURL(endpoint EndpointURLFunc) func(*ServiceConfig)

func WithMiddlewares added in v0.0.9

func WithMiddlewares(middlewares ...middleware.Middleware) func(*ServiceConfig)

Types

type Config

type Config = kratosconfig.Config

Define types from kratos config package

func New

func New(opts ...Option) Config

New returns a new config instance

type Decoder

type Decoder = kratosconfig.Decoder

Define types from kratos config package

type EndpointURLFunc added in v0.0.9

type EndpointURLFunc = func(endpoint string, scheme string, host string, addr string) (*url.URL, error)

type KeyValue added in v0.0.4

type KeyValue = kratosconfig.KeyValue

Define types from kratos config package

type Merge

type Merge = kratosconfig.Merge

Define types from kratos config package

type Observer added in v0.0.4

type Observer = kratosconfig.Observer

Define types from kratos config package

type Option

type Option = kratosconfig.Option

Define types from kratos config package

func WithDecoder

func WithDecoder(d Decoder) Option

WithDecoder sets the decoder

func WithMergeFunc

func WithMergeFunc(m Merge) Option

WithMergeFunc sets the merge function

func WithResolveActualTypes added in v0.0.4

func WithResolveActualTypes(enableConvertToType bool) Option

WithResolveActualTypes enables resolving actual types

func WithResolver

func WithResolver(r Resolver) Option

WithResolver sets the resolver

func WithSource

func WithSource(s ...Source) Option

WithSource sets the source

type Reader added in v0.0.4

type Reader = kratosconfig.Reader

Define types from kratos config package

type Resolver

type Resolver = kratosconfig.Resolver

Define types from kratos config package

type ServiceConfig added in v0.0.4

type ServiceConfig struct {
	Discovery   registry.Discovery
	Middlewares []middleware.Middleware
	EndpointURL func(endpoint string, scheme string, host string, addr string) (*url.URL, error)
}

type ServiceOption added in v0.0.9

type ServiceOption = func(*ServiceConfig)

type Source

type Source = kratosconfig.Source

Define types from kratos config package

type SourceFunc added in v0.0.9

type SourceFunc = func(s *SourceOption)

func WithCustomize added in v0.0.9

func WithCustomize(customize *configv1.Customize) SourceFunc

WithCustomize sets the customize field of the SourceOption struct.

func WithOptions added in v0.0.9

func WithOptions(options ...Option) SourceFunc

WithOptions sets the options field of the SourceOption struct.

type SourceOption added in v0.0.9

type SourceOption struct {
	Options   []Option
	Customize *configv1.Customize
}

type Value added in v0.0.4

type Value = kratosconfig.Value

Define types from kratos config package

type Watcher added in v0.0.4

type Watcher = kratosconfig.Watcher

Define types from kratos config package

Jump to

Keyboard shortcuts

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