Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶ added in v0.15.0
type Catalog struct { Gadgets []*GadgetInfo Operators []*OperatorInfo }
Catalog stores both data about gadgets and operators in a serializable way. This is used to handle gadgets and operators, even if they aren't run locally (and their code is not or only partially available)
type CombinedGadgetResult ¶ added in v0.15.0
type CombinedGadgetResult map[string]*GadgetResult
func (CombinedGadgetResult) Err ¶ added in v0.15.0
func (r CombinedGadgetResult) Err() error
type GadgetContext ¶
type GadgetContext interface { ID() string Parser() parser.Parser GadgetDesc() gadgets.GadgetDesc Context() context.Context Operators() operators.Operators Logger() logger.Logger RuntimeParams() *params.Params GadgetParams() *params.Params Args() []string OperatorsParamCollection() params.Collection Timeout() time.Duration }
type GadgetInfo ¶ added in v0.15.0
type GadgetInfo struct { ID string `json:"id"` Name string `json:"name"` Category string `json:"category"` Type string `json:"type"` Description string `json:"description"` Params params.ParamDescs `json:"params"` ColumnsDefinition any `json:"columnsDefinition"` OperatorParamsCollection params.DescCollection `json:"operatorParamsCollection"` }
GadgetInfo is used to store GadgetDesc information in a serializable way
func GadgetInfoFromGadgetDesc ¶ added in v0.15.0
func GadgetInfoFromGadgetDesc(gadgetDesc gadgets.GadgetDesc) *GadgetInfo
type GadgetResult ¶ added in v0.15.0
GadgetResult contains the (optional) payload and error of a gadget run for a node
type OperatorInfo ¶ added in v0.15.0
OperatorInfo is used to store operator information in a serializable way
func OperatorToOperatorInfo ¶ added in v0.15.0
func OperatorToOperatorInfo(operator operators.Operator) *OperatorInfo
type Runtime ¶
type Runtime interface { Init(globalRuntimeParams *params.Params) error Close() error GlobalParamDescs() params.ParamDescs ParamDescs() params.ParamDescs RunGadget(gadgetCtx GadgetContext) (CombinedGadgetResult, error) GetCatalog() (*Catalog, error) SetDefaultValue(params.ValueHint, string) GetDefaultValue(params.ValueHint) (string, bool) }
Runtime is the interface for gadget runtimes. Runtimes are used to control the lifecycle of gadgets either locally or remotely.
Click to show internal directories.
Click to hide internal directories.