github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/libnetwork/osl/sandbox_freebsd.go (about)

     1  package osl
     2  
     3  import "testing"
     4  
     5  // GenerateKey generates a sandbox key based on the passed
     6  // container id.
     7  func GenerateKey(containerID string) string {
     8  	maxLen := 12
     9  	if len(containerID) < maxLen {
    10  		maxLen = len(containerID)
    11  	}
    12  
    13  	return containerID[:maxLen]
    14  }
    15  
    16  // NewSandbox provides a new sandbox instance created in an os specific way
    17  // provided a key which uniquely identifies the sandbox
    18  func NewSandbox(key string, osCreate, isRestore bool) (Sandbox, error) {
    19  	return nil, nil
    20  }
    21  
    22  // GetSandboxForExternalKey returns sandbox object for the supplied path
    23  func GetSandboxForExternalKey(path string, key string) (Sandbox, error) {
    24  	return nil, nil
    25  }
    26  
    27  // GC triggers garbage collection of namespace path right away
    28  // and waits for it.
    29  func GC() {
    30  }
    31  
    32  // InitOSContext initializes OS context while configuring network resources
    33  func InitOSContext() func() {
    34  	return func() {}
    35  }
    36  
    37  // SetupTestOSContext sets up a separate test  OS context in which tests will be executed.
    38  func SetupTestOSContext(t *testing.T) func() {
    39  	return func() {}
    40  }
    41  
    42  // SetBasePath sets the base url prefix for the ns path
    43  func SetBasePath(path string) {
    44  }