Files
Yichao YangandGitHub 89a4eb7855 CHASM: Engine Update/ReadComponent implementation (#7696)
## What changed?
- Implement chasm engine Update/Read Component method

## Why?
- CHASM work stream

## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)
2025-05-08 19:21:27 -07:00

31 lines
904 B
Go

//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination chasm_tree_mock.go
package interfaces
import (
"time"
persistencespb "go.temporal.io/server/api/persistence/v1"
"go.temporal.io/server/chasm"
)
var _ ChasmTree = (*chasm.Node)(nil)
// TODO: Remove this interface and use *chasm.Node directly
// when chasm/tree.go implementation completes.
type ChasmTree interface {
CloseTransaction() (chasm.NodesMutation, error)
Snapshot(*persistencespb.VersionedTransition) chasm.NodesSnapshot
ApplyMutation(chasm.NodesMutation) error
ApplySnapshot(chasm.NodesSnapshot) error
IsDirty() bool
Terminate(chasm.TerminateComponentRequest) error
Archetype() string
EachPureTask(
deadline time.Time,
callback func(executor chasm.NodeExecutePureTask, task any) error,
) error
IsStale(chasm.ComponentRef) error
Component(chasm.Context, chasm.ComponentRef) (chasm.Component, error)
}