github.com/rawahars/moby@v24.0.4+incompatible/libnetwork/ipams/builtin/builtin_unix.go (about)

     1  //go:build linux || freebsd || darwin
     2  // +build linux freebsd darwin
     3  
     4  package builtin
     5  
     6  import (
     7  	"errors"
     8  
     9  	"github.com/docker/docker/libnetwork/ipamapi"
    10  )
    11  
    12  // Init registers the built-in ipam service with libnetwork
    13  //
    14  // Deprecated: use [Register].
    15  func Init(ic ipamapi.Callback, l, g interface{}) error {
    16  	if l != nil {
    17  		return errors.New("non-nil local datastore passed to built-in ipam init")
    18  	}
    19  
    20  	if g != nil {
    21  		return errors.New("non-nil global datastore passed to built-in ipam init")
    22  	}
    23  
    24  	return Register(ic)
    25  }
    26  
    27  // Register registers the built-in ipam service with libnetwork.
    28  func Register(r ipamapi.Registerer) error {
    29  	return registerBuiltin(r)
    30  }