Browse code

daemon: remove some deprecated and unused code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/11/11 17:05:41
Showing 4 changed files
... ...
@@ -86,13 +86,6 @@ func (daemon *Daemon) load(id string) (*container.Container, error) {
86 86
 	return ctr, nil
87 87
 }
88 88
 
89
-// Register makes a container object usable by the daemon as <container.ID>
90
-//
91
-// Deprecated: this function is unused and will be removed in the next release.
92
-func (daemon *Daemon) Register(c *container.Container) error {
93
-	return daemon.register(context.TODO(), c)
94
-}
95
-
96 89
 // register makes a container object usable by the daemon as [container.Container.ID].
97 90
 func (daemon *Daemon) register(ctx context.Context, c *container.Container) error {
98 91
 	// Attach to stdout and stderr
... ...
@@ -18,7 +18,6 @@ import (
18 18
 	"github.com/docker/distribution"
19 19
 	"github.com/moby/go-archive"
20 20
 	"github.com/opencontainers/go-digest"
21
-	"github.com/opencontainers/image-spec/identity"
22 21
 )
23 22
 
24 23
 var (
... ...
@@ -180,13 +179,6 @@ type DescribableStore interface {
180 180
 	RegisterWithDescriptor(io.Reader, ChainID, distribution.Descriptor) (Layer, error)
181 181
 }
182 182
 
183
-// CreateChainID returns ID for a layerDigest slice.
184
-//
185
-// Deprecated: use [identity.ChainID].
186
-func CreateChainID(dgsts []DiffID) ChainID {
187
-	return identity.ChainID(dgsts)
188
-}
189
-
190 183
 // ReleaseAndLog releases the provided layer from the given layer
191 184
 // store, logging any error and release metadata
192 185
 func ReleaseAndLog(ls Store, l Layer) {
... ...
@@ -29,16 +29,6 @@ type NodeDiscoveryData struct {
29 29
 	Self        bool
30 30
 }
31 31
 
32
-// DatastoreConfigData is the data for the datastore update event message
33
-//
34
-// Deprecated: no longer used.
35
-type DatastoreConfigData struct {
36
-	Scope    string
37
-	Provider string
38
-	Address  string
39
-	Config   any
40
-}
41
-
42 32
 // DriverEncryptionConfig contains the initial datapath encryption key(s)
43 33
 // Key in first position is the primary key, the one to be used in tx.
44 34
 // Original key and tag types are []byte and uint64
... ...
@@ -17,21 +17,6 @@ import (
17 17
 // early for "a" (all); https://github.com/torvalds/linux/blob/v5.10/security/device_cgroup.c#L614-L642
18 18
 var deviceCgroupRuleRegex = lazyregexp.New("^([acb]) ([0-9]+|\\*):([0-9]+|\\*) ([rwm]{1,3})$")
19 19
 
20
-// SetCapabilities sets the provided capabilities on the spec.
21
-//
22
-// Deprecated: this function is no longer used and will be removed in the next release.
23
-func SetCapabilities(s *specs.Spec, caplist []string) error {
24
-	if s.Process == nil {
25
-		s.Process = &specs.Process{}
26
-	}
27
-	s.Process.Capabilities = &specs.LinuxCapabilities{
28
-		Effective: caplist,
29
-		Bounding:  caplist,
30
-		Permitted: caplist,
31
-	}
32
-	return nil
33
-}
34
-
35 20
 // AppendDevicePermissionsFromCgroupRules takes rules for the devices cgroup to append to the default set
36 21
 func AppendDevicePermissionsFromCgroupRules(devPermissions []specs.LinuxDeviceCgroup, rules []string) ([]specs.LinuxDeviceCgroup, error) {
37 22
 	for _, deviceCgroupRule := range rules {