@@ -152,7 +152,7 @@ type fakeActionDiagExtension struct {
152152 registeredDiagName string
153153 registeredActionFor string
154154 unregisteredFor string
155- actionHandler func (ctx context.Context , params map [string ]interface {} ) (map [string ]interface {} , error )
155+ actionHandler func (ctx context.Context , params map [string ]any ) (map [string ]any , error )
156156}
157157
158158func (f * fakeActionDiagExtension ) Start (context.Context , component.Host ) error { return nil }
@@ -164,7 +164,7 @@ func (f *fakeActionDiagExtension) RegisterDiagnosticHook(name, _, _, _ string, _
164164 f .registeredDiagName = name
165165}
166166
167- func (f * fakeActionDiagExtension ) RegisterActionHandler (name string , handler func (ctx context.Context , params map [string ]interface {} ) (map [string ]interface {} , error )) error {
167+ func (f * fakeActionDiagExtension ) RegisterActionHandler (name string , handler func (ctx context.Context , params map [string ]any ) (map [string ]any , error )) error {
168168 f .mu .Lock ()
169169 defer f .mu .Unlock ()
170170 f .registeredActionFor = name
@@ -196,9 +196,9 @@ type fakeAction struct {
196196
197197func (a * fakeAction ) Name () string { return a .name }
198198
199- func (a * fakeAction ) Execute (_ context.Context , _ map [string ]interface {} ) (map [string ]interface {} , error ) {
199+ func (a * fakeAction ) Execute (_ context.Context , _ map [string ]any ) (map [string ]any , error ) {
200200 a .executed .Store (true )
201- return map [string ]interface {} {"ok" : true }, nil
201+ return map [string ]any {"ok" : true }, nil
202202}
203203
204204// TestBeatReceiverStart_WiresActionAndDiagnosticExtensions verifies that Start
@@ -271,9 +271,9 @@ func TestBeatReceiverStart_WiresActionAndDiagnosticExtensions(t *testing.T) {
271271 ext .mu .Unlock ()
272272 require .NotNil (t , handler , "action handler should have been registered with the extension" )
273273
274- res , err := handler (t .Context (), map [string ]interface {} {"id" : "abc" })
274+ res , err := handler (t .Context (), map [string ]any {"id" : "abc" })
275275 require .NoError (t , err )
276- assert .Equal (t , map [string ]interface {} {"ok" : true }, res )
276+ assert .Equal (t , map [string ]any {"ok" : true }, res )
277277 assert .True (t , act .executed .Load (), "invoking the registered handler should execute the underlying action" )
278278
279279 b .Manager .UnregisterAction (act )
0 commit comments