mirror of
https://github.com/hanzoai/tasks.git
synced 2026-11-03 03:56:04 +00:00
## 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)
27 lines
573 B
Go
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,
|
|
),
|
|
}
|
|
}
|