func GetContainerdUtil() (ContainerdItf, error) {
	once.Do(func() {
		globalContainerdUtil = &ContainerdUtil{
			queryTimeout:      config.Datadog.GetDuration("cri_query_timeout") * time.Second,
			connectionTimeout: config.Datadog.GetDuration("cri_connection_timeout") * time.Second,
			socketPath:        config.Datadog.GetString("cri_socket_path"),
			namespace:         config.Datadog.GetString("containerd_namespace"),
		}
		if globalContainerdUtil.socketPath == "" {
			log.Info("No socket path was specified, defaulting to /var/run/containerd/containerd.sock")
			globalContainerdUtil.socketPath = containerdDefaultSocketPath
		}
		// Initialize the client in the connect method
		globalContainerdUtil.initRetry.SetupRetrier(&retry.Config{ //nolint:errcheck
			Name:              "containerdutil",
			AttemptMethod:     globalContainerdUtil.connect,
			Strategy:          retry.Backoff,
			InitialRetryDelay: 1 * time.Second,
			MaxRetryDelay:     5 * time.Minute,
		})
	})
	if err := globalContainerdUtil.initRetry.TriggerRetry(); err != nil {
		log.Errorf("Containerd init error: %s", err.Error())
		return nil, err
	}
	return globalContainerdUtil, nil
}
// GetContainerdUtil creates the Containerd util containing the Containerd client and implementing the ContainerdItf
// Errors are handled in the retrier.
GetContainerdUtil creates the Containerd util containing the Containerd client and implementing the ContainerdItf
Errors are handled in the retrier.
// GetContainerdUtil creates the Containerd util containing the Containerd client and implementing the ContainerdItf // Errors are handled in the retrier .
func GetContainerdUtil() (ContainerdItf, error) {
	once.Do(func() {
		globalContainerdUtil = &ContainerdUtil{
			queryTimeout:      config.Datadog.GetDuration("cri_query_timeout") * time.Second,
			connectionTimeout: config.Datadog.GetDuration("cri_connection_timeout") * time.Second,
			socketPath:        config.Datadog.GetString("cri_socket_path"),
			namespace:         config.Datadog.GetString("containerd_namespace"),
		}
		if globalContainerdUtil.socketPath == "" {
			log.Info("No socket path was specified, defaulting to /var/run/containerd/containerd.sock")
			globalContainerdUtil.socketPath = containerdDefaultSocketPath
		}
		globalContainerdUtil.initRetry.SetupRetrier(&retry.Config{ 
			Name:              "containerdutil",
			AttemptMethod:     globalContainerdUtil.connect,
			Strategy:          retry.Backoff,
			InitialRetryDelay: 1 * time.Second,
			MaxRetryDelay:     5 * time.Minute,
		})
	})
	if err := globalContainerdUtil.initRetry.TriggerRetry(); err != nil {
		log.Errorf("Containerd init error: %s", err.Error())
		return nil, err
	}
	return globalContainerdUtil, nil
}
func GetContainerdUtil ( ) ( ContainerdItf , error ) { once . Do ( func ( ) { globalContainerdUtil = & ContainerdUtil { queryTimeout : config . Datadog . GetDuration ( " " ) * time . Second , connectionTimeout : config . Datadog . GetDuration ( " " ) * time . Second , socketPath : config . Datadog . GetString ( " " ) , namespace : config . Datadog . GetString ( " " ) , } if globalContainerdUtil . socketPath == " " { log . Info ( " " ) globalContainerdUtil . socketPath = containerdDefaultSocketPath } globalContainerdUtil . initRetry . SetupRetrier ( & retry . Config { Name : " " , AttemptMethod : globalContainerdUtil . connect , Strategy : retry . Backoff , InitialRetryDelay : 1 * time . Second , MaxRetryDelay : 5 * time . Minute , } ) } ) if err := globalContainerdUtil . initRetry . TriggerRetry ( ) ; err != nil { log . Errorf ( " " , err . Error ( ) ) return nil , err } return globalContainerdUtil , nil }
GetContainerdUtil creates the Containerd util containing the Containerd client and implementing the ContainerdItf
Errors are handled in the retrier.
GetContainerdUtil creates the Containerd util containing the Containerd client and implementing the ContainerdItf Errors are handled in the retrier .
// Initialize the client in the connect method //nolint:errcheck