Documentation
¶
Overview ¶
Package noop provides a no-op DTM distributed transaction client for monolith scenarios. This client returns ErrNoopDTM for all transaction operations. Note: Distributed transactions are not available in monolith mode.
空 DTM 分布式事务客户端实现包,用于单体应用场景。 此客户端对所有事务操作返回 ErrNoopDTM 错误。 注意:分布式事务在单体模式下不可用。
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoopDTM = errors.New("dtm: noop mode, distributed transaction not available in monolith")
ErrNoopDTM indicates DTM is not available in monolith mode.
ErrNoopDTM 表示 DTM 在单体模式下不可用。
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider registers a no-op DTM client contract.
Provider 注册空 DTM 客户端契约。
func NewProvider ¶
func NewProvider() *Provider
NewProvider creates a new no-op DTM provider instance.
NewProvider 创建新的空 DTM Provider 实例。
func (*Provider) Boot ¶
func (p *Provider) Boot(runtimecontract.Container) error
Boot is a no-op for this provider.
Boot 此 Provider 无启动逻辑。
func (*Provider) DependsOn ¶
DependsOn returns the keys this provider depends on. Noop DTM has no dependencies.
DependsOn 返回该 provider 依赖的 key。 Noop DTM 无依赖。
func (*Provider) IsDefer ¶
IsDefer returns true, DTM client can be deferred until first use.
IsDefer 返回 true,DTM 客户端可延迟初始化直到首次使用。