github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/dashboard/dashboardevents/leaf_node_updated.go (about) 1 package dashboardevents 2 3 import ( 4 "github.com/turbot/steampipe/pkg/dashboard/dashboardtypes" 5 "github.com/turbot/steampipe/pkg/utils" 6 "time" 7 ) 8 9 type LeafNodeUpdated struct { 10 LeafNode map[string]any 11 Session string 12 ExecutionId string 13 Timestamp time.Time 14 } 15 16 func NewLeafNodeUpdate(r dashboardtypes.DashboardTreeRun, session, executionId string) (*LeafNodeUpdated, error) { 17 immutableNode, err := utils.JsonCloneToMap(r) 18 if err != nil { 19 return nil, err 20 } 21 return &LeafNodeUpdated{ 22 LeafNode: immutableNode, 23 Session: session, 24 ExecutionId: executionId, 25 Timestamp: time.Now(), 26 }, nil 27 } 28 29 // IsDashboardEvent implements DashboardEvent interface 30 func (*LeafNodeUpdated) IsDashboardEvent() {}