-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathhandleappInstMetadata.go
More file actions
33 lines (26 loc) · 1006 Bytes
/
handleappInstMetadata.go
File metadata and controls
33 lines (26 loc) · 1006 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Copyright (c) 2021. Zededa, Inc.
* SPDX-License-Identifier: Apache-2.0
*/
package zedagent
import "github.com/lf-edge/eve/pkg/pillar/types"
func handleAppInstMetaDataCreate(ctxArg interface{}, key string,
statusArg interface{}) {
handleAppInstMetaDataImpl(ctxArg, key, statusArg)
}
func handleAppInstMetaDataModify(ctxArg interface{}, key string,
statusArg interface{}, oldStatusArg interface{}) {
handleAppInstMetaDataImpl(ctxArg, key, statusArg)
}
func handleAppInstMetaDataDelete(ctxArg interface{}, key string, statusArg interface{}) {
appInstMetaData := statusArg.(types.AppInstMetaData)
ctx := ctxArg.(*zedagentContext)
PublishAppInstMetaDataToZedCloud(ctx, &appInstMetaData, true, AllDest)
ctx.iteration++
}
func handleAppInstMetaDataImpl(ctxArg interface{}, key string, statusArg interface{}) {
appInstMetaData := statusArg.(types.AppInstMetaData)
ctx := ctxArg.(*zedagentContext)
PublishAppInstMetaDataToZedCloud(ctx, &appInstMetaData, false, AllDest)
ctx.iteration++
}