yncp

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version returns the current YANET version.

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

func (*Config) Default

func (m *Config) Default()

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.

func (*Director) Close

func (m *Director) Close() error

Close closes the YANET controlplane director.

func (*Director) Run

func (m *Director) Run(ctx context.Context) error

Run runs the YANET controlplane director.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL