checkpoint

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Overview

Package checkpoint 是会话检查点的文件存储(adk Get/Set 两方法;自产品 internal/agent/checkpoint.go 迁入)。落位 .agent/users/<operator>/sessions/ <sid>/checkpoints/<key>(用户隔离 + 会话删除整目录同删);存储经 UserStore 接口注入——应用数据面(唯一文件写入器)在产品侧。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileCheckPointStore

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

FileCheckPointStore 单会话的 checkpoint 存储(operator+sid 定位用户域子树)。

func NewCheckPointStore

func NewCheckPointStore(st UserStore, operator, sid string) *FileCheckPointStore

NewCheckPointStore 构造(operator/sid 已由会话域校验过形态)。

func (*FileCheckPointStore) Get

func (s *FileCheckPointStore) Get(_ context.Context, key string) ([]byte, bool, error)

Get 读 checkpoint(不存在 = ok false)。

func (*FileCheckPointStore) Set

func (s *FileCheckPointStore) Set(_ context.Context, key string, checkpoint []byte) error

Set 写 checkpoint(走 store 唯一写入器串行队列 + 原子写)。

type UserStore

type UserStore interface {
	ReadUserTreeFile(operator, rel string) ([]byte, bool)
	WriteUserTreeFile(operator, rel string, data []byte) error
}

UserStore 用户域子树读写面(应用注入——产品 FileStore 结构性满足)。

Jump to

Keyboard shortcuts

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