Documentation ¶
Index ¶
- Variables
- type Session
- func (session *Session) Clean() error
- func (session *Session) GetAllStaged() ([]StagedImageNamed, error)
- func (session *Session) GetCurrentBootedImage() (StagedImageNamed, error)
- func (session *Session) IsStaged(imageRef reference.ImageRef) (bool, error)
- func (session *Session) PrintGrubMenuEntry(stagedImage StagedImageNamed, output io.Writer) error
- func (session *Session) Remove(imageRef reference.ImageRef) error
- func (session *Session) RunAllHooks() error
- func (session *Session) RunHooksForImage(imageRef reference.ImageRef) error
- func (session *Session) SyncBootloader() error
- func (session *Session) Tag(sourceImageRef, destinationImageRef reference.ImageRef, force bool) error
- func (session *Session) UploadDirectoryWithMove(imageDir string, imageRef reference.ImageRef, force bool) error
- type StagedImage
- type StagedImageNamed
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultStagingDirectory The location where staging happens DefaultStagingDirectory = "/var/lib/darch/stage" // DefaultStagingDirectoryImages The location to the staged images live. DefaultStagingDirectoryImages = path.Join(DefaultStagingDirectory, "live") // DefaultStagingDirectoryTmp Temp directory for staging stuff (extracting images, running hooks, etc) DefaultStagingDirectoryTmp = path.Join(DefaultStagingDirectory, "tmp") // DefaultStagingImagesFile File where our staged images information lives. DefaultStagingImagesFile = path.Join(DefaultStagingDirectory, "images.json") )
var (
// DefaultGrubConfigPath The location where the grub.cfg for darch is stored.
DefaultGrubConfigPath = "/etc/darch/grub.cfg"
)
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session A staging session.
func (*Session) Clean ¶
Clean goes through all the images in the live directory and deletes them if there isn't a references in images.json.
func (*Session) GetAllStaged ¶
func (session *Session) GetAllStaged() ([]StagedImageNamed, error)
GetAllStaged Get all the staged items in the given directory.
func (*Session) GetCurrentBootedImage ¶
func (session *Session) GetCurrentBootedImage() (StagedImageNamed, error)
GetCurrentBootedImage Looks at /proc/cmdline to try and determine what image is currently booted. Returns reference.ErrDoesNotExist if entry isn't present.
func (*Session) PrintGrubMenuEntry ¶
func (session *Session) PrintGrubMenuEntry(stagedImage StagedImageNamed, output io.Writer) error
PrintGrubMenuEntry Print the grub entry for the given staged image.
func (*Session) RunAllHooks ¶
RunAllHooks Run the hooks on every image.
func (*Session) RunHooksForImage ¶
RunHooksForImage Run hooks for a single image.
func (*Session) SyncBootloader ¶
SyncBootloader Updates the /etc/darch/grub.cfg to represent the current stage.
type StagedImage ¶
StagedImage A staged image
type StagedImageNamed ¶
type StagedImageNamed struct { StagedImage Ref reference.ImageRef ID string }
StagedImageNamed A StagedImage with a name and tag