image

package
v0.0.0-...-2b12023 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SWR    = "swr"
	DOCKER = "docker"
)

Variables

View Source
var (
	DEFAULT_TIMEOUT       = 10
	DOCKER_CONTENT_DIGEST = "Docker-Content-Digest"
	MANIFEST_DIGEST       = "manifest.digest"

	ROOTFS_DIR = "rootfs"
)

Functions

This section is empty.

Types

type DockerManifestLayers

type DockerManifestLayers struct {
	BlobSum string `json:"blobSum"`
}

type DockerManifestResponse

type DockerManifestResponse struct {
	Layers []DockerManifestLayers `json:"fsLayers"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewImageHandler

func NewImageHandler(username, password, baseFolder, metaEndpoint string, worker int64, syncInterval int64, lxdClient *lxd.Client, logger *zap.Logger) (*Handler, error)

func (*Handler) Close

func (h *Handler) Close()

func (*Handler) FakeLoop

func (h *Handler) FakeLoop()

func (*Handler) GetImagePuller

func (h *Handler) GetImagePuller(detail ImageDetail) (*Puller, error)

func (*Handler) StartLoop

func (h *Handler) StartLoop()

type ImageDetail

type ImageDetail struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type LXDImageResponse

type LXDImageResponse struct {
	Images []ImageDetail `json:"images"`
}

type Puller

type Puller struct {
	// contains filtered or unexported fields
}

func NewDockerIOV2ImagePuller

func NewDockerIOV2ImagePuller(username, password, baseFolder, imageFullName string, logger *zap.Logger) (*Puller, error)

func NewSWRV2ImagePuller

func NewSWRV2ImagePuller(username, password, baseFolder, region, imageFullName string, logger *zap.Logger) (*Puller, error)

func (*Puller) Cancel

func (p *Puller) Cancel()

func (*Puller) DownloadImage

func (p *Puller) DownloadImage(ctx context.Context, finishedCh chan bool)

type RegistryType

type RegistryType int32
const (
	SWRRegistry RegistryType = iota
	DockerRegistry
)

type SWRManifestLayers

type SWRManifestLayers struct {
	MediaType string `json:"mediaType"`
	Type      string `json:"type"`
	Digest    string `json:"digest"`
}

type SWRManifestResponse

type SWRManifestResponse struct {
	Layers []SWRManifestLayers `json:"layers"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL