github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/mergeCode/libnetwork/osl/sandbox_solaris.go (about)

     1  package osl
     2  
     3  // NewSandbox provides a new sandbox instance created in an os specific way
     4  // provided a key which uniquely identifies the sandbox
     5  func NewSandbox(key string, osCreate, isRestore bool) (Sandbox, error) {
     6  	return nil, nil
     7  }
     8  
     9  // GenerateKey generates a sandbox key based on the passed
    10  // container id.
    11  func GenerateKey(containerID string) string {
    12  	maxLen := 12
    13  
    14  	if len(containerID) < maxLen {
    15  		maxLen = len(containerID)
    16  	}
    17  
    18  	return containerID[:maxLen]
    19  }
    20  
    21  // InitOSContext initializes OS context while configuring network resources
    22  func InitOSContext() func() {
    23  	return func() {}
    24  }