-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
cell.go
36 lines (29 loc) · 1 KB
/
cell.go
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
36
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package config
import (
"github.com/cilium/hive/cell"
"github.com/sirupsen/logrus"
dpdef "github.com/cilium/cilium/pkg/datapath/linux/config/defines"
"github.com/cilium/cilium/pkg/datapath/linux/sysctl"
"github.com/cilium/cilium/pkg/datapath/tables"
datapath "github.com/cilium/cilium/pkg/datapath/types"
"github.com/cilium/cilium/pkg/maps/nodemap"
"github.com/cilium/cilium/pkg/statedb"
)
type WriterParams struct {
cell.In
Log logrus.FieldLogger
NodeMap nodemap.MapV2
NodeAddressing datapath.NodeAddressing
NodeExtraDefines []dpdef.Map `group:"header-node-defines"`
NodeExtraDefineFns []dpdef.Fn `group:"header-node-define-fns"`
Sysctl sysctl.Sysctl
DB *statedb.DB
Devices statedb.Table[*tables.Device]
}
var Cell = cell.Module(
"datapath-linux-config",
"Generate and write the configuration for datapath program types",
cell.Provide(NewHeaderfileWriter),
)