Documentation ¶
Index ¶
- type Archive
- type ArtifactsBuild
- func (b *ArtifactsBuild) GetBootserver(ctx context.Context) (string, error)
- func (b *ArtifactsBuild) GetBuildImages(ctx context.Context) (string, error)
- func (b *ArtifactsBuild) GetPackageRepository(ctx context.Context, fetchMode BlobFetchMode) (*packages.Repository, error)
- func (b *ArtifactsBuild) GetPaver(ctx context.Context) (paver.Paver, error)
- func (b *ArtifactsBuild) GetPaverDir(ctx context.Context) (string, error)
- func (b *ArtifactsBuild) GetSshPublicKey() ssh.PublicKey
- func (b *ArtifactsBuild) GetVbmetaPath(ctx context.Context) (string, error)
- func (b *ArtifactsBuild) Pave(ctx context.Context, deviceName string) error
- func (b *ArtifactsBuild) String() string
- type BlobFetchMode
- type Build
- type Builder
- type FuchsiaDirBuild
- func (b *FuchsiaDirBuild) GetBootserver(ctx context.Context) (string, error)
- func (b *FuchsiaDirBuild) GetPackageRepository(ctx context.Context, blobFetchMode BlobFetchMode) (*packages.Repository, error)
- func (b *FuchsiaDirBuild) GetPaver(ctx context.Context) (paver.Paver, error)
- func (b *FuchsiaDirBuild) GetPaverDir(ctx context.Context) (string, error)
- func (b *FuchsiaDirBuild) GetSshPublicKey() ssh.PublicKey
- func (b *FuchsiaDirBuild) GetVbmetaPath(ctx context.Context) (string, error)
- func (b *FuchsiaDirBuild) String() string
- type OmahaBuild
- func (b *OmahaBuild) GetBootserver(ctx context.Context) (string, error)
- func (b *OmahaBuild) GetPackageRepository(ctx context.Context, blobFetchMode BlobFetchMode) (*packages.Repository, error)
- func (b *OmahaBuild) GetPaver(ctx context.Context) (paver.Paver, error)
- func (b *OmahaBuild) GetPaverDir(ctx context.Context) (string, error)
- func (b *OmahaBuild) GetSshPublicKey() ssh.PublicKey
- func (b *OmahaBuild) GetVbmetaPath(ctx context.Context) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive allows interacting with the build artifact repository.
func NewArchive ¶
NewArchive creates a new Archive.
func (*Archive) GetBuildByID ¶
func (a *Archive) GetBuildByID( ctx context.Context, id string, dir string, publicKey ssh.PublicKey, ) (*ArtifactsBuild, error)
GetBuildByID returns an ArtifactsBuild for fetching artifacts for the build with the given id.
func (*Archive) GetBuilder ¶
GetBuilder returns a Builder with the given name and Archive.
type ArtifactsBuild ¶
type ArtifactsBuild struct {
// contains filtered or unexported fields
}
ArtifactsBuild represents the build artifacts for a specific build.
func (*ArtifactsBuild) GetBootserver ¶
func (b *ArtifactsBuild) GetBootserver(ctx context.Context) (string, error)
func (*ArtifactsBuild) GetBuildImages ¶
func (b *ArtifactsBuild) GetBuildImages(ctx context.Context) (string, error)
GetBuildImages downloads the build images for a specific build id. Returns a path to the directory of the downloaded images or an error if it fails to download.
func (*ArtifactsBuild) GetPackageRepository ¶
func (b *ArtifactsBuild) GetPackageRepository(ctx context.Context, fetchMode BlobFetchMode) (*packages.Repository, error)
GetPackageRepository returns a Repository for this build. It tries to download a package when all the artifacts are stored in individual files, which is how modern builds publish their build artifacts.
func (*ArtifactsBuild) GetPaverDir ¶
func (b *ArtifactsBuild) GetPaverDir(ctx context.Context) (string, error)
func (*ArtifactsBuild) GetSshPublicKey ¶
func (b *ArtifactsBuild) GetSshPublicKey() ssh.PublicKey
func (*ArtifactsBuild) GetVbmetaPath ¶
func (b *ArtifactsBuild) GetVbmetaPath(ctx context.Context) (string, error)
func (*ArtifactsBuild) Pave ¶
func (b *ArtifactsBuild) Pave(ctx context.Context, deviceName string) error
func (*ArtifactsBuild) String ¶
func (b *ArtifactsBuild) String() string
type BlobFetchMode ¶
type BlobFetchMode int
const ( // PrefetchBlobs will download all the blobs from a build when `GetPackageRepository()` is called. PrefetchBlobs BlobFetchMode = iota // LazilyFetchBlobs will only download blobs when they are accessed. LazilyFetchBlobs )
type Build ¶
type Build interface { // GetBootserver returns the path to the bootserver used for paving. GetBootserver(ctx context.Context) (string, error) // GetPackageRepository returns a Repository for this build. GetPackageRepository(ctx context.Context, blobFetchMode BlobFetchMode) (*packages.Repository, error) // GetPaverDir downloads and returns the directory containing the images // and image manifest. GetPaverDir(ctx context.Context) (string, error) // GetPaver downloads and returns a paver for the build. GetPaver(ctx context.Context) (paver.Paver, error) // GetSshPublicKey returns the SSH public key used by this build's paver. GetSshPublicKey() ssh.PublicKey // GetVbmetaPath downloads and returns a path to the zircon-a vbmeta image. GetVbmetaPath(ctx context.Context) (string, error) }
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder allows fetching build information from a specific builder.
func (*Builder) GetLatestBuild ¶
func (b *Builder) GetLatestBuild(ctx context.Context, dir string, publicKey ssh.PublicKey) (*ArtifactsBuild, error)
GetLatestBuild looks up the latest build for a given builder.
func (*Builder) GetLatestBuildID ¶
LookupBuildID looks up the latest build id for a given builder.
type FuchsiaDirBuild ¶
type FuchsiaDirBuild struct {
// contains filtered or unexported fields
}
func NewFuchsiaDirBuild ¶
func NewFuchsiaDirBuild(dir string, publicKey ssh.PublicKey) *FuchsiaDirBuild
func (*FuchsiaDirBuild) GetBootserver ¶
func (b *FuchsiaDirBuild) GetBootserver(ctx context.Context) (string, error)
func (*FuchsiaDirBuild) GetPackageRepository ¶
func (b *FuchsiaDirBuild) GetPackageRepository(ctx context.Context, blobFetchMode BlobFetchMode) (*packages.Repository, error)
func (*FuchsiaDirBuild) GetPaverDir ¶
func (b *FuchsiaDirBuild) GetPaverDir(ctx context.Context) (string, error)
func (*FuchsiaDirBuild) GetSshPublicKey ¶
func (b *FuchsiaDirBuild) GetSshPublicKey() ssh.PublicKey
func (*FuchsiaDirBuild) GetVbmetaPath ¶
func (b *FuchsiaDirBuild) GetVbmetaPath(ctx context.Context) (string, error)
func (*FuchsiaDirBuild) String ¶
func (b *FuchsiaDirBuild) String() string
type OmahaBuild ¶
type OmahaBuild struct {
// contains filtered or unexported fields
}
func NewOmahaBuild ¶
func (*OmahaBuild) GetBootserver ¶
func (b *OmahaBuild) GetBootserver(ctx context.Context) (string, error)
func (*OmahaBuild) GetPackageRepository ¶
func (b *OmahaBuild) GetPackageRepository(ctx context.Context, blobFetchMode BlobFetchMode) (*packages.Repository, error)
GetPackageRepository returns a Repository for this build.
func (*OmahaBuild) GetPaverDir ¶
func (b *OmahaBuild) GetPaverDir(ctx context.Context) (string, error)
func (*OmahaBuild) GetSshPublicKey ¶
func (b *OmahaBuild) GetSshPublicKey() ssh.PublicKey
func (*OmahaBuild) GetVbmetaPath ¶
func (b *OmahaBuild) GetVbmetaPath(ctx context.Context) (string, error)