libnetwork: remove redundant sandboxTable type

It was not exported so let's remove the abstraction to not make it look
like something more than it is.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-08-12 09:55:03 +02:00
parent 3c10db669e
commit e690cdb6a3
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -82,14 +82,12 @@ type NetworkWalker func(nw *Network) bool
// When the function returns true, the walk will stop.
type SandboxWalker func(sb *Sandbox) bool
type sandboxTable map[string]*Sandbox
// Controller manages networks.
type Controller struct {
id string
drvRegistry drvregistry.Networks
ipamRegistry drvregistry.IPAMs
sandboxes sandboxTable
sandboxes map[string]*Sandbox
cfg *config.Config
store *datastore.Store
extKeyListener net.Listener
@ -115,7 +113,7 @@ func New(cfgOptions ...config.Option) (*Controller, error) {
c := &Controller{
id: stringid.GenerateRandomID(),
cfg: config.New(cfgOptions...),
sandboxes: sandboxTable{},
sandboxes: map[string]*Sandbox{},
svcRecords: make(map[string]*svcInfo),
serviceBindings: make(map[serviceKey]*service),
agentInitDone: make(chan struct{}),