engine: Add setters for the trait interfaces

Turns out it's useful to wholesale set the entire struct.
This commit is contained in:
James Shubin
2018-12-29 01:13:31 -05:00
parent bdc33cd421
commit 4489076fac
6 changed files with 30 additions and 0 deletions

View File

@@ -34,6 +34,10 @@ type GroupableRes interface {
// grouping trait.
AutoGroupMeta() *AutoGroupMeta
// SetAutoGroupMeta lets you set all of the meta params for the
// automatic grouping trait in a single call.
SetAutoGroupMeta(*AutoGroupMeta)
// GroupCmp compares two resources and decides if they're suitable for
//grouping. This usually needs to be unique to your resource.
GroupCmp(res GroupableRes) error