noop

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package noop provides a no-op config source for monolith scenarios. This config source returns empty config and does not support Watch. Use when config is loaded from local files only.

空配置源实现包,用于单体应用场景。 此配置源返回空配置,不支持 Watch 操作。 用于仅从本地文件加载配置的场景。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider registers a no-op config source contract.

Provider 注册空配置源契约。

func NewProvider

func NewProvider() *Provider

NewProvider creates a new no-op config source provider instance.

NewProvider 创建新的空配置源 Provider 实例。

func (*Provider) Boot

Boot is a no-op for this provider.

Boot 此 Provider 无启动逻辑。

func (*Provider) DependsOn

func (p *Provider) DependsOn() []string

DependsOn returns the keys this provider depends on. Noop config source has no dependencies.

DependsOn 返回该 provider 依赖的 key。 Noop config source 无依赖。

func (*Provider) IsDefer

func (p *Provider) IsDefer() bool

IsDefer returns true, config source can be deferred until first use.

IsDefer 返回 true,配置源可延迟初始化直到首次使用。

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name "configsource.noop".

Name 返回 Provider 名称 "configsource.noop"。

func (*Provider) Provides

func (p *Provider) Provides() []string

Provides returns the config source contract key.

Provides 返回配置源契约键。

func (*Provider) Register

func (p *Provider) Register(c runtimecontract.Container) error

Register binds the no-op config source to the container.

Register 将空配置源绑定到容器。

Jump to

Keyboard shortcuts

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