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