MCPcopy Create free account
hub / github.com/eth-easl/dirigent / FetchImage

Function FetchImage

internal/worker_node/sandbox/containerd/iface.go:66–73  ·  view source on GitHub ↗
(ctx context.Context, client *containerd.Client, imageURL string)

Source from the content-addressed store, hash-verified

64}
65
66func FetchImage(ctx context.Context, client *containerd.Client, imageURL string) (containerd.Image, error) {
67 image, err := client.Pull(ctx, imageURL, containerd.WithPullUnpack)
68 if err != nil {
69 return nil, err
70 }
71
72 return image, nil
73}
74
75func CreateContainer(ctx context.Context, client *containerd.Client, image containerd.Image) (containerd.Container, error, time.Duration) {
76 start := time.Now()

Callers 4

GetImageMethod · 0.85
TestCreateAContainerFunction · 0.85
TestParallelCreationFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestCreateAContainerFunction · 0.68
TestParallelCreationFunction · 0.68