processor

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

Factory 根据 ProviderConfig 创建 ProviderProcessor。

type OperationProcessor

type OperationProcessor interface {
	Build(raw [][]byte, files []string) (any, error)
	Diff(raw [][]byte, baseline []byte, preview int) (*model.DiffSummary, error)
}

OperationProcessor 抽象单个管线的解析与 diff 行为,方便按 Provider 定制实现。

type ProviderProcessor

type ProviderProcessor interface {
	For(kind model.OperationKind) (OperationProcessor, error)
}

ProviderProcessor 负责为某个 Provider 提供各 Operation 对应的处理器。

type Registry

type Registry map[string]Factory

Registry 维护不同 Provider 的处理器工厂。

func (Registry) Lookup

func (r Registry) Lookup(kind string) (Factory, error)

Lookup 返回指定 Provider kind 对应的工厂。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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