Documentation
¶
Index ¶
- Constants
- func DeleteGadgetImage(ctx context.Context, image string) error
- type AuthOptions
- type BuildGadgetImageOpts
- type GadgetImage
- type GadgetImageDesc
- func BuildGadgetImage(ctx context.Context, opts *BuildGadgetImageOpts, image string) (*GadgetImageDesc, error)
- func ListGadgetImages(ctx context.Context) ([]*GadgetImageDesc, error)
- func PullGadgetImage(ctx context.Context, image string, authOpts *AuthOptions) (*GadgetImageDesc, error)
- func PushGadgetImage(ctx context.Context, image string, authOpts *AuthOptions) (*GadgetImageDesc, error)
- func TagGadgetImage(ctx context.Context, srcImage, dstImage string) (*GadgetImageDesc, error)
Constants ¶
const ( ArchAmd64 = "amd64" ArchArm64 = "arm64" ArchWasm = "wasm" )
const ( DefaultAuthFile = "/var/lib/ig/config.json" PullImageAlways = "always" PullImageMissing = "missing" PullImageNever = "never" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthOptions ¶
type BuildGadgetImageOpts ¶
type BuildGadgetImageOpts struct { // Source path of the eBPF program. Currently it's not used for compilation purposes EBPFSourcePath string // List of eBPF objects to include in the image. The key is the architecture and the value // is the path to the eBPF object. EBPFObjectPaths map[string]string // Path to the metadata file. MetadataPath string // Optional path to the Wasm file WasmObjectPath string // If true, the metadata is updated to follow changes in the eBPF objects. UpdateMetadata bool // If true, the metadata is validated before creating the image. ValidateMetadata bool }
type GadgetImage ¶
GadgetImage is the representation of a gadget packaged in an OCI image.
func GetGadgetImage ¶
func GetGadgetImage(ctx context.Context, image string, authOpts *AuthOptions, pullPolicy string) (*GadgetImage, error)
GetGadgetImage pulls the gadget image according to the pull policy and returns a GadgetImage structure representing it.
type GadgetImageDesc ¶
type GadgetImageDesc struct { Repository string `column:"repository"` Tag string `column:"tag"` Digest string `column:"digest,width:12,fixed"` }
GadgetImageDesc is the description of a gadget image.
func BuildGadgetImage ¶
func BuildGadgetImage(ctx context.Context, opts *BuildGadgetImageOpts, image string) (*GadgetImageDesc, error)
BuildGadgetImage creates an OCI image with the objects provided in opts. The image parameter in the "name:tag" format is used to name and tag the created image. If it's empty the image is not named.
func ListGadgetImages ¶
func ListGadgetImages(ctx context.Context) ([]*GadgetImageDesc, error)
ListGadgetImages lists all the gadget images.
func PullGadgetImage ¶
func PullGadgetImage(ctx context.Context, image string, authOpts *AuthOptions) (*GadgetImageDesc, error)
PullGadgetImage pulls the gadget image into the local oci store and returns its descriptor.
func PushGadgetImage ¶
func PushGadgetImage(ctx context.Context, image string, authOpts *AuthOptions) (*GadgetImageDesc, error)
PushGadgetImage pushes the gadget image and returns its descriptor.
func TagGadgetImage ¶
func TagGadgetImage(ctx context.Context, srcImage, dstImage string) (*GadgetImageDesc, error)
TagGadgetImage tags the src image with the dst image.
func (*GadgetImageDesc) String ¶
func (d *GadgetImageDesc) String() string