go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/llx/runtime.go (about) 1 // Copyright (c) Mondoo, Inc. 2 // SPDX-License-Identifier: BUSL-1.1 3 4 package llx 5 6 import "go.mondoo.com/cnquery/providers-sdk/v1/resources" 7 8 type Runtime interface { 9 AssetMRN() string 10 Unregister(watcherUID string) error 11 CreateResource(name string, args map[string]*Primitive) (Resource, error) 12 CloneResource(src Resource, id string, fields []string, args map[string]*Primitive) (Resource, error) 13 WatchAndUpdate(resource Resource, field string, watcherUID string, callback func(res interface{}, err error)) error 14 Schema() Schema 15 Close() 16 } 17 18 type Schema interface { 19 Lookup(resource string) *resources.ResourceInfo 20 LookupField(resource string, field string) (*resources.ResourceInfo, *resources.Field) 21 AllResources() map[string]*resources.ResourceInfo 22 }