Files
tasks/chasm/library_core.go
Alan WuandGitHub 18223df619 Implement detached component (#9086)
## What changed?
Implement detached component as a Field option and Registrable Component
option.

Add detached boolean value to ComponentAttributes persistence proto
definition.

## Why?
Allow detached components to continue updates and task execution even if
parent node lifecycle is closed.

## How did you test it?
- [X] built
- [X] run locally and tested manually
- [X] covered by existing tests
- [X] added new unit test(s)
- [ ] added new functional test(s)
2026-01-28 17:43:01 -05:00

27 lines
573 B
Go

package chasm
// CoreLibrary contains built-in components maintained as part of the CHASM framework.
type CoreLibrary struct {
UnimplementedLibrary
}
func (b *CoreLibrary) Name() string {
return "core"
}
func (b *CoreLibrary) Components() []*RegistrableComponent {
return []*RegistrableComponent{
NewRegistrableComponent[*Visibility]("vis", WithDetached()),
}
}
func (b *CoreLibrary) Tasks() []*RegistrableTask {
return []*RegistrableTask{
NewRegistrableSideEffectTask(
"visTask",
defaultVisibilityTaskHandler,
defaultVisibilityTaskHandler,
),
}
}