Documentation ¶
Index ¶
- Constants
- func DeleteGadgetImage(ctx context.Context, image string) error
- func EnsureImage(ctx context.Context, image string, imgOpts *ImageOptions, pullPolicy string) error
- func ExportGadgetImages(ctx context.Context, dstFile string, images ...string) error
- func GetContentFromDescriptor(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error)
- func GetManifestForHost(ctx context.Context, image string) (*ocispec.Manifest, error)
- func ImportGadgetImages(ctx context.Context, srcFile string) ([]string, error)
- type AuthOptions
- type BuildGadgetImageOpts
- 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)
- type ImageOptions
- type ObjectPath
- type VerifyOptions
Constants ¶
View Source
const ( ArchAmd64 = "amd64" ArchArm64 = "arm64" ArchWasm = "wasm" )
View Source
const ( DefaultAuthFile = "/var/lib/ig/config.json" PullImageAlways = "always" PullImageMissing = "missing" PullImageNever = "never" )
Variables ¶
This section is empty.
Functions ¶
func DeleteGadgetImage ¶ added in v0.24.0
DeleteGadgetImage removes the given image.
func EnsureImage ¶ added in v0.26.0
EnsureImage ensures the image is present in the local store
func ExportGadgetImages ¶ added in v0.28.0
func GetContentFromDescriptor ¶ added in v0.26.0
func GetContentFromDescriptor(ctx context.Context, desc ocispec.Descriptor) (io.ReadCloser, error)
func GetManifestForHost ¶ added in v0.26.0
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 // are the paths to the objects. ObjectPaths map[string]*ObjectPath // Path to the metadata file. MetadataPath 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 // Date and time on which the image is built (date-time string as defined by RFC 3339). CreatedDate string }
type GadgetImageDesc ¶
type GadgetImageDesc struct { Repository string `column:"repository"` Tag string `column:"tag"` Digest string `column:"digest,width:12,fixed"` Created string `column:"created"` }
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
type ImageOptions ¶ added in v0.28.0
type ImageOptions struct { AuthOptions VerifyOptions }
type ObjectPath ¶ added in v0.28.0
type VerifyOptions ¶ added in v0.28.0
Click to show internal directories.
Click to hide internal directories.