@@ -59,12 +59,12 @@ func (h *CreateLambdaHandler) Typ() string {
5959}
6060
6161// Check .
62- func (h * CreateLambdaHandler ) Check (context.Context , interface {} ) (bool , error ) {
62+ func (h * CreateLambdaHandler ) Check (context.Context , any ) (bool , error ) {
6363 return true , nil
6464}
6565
6666// Encode .
67- func (h * CreateLambdaHandler ) Encode (raw interface {} ) ([]byte , error ) {
67+ func (h * CreateLambdaHandler ) Encode (raw any ) ([]byte , error ) {
6868 workloadID , ok := raw .(string )
6969 if ! ok {
7070 return nil , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -73,12 +73,12 @@ func (h *CreateLambdaHandler) Encode(raw interface{}) ([]byte, error) {
7373}
7474
7575// Decode .
76- func (h * CreateLambdaHandler ) Decode (bs []byte ) (interface {} , error ) {
76+ func (h * CreateLambdaHandler ) Decode (bs []byte ) (any , error ) {
7777 return string (bs ), nil
7878}
7979
8080// Handle .
81- func (h * CreateLambdaHandler ) Handle (ctx context.Context , raw interface {} ) error {
81+ func (h * CreateLambdaHandler ) Handle (ctx context.Context , raw any ) error {
8282 workloadID , ok := raw .(string )
8383 if ! ok {
8484 return errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -133,7 +133,7 @@ func (h *CreateWorkloadHandler) Typ() string {
133133}
134134
135135// Check .
136- func (h * CreateWorkloadHandler ) Check (_ context.Context , raw interface {} ) (handle bool , err error ) {
136+ func (h * CreateWorkloadHandler ) Check (_ context.Context , raw any ) (handle bool , err error ) {
137137 _ , ok := raw .(* types.Workload )
138138 if ! ok {
139139 return false , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -142,7 +142,7 @@ func (h *CreateWorkloadHandler) Check(_ context.Context, raw interface{}) (handl
142142}
143143
144144// Encode .
145- func (h * CreateWorkloadHandler ) Encode (raw interface {} ) ([]byte , error ) {
145+ func (h * CreateWorkloadHandler ) Encode (raw any ) ([]byte , error ) {
146146 wrk , ok := raw .(* types.Workload )
147147 if ! ok {
148148 return nil , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -151,14 +151,14 @@ func (h *CreateWorkloadHandler) Encode(raw interface{}) ([]byte, error) {
151151}
152152
153153// Decode .
154- func (h * CreateWorkloadHandler ) Decode (bs []byte ) (interface {} , error ) {
154+ func (h * CreateWorkloadHandler ) Decode (bs []byte ) (any , error ) {
155155 wrk := & types.Workload {}
156156 err := json .Unmarshal (bs , wrk )
157157 return wrk , err
158158}
159159
160160// Handle will remove instance, remove meta, restore resource
161- func (h * CreateWorkloadHandler ) Handle (ctx context.Context , raw interface {} ) (err error ) {
161+ func (h * CreateWorkloadHandler ) Handle (ctx context.Context , raw any ) (err error ) {
162162 wrk , _ := raw .(* types.Workload )
163163 logger := log .WithFunc ("wal.CreateWorkloadHandler.Handle" ).WithField ("ID" , wrk .ID ).WithField ("node" , wrk .Nodename )
164164
@@ -210,15 +210,15 @@ func (h *WorkloadResourceAllocatedHandler) Typ() string {
210210}
211211
212212// Check .
213- func (h * WorkloadResourceAllocatedHandler ) Check (_ context.Context , raw interface {} ) (bool , error ) {
213+ func (h * WorkloadResourceAllocatedHandler ) Check (_ context.Context , raw any ) (bool , error ) {
214214 if _ , ok := raw .([]* types.Node ); ! ok {
215215 return false , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
216216 }
217217 return true , nil
218218}
219219
220220// Encode .
221- func (h * WorkloadResourceAllocatedHandler ) Encode (raw interface {} ) ([]byte , error ) {
221+ func (h * WorkloadResourceAllocatedHandler ) Encode (raw any ) ([]byte , error ) {
222222 nodes , ok := raw .([]* types.Node )
223223 if ! ok {
224224 return nil , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -227,13 +227,13 @@ func (h *WorkloadResourceAllocatedHandler) Encode(raw interface{}) ([]byte, erro
227227}
228228
229229// Decode .
230- func (h * WorkloadResourceAllocatedHandler ) Decode (bytes []byte ) (interface {} , error ) {
230+ func (h * WorkloadResourceAllocatedHandler ) Decode (bytes []byte ) (any , error ) {
231231 nodes := []* types.Node {}
232232 return nodes , json .Unmarshal (bytes , & nodes )
233233}
234234
235235// Handle .
236- func (h * WorkloadResourceAllocatedHandler ) Handle (ctx context.Context , raw interface {} ) (err error ) {
236+ func (h * WorkloadResourceAllocatedHandler ) Handle (ctx context.Context , raw any ) (err error ) {
237237 nodes , _ := raw .([]* types.Node )
238238 logger := log .WithFunc ("wal.WorkloadResourceAllocatedHandler.Handle" ).WithField ("event" , eventWorkloadResourceAllocated )
239239
@@ -281,15 +281,15 @@ func (h *ProcessingCreatedHandler) Typ() string {
281281}
282282
283283// Check .
284- func (h ProcessingCreatedHandler ) Check (_ context.Context , raw interface {} ) (bool , error ) {
284+ func (h ProcessingCreatedHandler ) Check (_ context.Context , raw any ) (bool , error ) {
285285 if _ , ok := raw .(* types.Processing ); ! ok {
286286 return false , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
287287 }
288288 return true , nil
289289}
290290
291291// Encode .
292- func (h * ProcessingCreatedHandler ) Encode (raw interface {} ) ([]byte , error ) {
292+ func (h * ProcessingCreatedHandler ) Encode (raw any ) ([]byte , error ) {
293293 processing , ok := raw .(* types.Processing )
294294 if ! ok {
295295 return nil , errors .Wrapf (types .ErrInvalidWALDataType , "%+v" , raw )
@@ -298,13 +298,13 @@ func (h *ProcessingCreatedHandler) Encode(raw interface{}) ([]byte, error) {
298298}
299299
300300// Decode .
301- func (h * ProcessingCreatedHandler ) Decode (bs []byte ) (interface {} , error ) {
301+ func (h * ProcessingCreatedHandler ) Decode (bs []byte ) (any , error ) {
302302 processing := & types.Processing {}
303303 return processing , json .Unmarshal (bs , processing )
304304}
305305
306306// Handle .
307- func (h * ProcessingCreatedHandler ) Handle (ctx context.Context , raw interface {} ) (err error ) {
307+ func (h * ProcessingCreatedHandler ) Handle (ctx context.Context , raw any ) (err error ) {
308308 processing , _ := raw .(* types.Processing )
309309 logger := log .WithFunc ("wal.ProcessingCreatedHandler.Handle" ).WithField ("event" , eventProcessingCreated ).WithField ("ident" , processing .Ident )
310310
0 commit comments