Documentation ¶
Index ¶
- Constants
- func ConfigDir() string
- func Connect(network, path string) (net.Conn, error)
- func ConnectAndWait(network, path string) (net.Conn, error)
- func ConvertImageToQCOW2(imagePath string) error
- func CopyFile(src, dst string) *exec.Cmd
- func CopyLocalFile(dst, src string) error
- func ExtendMap(m map[string]string, additional map[string]string)
- func FileInfoHeader() string
- func GenerateMAC() (net.HardwareAddr, error)
- func HomePath() string
- func ID() string
- func IsDirectIOSupported(path string) bool
- func IsRemoteImage(repo_url, name string) (bool, error)
- func ListImagesRemote(repo_url string, search string) error
- func NeedsUpdate(localPkg, remotePkg *core.Package, compareCreated bool) (bool, error)
- func ParseEnvironmentList(envList []string) (map[string]string, error)
- func ParseMemSize(memory string) (int64, error)
- func RawTerm() error
- func RemoveOrphanedInstances(verbose bool) error
- func ResetTerm()
- func ResizeImage(imagePath string, targetSize uint64) error
- func SearchInstance(name string) (instanceName, instancePlatform string)
- func SetCmdLine(imagePath string, cmdLine string) error
- func SetPartition(image string, partition int, start uint64, size uint64) error
- func StringInSlice(a string, list []string) bool
- func VersionStringToInt(version string) (int, error)
- func WriteRofsImage(imagePath string, paths map[string]string, sourceRootPath string, verbose bool) error
- type Asset
- type CapstanSettings
- type Contents
- type FileInfo
- type FilesInfo
- type ImageInfo
- type NbdFile
- func (file *NbdFile) Close() error
- func (file *NbdFile) Wait()
- func (file *NbdFile) Write(offset uint64, data []byte) error
- func (file *NbdFile) WriteByte(offset uint64, b byte) error
- func (file *NbdFile) WriteInt(offset uint64, i uint32) error
- func (file *NbdFile) WriteShort(offset uint64, s uint16) error
- type NbdReply
- type NbdRequest
- type NbdSession
- func (session *NbdSession) Disconnect() error
- func (session *NbdSession) Flush() error
- func (session *NbdSession) Handshake() error
- func (session *NbdSession) NewStyleHandshake(magic uint64) error
- func (session *NbdSession) OldStyleHandshake(magic uint64) error
- func (session *NbdSession) Read(offset uint64, length uint32) ([]byte, error)
- func (session *NbdSession) Recv() ([]byte, error)
- func (session *NbdSession) Write(from uint64, data []byte) error
- type Query
- type Release
- type RemotePackageDownloadInfo
- type Repo
- func (r *Repo) CreateRofsImage(loaderImage string, imageName string, rofsImagePath string) error
- func (r *Repo) DefaultImage() string
- func (r *Repo) DownloadImage(hypervisor string, path string) error
- func (r *Repo) DownloadLoaderImage(loaderImageName string, hypervisor string) (string, error)
- func (r *Repo) DownloadPackageRemote(packageName string) error
- func (r *Repo) DownloadZfsBuilderImage(hypervisor string) (string, error)
- func (r *Repo) GetPackage(pkgname string) (io.ReadSeeker, error)
- func (r *Repo) GetPackageDependencies(pkg core.Package, downloadMissing bool) ([]core.Package, error)
- func (r *Repo) GetPackageTarReader(pkgname string) (*tar.Reader, error)
- func (r *Repo) GetVmlinuzLoaderPath() (string, error)
- func (r *Repo) GetZfsBuilderImagePath() (string, error)
- func (r *Repo) ImageCachePath(hypervisor string, image string) string
- func (r *Repo) ImageExists(hypervisor, image string) bool
- func (r *Repo) ImagePath(hypervisor string, image string) string
- func (r *Repo) ImportImage(imageName string, file string, version string, created string, ...) error
- func (r *Repo) ImportPackage(pkg core.Package, packagePath string) error
- func (r *Repo) InitializeZfsImage(loaderImage string, imageName string, imageSize int64) error
- func (r *Repo) ListImages() string
- func (r *Repo) ListPackages() string
- func (r *Repo) ListPackagesRemote(search string) error
- func (r *Repo) LocalPackages(search string) ([]*core.Package, error)
- func (r *Repo) PackageExists(packageName string) bool
- func (r *Repo) PackageInfoRemote(packageName string) *core.Package
- func (r *Repo) PackageManifest(packageName string) string
- func (r *Repo) PackagePath(packageName string) string
- func (r *Repo) PackagesPath() string
- func (r *Repo) PrintRepo()
- func (r *Repo) PullImage(image string) error
- func (r *Repo) RemoveImage(image string) error
- func (r *Repo) RepoPath() string
- type RofsDirectoryEntry
- type RofsFilesystem
- type RofsInode
- type RofsSuperBlock
- type RofsSymlink
Constants ¶
View Source
const ( NBD_REQUEST_MAGIC = 0x25609513 NBD_REPLY_MAGIC = 0x67446698 NBD_OLD_STYLE_HANDSHAKE_MAGIC = 0x00420281861253 NBD_NEW_STYLE_HANDSHAKE_MAGIC = 0x49484156454F5054 )
View Source
const ( NBD_CMD_READ = 0 NBD_CMD_WRITE = 1 NBD_CMD_DISC = 2 NBD_CMD_FLUSH = 3 NBD_CMD_TRIM = 4 )
View Source
const ( NBD_FLAG_HAS_FLAGS = (1 << 0) NBD_FLAG_SEND_FLUSH = (1 << 2) )
View Source
const ( ZfsBuilderImageName = "osv-zfs-builder" LoaderImageName = "osv-loader" VmlinuzLoaderName = "osv-vmlinuz.bin" GitHubRepositoryApiUrl = "https://api.github.com" )
View Source
const ( BLOCK_SIZE = 512 DIR_MODE = 0x4000 REG_MODE = 0x8000 LINK_MODE = 0xA000 )
View Source
const (
DefaultRepositoryUrl = "https://mikelangelo-capstan.s3.amazonaws.com/"
)
View Source
const (
OsvReleasesSuffix = "/repos/cloudius-systems/osv/releases"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertImageToQCOW2 ¶
func CopyLocalFile ¶
func FileInfoHeader ¶
func FileInfoHeader() string
func IsDirectIOSupported ¶
func IsRemoteImage ¶
func ListImagesRemote ¶
func NeedsUpdate ¶
func ParseMemSize ¶
func RemoveOrphanedInstances ¶
RemoveOrphanedInstances removes directories of instances that were not persisted with --persist.
func ResizeImage ¶
func SearchInstance ¶
func SetCmdLine ¶
func StringInSlice ¶
func VersionStringToInt ¶
VersionStringToInt converts 1.2.3 into 1002003 to make it comparable.
Types ¶
type CapstanSettings ¶
type FileInfo ¶
type FileInfo struct { Namespace string Name string Description string Version string Created core.YamlTime `yaml:"created"` Platform string }
func ParseIndexYaml ¶
func RemoteFileInfo ¶
type NbdRequest ¶
func (*NbdRequest) ToWireFormat ¶
func (msg *NbdRequest) ToWireFormat() []byte
type NbdSession ¶
func (*NbdSession) Disconnect ¶
func (session *NbdSession) Disconnect() error
func (*NbdSession) Flush ¶
func (session *NbdSession) Flush() error
func (*NbdSession) Handshake ¶
func (session *NbdSession) Handshake() error
func (*NbdSession) NewStyleHandshake ¶
func (session *NbdSession) NewStyleHandshake(magic uint64) error
func (*NbdSession) OldStyleHandshake ¶
func (session *NbdSession) OldStyleHandshake(magic uint64) error
func (*NbdSession) Read ¶
func (session *NbdSession) Read(offset uint64, length uint32) ([]byte, error)
func (*NbdSession) Recv ¶
func (session *NbdSession) Recv() ([]byte, error)
type RemotePackageDownloadInfo ¶
type RemotePackageDownloadInfo struct {
// contains filtered or unexported fields
}
type Repo ¶
type Repo struct { URL string Path string DisableKvm bool QemuAioType string UseS3 bool ReleaseTag string GithubURL string }
func NewRepoFromCli ¶
func NewRepoFromCli(c *cli.Context) *Repo
func (*Repo) CreateRofsImage ¶
func (*Repo) DefaultImage ¶
func (*Repo) DownloadLoaderImage ¶
func (*Repo) DownloadPackageRemote ¶
func (*Repo) DownloadZfsBuilderImage ¶
func (*Repo) GetPackage ¶
func (r *Repo) GetPackage(pkgname string) (io.ReadSeeker, error)
func (*Repo) GetPackageDependencies ¶
func (*Repo) GetPackageTarReader ¶
GetPackageTarReader returns tar reader for package with given name.
func (*Repo) GetVmlinuzLoaderPath ¶
func (*Repo) GetZfsBuilderImagePath ¶
func (*Repo) ImageExists ¶
func (*Repo) ImportImage ¶
func (*Repo) ImportPackage ¶
func (*Repo) InitializeZfsImage ¶
func (*Repo) ListImages ¶
func (*Repo) ListPackages ¶
func (*Repo) ListPackagesRemote ¶
func (*Repo) PackageExists ¶
PackageExists will check that both package manifest and package file are present in the local package repository.
func (*Repo) PackageManifest ¶
func (*Repo) PackagePath ¶
func (*Repo) PackagesPath ¶
func (*Repo) RemoveImage ¶
type RofsDirectoryEntry ¶
type RofsFilesystem ¶
type RofsFilesystem struct { SuperBlock RofsSuperBlock DirectoryEntries []*RofsDirectoryEntry Symlinks []*RofsSymlink Inodes []*RofsInode DirectoryEntriesByPath map[string][]string CurrentBlock int }
type RofsSuperBlock ¶
type RofsSuperBlock struct { Magic uint64 Version uint64 BlockSize uint64 StructureInfoFirstBlock uint64 StructureInfoBlocksCount uint64 DirectoryEntriesCount uint64 SymlinksCount uint64 InodesCount uint64 }
func ReadRofsSuperBlock ¶
func ReadRofsSuperBlock(imageFile *os.File) (*RofsSuperBlock, error)
type RofsSymlink ¶
type RofsSymlink struct {
Filename string
}
Click to show internal directories.
Click to hide internal directories.