interaction

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package interaction 处理 cmd.interaction lane 的交互式命令 (approval.resolve 和 question.answer),通过 Resolver 接口转发。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler 处理 cmd.interaction lane 的命令。 实现 command.InteractionHandler 接口。

func New

func New(resolver Resolver) *Handler

New 创建 interaction handler。

func (*Handler) HandleInteractionCommand

func (h *Handler) HandleInteractionCommand(ctx context.Context, cmd messaging.WorkerCommand) error

HandleInteractionCommand 处理 approval.resolve 或 question.answer 命令。

type Resolver

type Resolver interface {
	ResolveApproval(requestID, action, reason string) error
	ResolveQuestion(requestID string, answers [][]string) error
}

Resolver 是 approval/question 的解析接口。 生产环境由进程装配时创建的 InteractionRouter 实现。

Jump to

Keyboard shortcuts

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