Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// Logging configuration.
Logging logging.Config `json:"logging" yaml:"logging"`
// MemoryPath is the path to the shared-memory file that is used to
// communicate with dataplane.
MemoryPath string `yaml:"memory_path"`
// Gateway configuration.
Gateway gateway.Config `json:"gateway" yaml:"gateway"`
// Modules configuration. A module absent from the document is not
// started.
Modules bundle.ModulesConfig `json:"modules" yaml:"modules"`
// Devices configuration. A device absent from the document is not
// started.
Devices bundle.DevicesConfig `json:"devices" yaml:"devices"`
}
Config is the control plane configuration.
func DefaultConfig ¶
func DefaultConfig() *Config
type Director ¶
type Director struct {
// contains filtered or unexported fields
}
Director is the YANET controlplane director.
This is an entry point for the YANET controlplane. Its main purposes is to initialize basic configuration, set up the Gateway API, sidecar gRPC services and run them.
func NewDirector ¶
func NewDirector(cfg *Config, options ...DirectorOption) (*Director, error)
NewDirector creates a new YANET controlplane director using specified config.
type DirectorOption ¶
type DirectorOption func(*options)
DirectorOption is a function that configures the YANET controlplane director.
func WithAtomicLogLevel ¶
func WithAtomicLogLevel(level *zap.AtomicLevel) DirectorOption
WithAtomicLogLevel sets the atomic logger level for the YANET controlplane director.
This level can be changed at runtime.
func WithLog ¶
func WithLog(log *zap.Logger) DirectorOption
WithLog sets the logger for the YANET controlplane director.
func WithLogLevelObserver ¶
func WithLogLevelObserver(observer func(zapcore.Level)) DirectorOption
WithLogLevelObserver registers a function called with the new level every time the logging RPC changes it, alongside the atomic Go level.
This is how the director drives lib/logging's C gate from a runtime level change without this package depending on cgo itself.