Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildCmd = &cobra.Command{ Use: "build -o <target> <source>", Short: "Build a FILEgrain image", RunE: func(cmd *cobra.Command, args []string) error { if buildCmdConfig.target == "" { return errors.New("must specify target output (-o)") } if len(args) != 1 { return errors.New("must specify source") } source := args[0] b, err := newBuilder(buildCmdConfig.sourceType, source) if err != nil { return err } if err := b.Build(buildCmdConfig.target, buildCmdConfig.refName); err != nil { return err } logrus.Info("Done") return nil }, } )
View Source
var ( MainCmd = &cobra.Command{ Use: "filegrain <command>", Short: "FILEgrain: transport-agnostic, fine-grained content-addressable container image layout", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { if mainCmdConfig.debug { logrus.SetLevel(logrus.DebugLevel) logrus.Debug("running in debug mode") } return nil }, } )
View Source
var ( MountCmd = &cobra.Command{ Use: "mount <image> <mountpoint>", Short: "Mount with lazy fs", RunE: func(cmd *cobra.Command, args []string) error { if len(args) != 2 { return errors.New("must specify image and mountpoint") } img, mountpoint := args[0], args[1] cachePath, err := ioutil.TempDir("", "filegrain-blobcache") if err != nil { return err } logrus.Infof("Blob cache (ephemeral): %s", cachePath) defer os.RemoveAll(cachePath) pvller, err := puller.NewBlobCacher(cachePath, puller.NewLocalPuller()) if err != nil { return err } opts := lazyfs.Options{ Mountpoint: mountpoint, Puller: pvller, Image: img, RefName: mountCmdConfig.refName, } return serve(opts) }, } )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.