You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sockets.go
    path of file: ./repos/tracee/pkg/containers/runtime
    
    the code of the file until where you have to start completion: package runtime

import (
	"os"

	"github.com/aquasecurity/tracee/pkg/errfmt"
)

// Sockets represent existing container runtime connections
type Sockets struct {
	sockets map[RuntimeId]string
}

// Register attempts to associate a file path with a container runtime, if the path doesn't exist re
    
func Autodiscover(onRegisterFail func(err error, runtime RuntimeId, socket string)) Sockets {
	register := func(sockets *Sockets, runtime RuntimeId, socket string) {
		err := sockets.Register(runtime, socket)
		if err != nil {
			onRegisterFail(err, runtime, socket)
		}
	}
	sockets := Sockets{}
	const (
		defaultContainerd = "/var/run/containerd/containerd.sock"
		defaultDocker     = "/var/run/docker.sock"
		defaultCrio       = "/var/run/crio/crio.sock"
		defaultPodman     = "/var/run/podman/podman.sock"
	)

	register(&sockets, Containerd, defaultContainerd)
	register(&sockets, Docker, defaultDocker)
	register(&sockets, Crio, defaultCrio)
	register(&sockets, Podman, defaultPodman)

	return sockets
}