...

Source file src/github.com/Microsoft/hcsshim/internal/oci/util.go

Documentation: github.com/Microsoft/hcsshim/internal/oci

     1  package oci
     2  
     3  import (
     4  	"github.com/Microsoft/hcsshim/pkg/annotations"
     5  	"github.com/opencontainers/runtime-spec/specs-go"
     6  )
     7  
     8  // IsLCOW checks if `s` is a LCOW config.
     9  func IsLCOW(s *specs.Spec) bool {
    10  	return s.Linux != nil
    11  }
    12  
    13  // IsWCOW checks if `s` is a WCOW config (argon OR isolated).
    14  func IsWCOW(s *specs.Spec) bool {
    15  	return s.Linux == nil && s.Windows != nil
    16  }
    17  
    18  // IsIsolated checks if `s` is hypervisor isolated.
    19  func IsIsolated(s *specs.Spec) bool {
    20  	return IsLCOW(s) || (s.Windows != nil && s.Windows.HyperV != nil)
    21  }
    22  
    23  // IsJobContainer checks if `s` is asking for a Windows job container.
    24  func IsJobContainer(s *specs.Spec) bool {
    25  	return s.Annotations[annotations.HostProcessContainer] == "true"
    26  }
    27  

View as plain text