noop

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package noop provides a no-op service authenticator for monolith scenarios. This authenticator returns a local identity for all authentication requests. Note: Service-to-service authentication is not available in monolith mode.

服务认证实现包,用于单体应用场景。 此认证器对所有认证请求返回本地身份。 注意:服务间认证在单体模式下不可用。

Index

Constants

This section is empty.

Variables

View Source
var ErrNoopAuth = errors.New("serviceauth: noop mode, authentication not available in monolith")

ErrNoopAuth indicates service authentication is not available in monolith mode.

ErrNoopAuth 表示服务认证在单体模式下不可用。

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider registers no-op service authenticator contracts.

Provider 注册空服务认证契约。

func NewProvider

func NewProvider() *Provider

NewProvider creates a new no-op service auth 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 service auth has no dependencies.

DependsOn 返回该 provider 依赖的 key。 Noop service auth 无依赖。

func (*Provider) IsDefer

func (p *Provider) IsDefer() bool

IsDefer returns true, service auth can be deferred until first use.

IsDefer 返回 true,服务认证可延迟初始化直到首次使用。

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name "serviceauth.noop".

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

func (*Provider) Provides

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

Provides returns the service auth contract keys.

Provides 返回服务认证契约键列表。

func (*Provider) Register

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

Register binds the no-op service authenticator to the container.

Register 将空服务认证绑定到容器。

Jump to

Keyboard shortcuts

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