...

Source file src/github.com/Microsoft/hcsshim/internal/hns/hnsglobals.go

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

     1  //go:build windows
     2  
     3  package hns
     4  
     5  type HNSGlobals struct {
     6  	Version HNSVersion `json:"Version"`
     7  }
     8  
     9  type HNSVersion struct {
    10  	Major int `json:"Major"`
    11  	Minor int `json:"Minor"`
    12  }
    13  
    14  var (
    15  	HNSVersion1803 = HNSVersion{Major: 7, Minor: 2}
    16  )
    17  
    18  func GetHNSGlobals() (*HNSGlobals, error) {
    19  	var version HNSVersion
    20  	err := hnsCall("GET", "/globals/version", "", &version)
    21  	if err != nil {
    22  		return nil, err
    23  	}
    24  
    25  	globals := &HNSGlobals{
    26  		Version: version,
    27  	}
    28  
    29  	return globals, nil
    30  }
    31  

View as plain text