mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## 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)
36 lines
842 B
Go
36 lines
842 B
Go
package chasm
|
|
|
|
import "reflect"
|
|
|
|
func (r *Registry) Component(fqn string) (*RegistrableComponent, bool) {
|
|
return r.component(fqn)
|
|
}
|
|
|
|
func (r *Registry) Task(fqn string) (*RegistrableTask, bool) {
|
|
return r.task(fqn)
|
|
}
|
|
|
|
func (r *Registry) ComponentFor(componentInstance any) (*RegistrableComponent, bool) {
|
|
return r.componentFor(componentInstance)
|
|
}
|
|
|
|
func (r *Registry) ComponentOf(componentGoType reflect.Type) (*RegistrableComponent, bool) {
|
|
return r.componentOf(componentGoType)
|
|
}
|
|
|
|
func (r *Registry) TaskFor(taskInstance any) (*RegistrableTask, bool) {
|
|
return r.taskFor(taskInstance)
|
|
}
|
|
|
|
func (r *Registry) TaskOf(taskGoType reflect.Type) (*RegistrableTask, bool) {
|
|
return r.taskOf(taskGoType)
|
|
}
|
|
|
|
func (rc RegistrableComponent) FqType() string {
|
|
return rc.fqType()
|
|
}
|
|
|
|
func (rt RegistrableTask) FqType() string {
|
|
return rt.fqType()
|
|
}
|