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