Files
tasks/chasm/lib/workflow/library.go
Yichao YangandGitHub bd90fe6f8d CHASM: Store component and task type ID instead of name (#8588)
## What changed?
- Introduce typeID for registered CHASM components and tasks
- In longer term the relationship between component/task name and ID
should be persisted (similar to namespace)

## Why?
- Store less data
- Decouple user visible name from internal implementation, making it
possible in the future to rename components/tasks
- Required for separate ID space work, where archetype information needs
to be stored in all history tasks as well.

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

24 lines
418 B
Go

package workflow
import "go.temporal.io/server/chasm"
type (
Library struct {
chasm.UnimplementedLibrary
}
)
func NewLibrary() *Library {
return &Library{}
}
func (l *Library) Name() string {
return chasm.WorkflowLibraryName
}
func (l *Library) Components() []*chasm.RegistrableComponent {
return []*chasm.RegistrableComponent{
chasm.NewRegistrableComponent[*Workflow](chasm.WorkflowComponentName),
}
}