summaryrefslogtreecommitdiff
path: root/libnetwork/ipams/builtin/builtin_unix.go
blob: 8cf37499dc08b70a671b7d5ce2de21c6c8f3ea05 (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
//go:build linux || freebsd || darwin
// +build linux freebsd darwin

package builtin

import (
	"errors"

	"github.com/docker/docker/libnetwork/ipamapi"
)

// Init registers the built-in ipam service 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 service with libnetwork.
func Register(r ipamapi.Registerer) error {
	return registerBuiltin(r)
}