Documentation
¶
Index ¶
- type CloseFunc
- type CloudStorage
- func (c *CloudStorage) CloseClient() error
- func (c *CloudStorage) Compression() artifact.Compression
- func (c *CloudStorage) InitClient(ctx context.Context) error
- func (c *CloudStorage) NewClient(ctx context.Context) (*storage.Client, error)
- func (c *CloudStorage) OpenImage(ctx context.Context, image artifact.ImageID) (io.ReadCloser, int64, error)
- type HTTP
- type OneOf
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudStorage ¶
type CloudStorage struct { Token *oauth2.Token Artifact *artifact.GSArtifact // contains filtered or unexported fields }
CloudStorage backed payload.
func (*CloudStorage) CloseClient ¶
func (c *CloudStorage) CloseClient() error
CloseClient implements Payload.
func (*CloudStorage) Compression ¶
func (c *CloudStorage) Compression() artifact.Compression
Compression implements Payload.
func (*CloudStorage) InitClient ¶
func (c *CloudStorage) InitClient(ctx context.Context) error
InitClient implements Payload.
type HTTP ¶
type HTTP struct { // URL of zstd-compressed images accessible from dut-agent. Kernel string `json:"kernel"` Rootfs string `json:"rootfs"` Stateful string `json:"stateful"` }
HTTP backed payload.
func (*HTTP) Compression ¶
func (h *HTTP) Compression() artifact.Compression
Compression implements Payload.
func (*HTTP) InitClient ¶
InitClient implements Payload.
type OneOf ¶
type OneOf struct { CloudStorage *CloudStorage `json:"cloud_storage"` HTTP *HTTP `json:"http"` }
OneOf the Payloads for dut-agent to flash. One of the payload types must be set.
type Payload ¶
type Payload interface { // InitClient initializes the client associated with this Provider. InitClient(ctx context.Context) error // CloseClient closes the client associated with this Provider. CloseClient() error // OpenImage opens the image and returns the reader and the size of the compressed image. OpenImage(ctx context.Context, image artifact.ImageID) (r io.ReadCloser, size int64, err error) // Compression returns the compression kind of the images. Compression() artifact.Compression }
Payload is an abstraction over a set of Artifacts to flash to the device.
Click to show internal directories.
Click to hide internal directories.