func NewStore()

in pkg/containerd/store.go [81:96]


func NewStore(sock, ns string, hosts []string) (Store, error) {
	if sock == "" {
		return nil, fmt.Errorf("containerd socket path cannot be empty")
	}

	if ns == "" {
		return nil, fmt.Errorf("containerd namespace cannot be empty")
	}

	client, err := containerd.New(sock, containerd.WithDefaultNamespace(ns))
	if err != nil {
		return nil, fmt.Errorf("could not create containerd client: %w", err)
	}

	return newStore(hosts, client)
}