-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add implementation of CHASM List/Count Runs #8662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8088604
e52bdbe
d89db79
660f97c
c1190db
65b4f4b
ab894de
e9d6d5b
8e1521b
5f6c3fb
954e13c
82c0e1b
abef51c
e15a190
dff1a76
dd33b53
3088e1c
817768d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,15 @@ func (r *Registry) ComponentFqnByID(id uint32) (string, bool) { | |
| return fqn, ok | ||
| } | ||
|
|
||
| // ComponentByID returns the registrable component for a given archetype ID. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. plz also comment that those methods should not be used by chasm library developer. and also for RegistrableComponent.SearchAttributesMapper() we probably need to create a separate interface for developer facing registry later. |
||
| func (r *Registry) ComponentByID(id uint32) (*RegistrableComponent, bool) { | ||
| fqn, ok := r.componentFqnByID[id] | ||
| if !ok { | ||
| return nil, false | ||
| } | ||
| return r.component(fqn) | ||
| } | ||
|
|
||
| // ComponentIDFor converts registered component instance to component type ID. | ||
| // This method should only be used by CHASM framework internal code, | ||
| // NOT CHASM library developers. | ||
|
|
@@ -136,6 +145,17 @@ func (r *Registry) componentOf(componentGoType reflect.Type) (*RegistrableCompon | |
| return rc, ok | ||
| } | ||
|
|
||
| // ArchetypeIDOf returns the ArchetypeID for the given component Go type. | ||
| // This method should only be used by CHASM framework internal, | ||
| // NOT CHASM library developers. | ||
| func (r *Registry) ArchetypeIDOf(componentGoType reflect.Type) (ArchetypeID, bool) { | ||
| rc, ok := r.componentByGoType[componentGoType] | ||
| if !ok { | ||
| return UnspecifiedArchetypeID, false | ||
| } | ||
| return rc.componentID, true | ||
| } | ||
|
|
||
| func (r *Registry) taskOf(taskGoType reflect.Type) (*RegistrableTask, bool) { | ||
| rt, ok := r.taskByGoType[taskGoType] | ||
| return rt, ok | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need to take in both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NamespaceIDis what we store in persistence, andNamespaceNameis needed for dynamic config and custom search attributes mapper.