configd

package module
v0.0.0-...-308df95 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: BSD-2-Clause, BSD-3-Clause, LGPL-2.1, + 2 more Imports: 6 Imported by: 0

README

configd code design

Overview

The configd package is written in Go. It provides functionality to parse, compile and validate Yang schemas, and to validate base configurations and configuration updates against those schemas. Further to this it manages the configuration change process (set/delete, commit etc).

Much of the subsidiary functionality, eg the YANG compiler and handling for configd YANG extensions, is implemented in separate repositories.

Packages in this repository

The following packages are included in this repository.

Yang cmds
  • yang2path
  • yang2rev
  • yangc - standalone version of YANG compiler (inc cfgd xtns)
  • yanggraph
Configd cmds
  • args2cpath
  • callrpc
  • cfgcli - implements 'config' mode commands
  • cfgdiff
  • cfgparse
  • cfgread
  • configd - configd process (parses YANG, config, runs sessions)
  • configdcaps
  • featcaps
  • gettree
  • normalize
Configd packages
  • configd (configd) - authentication, logging, error formatting
  • commit (configd/commit) - builds config trees for commit
  • session (configd/session) - session management
  • server (configd/server) - server for incoming RPCs

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InSecretsGroup

func InSecretsGroup(ctx *Context) bool

func NewLogger

func NewLogger(p syslog.Priority, logFlag int) (*log.Logger, error)

version of syslog.NewLogger which uses base program name as logging tag

Types

type Config

type Config struct {
	User         string
	Runfile      string
	Logfile      string
	Pidfile      string
	Yangdir      string
	Socket       string
	SecretsGroup string
	SuperGroup   string
	Capabilities string
}

type Context

type Context struct {
	Configd   bool
	Auth      auth.Auther
	Pid       int32
	Uid       uint32
	User      string
	UserHome  string
	Groups    []string
	Superuser bool
	Config    *Config
	Dlog      *log.Logger
	Elog      *log.Logger
	Wlog      *log.Logger
	CompMgr   schema.ComponentManager
	Noexec    bool
}

func (*Context) DropPrivileges

func (c *Context) DropPrivileges()

func (*Context) RaisePrivileges

func (c *Context) RaisePrivileges()

Raising privileges should be done sparingly as it bypasses things like ACM, secret redaction etc. however it is occasionally necessary.

type LockId

type LockId int32
const (
	COMMIT LockId = -1
	SYSTEM LockId = -2
)

func (LockId) String

func (l LockId) String() string

Directories

Path Synopsis
cmd
configd
configd is a daemon that manages run-time configuration based on YANG definition files.
configd is a daemon that manages run-time configuration based on YANG definition files.

Jump to

Keyboard shortcuts

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