File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,34 @@ func (fn TrackerFn) Track(ctx context.Context, mg Managed) error {
126126 return fn (ctx , mg )
127127}
128128
129+ // A LegacyTracker tracks legacy managed resources.
130+ type LegacyTracker interface {
131+ // Track the supplied legacy managed resource.
132+ Track (ctx context.Context , mg LegacyManaged ) error
133+ }
134+
135+ // A LegacyTrackerFn is a function that tracks legacy managed resources.
136+ type LegacyTrackerFn func (ctx context.Context , mg LegacyManaged ) error
137+
138+ // Track the supplied legacy managed resource.
139+ func (fn LegacyTrackerFn ) Track (ctx context.Context , mg LegacyManaged ) error {
140+ return fn (ctx , mg )
141+ }
142+
143+ // A ModernTracker tracks modern managed resources.
144+ type ModernTracker interface {
145+ // Track the supplied modern managed resource.
146+ Track (ctx context.Context , mg ModernManaged ) error
147+ }
148+
149+ // A ModernTrackerFn is a function that tracks modern managed resources.
150+ type ModernTrackerFn func (ctx context.Context , mg ModernManaged ) error
151+
152+ // Track the supplied modern managed resource.
153+ func (fn ModernTrackerFn ) Track (ctx context.Context , mg ModernManaged ) error {
154+ return fn (ctx , mg )
155+ }
156+
129157// A ProviderConfigUsageTracker tracks usages of a ProviderConfig by creating or
130158// updating the appropriate ProviderConfigUsage.
131159type ProviderConfigUsageTracker struct {
You can’t perform that action at this time.
0 commit comments