lxd

command
v0.0.0-...-5fbd3a7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 162 Imported by: 0

Documentation

Overview

forkdns provides a specialised DNS server designed for relaying A and PTR queries.

Analogous to main_forksyscall.go but for cases, when you want to implement stuff in Golang.

*

  • This file is a bit funny. The goal here is to use setns() to manipulate
  • files inside the container, so we don't have to reason about the paths to
  • make sure they don't escape (we can simply rely on the kernel for
  • correctness). Unfortunately, you can't setns() to a mount namespace with a
  • multi-threaded program, which every golang binary is. However, by declaring
  • our init as an initializer, we can capture process control before it is
  • transferred to the golang runtime, so we can then setns() as we'd like
  • before golang has a chance to set up any threads. So, we implement two new
  • lxd fork* commands which are captured here, and take a file on the host fs
  • and copy it into the container ns. *
  • An alternative to this would be to move this code into a separate binary,
  • which of course has problems of its own when it comes to packaging (how do
  • we find the binary, what do we do if someone does file push and it is
  • missing, etc.). After some discussion, even though the embedded method is
  • somewhat convoluted, it was preferred.

LXD external REST API

This is the REST API used by all LXD clients. Internal endpoints aren't included in this documentation.

The LXD API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client.

Version: 1.0
License: AGPL-3.0-only https://www.gnu.org/licenses/agpl-3.0.en.html
Contact: LXD upstream <lxd@lists.canonical.com> https://github.com/canonical/lxd

swagger:meta

Source Files

Directories

Path Synopsis
generate
This program reads an OpenFGA model in DSL format and generates a go file containing a type definition for `Entitlement`, an Entitlement each relation in the model that can has a `group#member` as a directly related user type, and a map of entity type to list of entitlements that can be granted for that entity type.
This program reads an OpenFGA model in DSL format and generates a go file containing a type definition for `Entitlement`, an Entitlement each relation in the model that can has a `group#member` as a directly related user type, and a map of entity type to list of entitlements that can be granted for that entity type.
db
generate/file
Package file contains helpers to write auto-generated Go source files.
Package file contains helpers to write auto-generated Go source files.
query
Package query implements helpers around database/sql to execute various kinds of very common SQL queries.
Package query implements helpers around database/sql to execute various kinds of very common SQL queries.
schema
Package schema offers utilities to create and maintain a database schema.
Package schema offers utilities to create and maintain a database schema.
cdi
nictype
Package nictype is a small package to allow resolving NIC "network" key to "nictype" key.
Package nictype is a small package to allow resolving NIC "network" key to "nictype" key.
pci
acl
Package response contains helpers for rendering LXD HTTP responses.
Package response contains helpers for rendering LXD HTTP responses.
s3

Jump to

Keyboard shortcuts

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