_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c176500
// WriteCert writes the given material to the appropriate certificate files in // the given LXD var directory.
c176501
// NewDaemon returns a new Daemon object with the given configuration.
c176502
// DefaultDaemon returns a new, un-initialized Daemon object with default values.
c176503
// AllowProjectPermission is a wrapper to check access against the project, its features and RBAC permission
c176504
// Convenience function around Authenticate
c176505
// Authenticate validates an incoming http Request // It will check over what protocol it came, what type of request it is and // will validate the TLS certificate or Macaroon. // // This does not perform authorization, only validates authentication
c176506
// State creates a new State instance linked to our internal db and os.
c176507
// UnixSocket returns the full path to the unix.socket file that this daemon is // listening on. Used by tests.
c176508
// Stop stops the shared daemon.
c176509
// Setup external authentication
c176510
// Create a database connection and perform any updates needed.
c176511
// WriteJSON encodes the body as JSON and sends it back to the client
c176512
// EtagHash hashes the provided data and returns the sha256
c176513
// EtagCheck validates the hash of the current state with the hash // provided by the client
c176514
// HTTPClient returns an http.Client using the given certificate and proxy.
c176515
// IsRecursionRequest checks whether the given HTTP request is marked with the // "recursion" flag in its form values.
c176516
// GetListeners returns the socket-activated network listeners, if any. // // The 'start' parameter must be SystemdListenFDsStart, except in unit tests, // see the docstring of SystemdListenFDsStart below.
c176517
// Perform a database dump.
c176518
// Execute queries.
c176519
// PublicKey is a convenience to encode the underlying public key to ASCII.
c176520
// PrivateKey is a convenience to encode the underlying private key.
c176521
// Fingerprint returns the fingerprint of the public key.
c176522
// GenCert will create and populate a certificate file and a key file
c176523
// PrintServerInfo prints out information about the server.
c176524
// LaunchContainers launches a set of containers.
c176525
// CreateContainers create the specified number of containers.
c176526
// GetContainers returns containers created by the benchmark.
c176527
// StartContainers starts containers created by the benchmark.
c176528
// Set the value of a query parameter in the given URI.
c176529
// Image handling functions // GetImages returns a list of available images as Image structs
c176530
// GetImageFile downloads an image from the server, returning an ImageFileRequest struct
c176531
// GetImageSecret is a helper around CreateImageSecret that returns a secret for the image
c176532
// GetPrivateImage is similar to GetImage but allows passing a secret download token
c176533
// GetPrivateImageFile is similar to GetImageFile but allows passing a secret download token
c176534
// GetImageAliases returns the list of available aliases as ImageAliasesEntry structs
c176535
// tryCopyImage iterates through the source server URLs until one lets it download the image
c176536
// CopyImage copies an image from a remote server. Additional options can be passed using ImageCopyArgs
c176537
// UpdateImage updates the image definition
c176538
// DeleteImage requests that LXD removes an image from the store
c176539
// RefreshImage requests that LXD issues an image refresh
c176540
// CreateImageAlias sets up a new image alias
c176541
// UpdateImageAlias updates the image alias definition
c176542
// RenameImageAlias renames an existing image alias
c176543
// DeleteImageAlias removes an alias from the LXD image store
c176544
// Open the node-local database object.
c176545
// EnsureSchema applies all relevant schema updates to the node-local // database. // // Return the initial schema version found before starting the update, along // with any error occurred.
c176546
// FilesystemDetect returns the filesystem on which the passed-in path sits.
c176547
// Schema for the local database.
c176548
// Schema updates begin here // Copy core.https_address to cluster.https_address in case this node is // clustered.
c176549
// ArchitectureGetLocal returns the local hardware architecture
c176550
// NewController returns a new Controller using the specific MAAS server and machine
c176551
// CreateContainer defines a new MAAS device for the controller
c176552
// DefinedContainer returns true if the container is defined in MAAS
c176553
// UpdateContainer updates the MAAS device's interfaces with the new provided state
c176554
// RenameContainer renames the MAAS device for the container without releasing any allocation
c176555
// DeleteContainer removes the MAAS device for the container
c176556
// Add a new update to the schema. It will be appended at the end of the // existing series.
c176557
// Ensure that the schema exists.
c176558
// Return the highest update version currently applied. Zero means that no // updates have been applied yet.
c176559
// Apply any pending update that was not yet applied.
c176560
// Check that the given list of update version numbers doesn't have "holes", // that is each version equal the preceding version plus 1.
c176561
// Check that all the given updates are applied.
c176562
// Format the given SQL statement in a human-readable way. // // In particular make sure that each column definition in a CREATE TABLE clause // is in its own row, since SQLite dumps occasionally stuff more than one // column in the same line.
c176563
// GetAllXattr retrieves all extended attributes associated with a file, // directory or symbolic link.
c176564
// Detect whether err is an errno.
c176565
// Uname returns Utsname as strings
c176566
// RegisterStmt register a SQL statement. // // Registered statements will be prepared upfront and re-used, to speed up // execution. // // Return a unique registration code.
c176567
// PrepareStmts prepares all registered statements and returns an index from // statement code to prepared statement object.
c176568
// NewGateway creates a new Gateway for managing access to the dqlite cluster. // // When a new gateway is created, the node-level database is queried to check // what kind of role this node plays and if it's exposed over the network. It // will initialize internal data structures accordingly, for example starting a //...
c176569
// DialFunc returns a dial function that can be used to connect to one of the // dqlite nodes.
c176570
// Shutdown this gateway, stopping the gRPC server and possibly the raft factory.
c176571
// Sync dumps the content of the database to disk. This is useful for // inspection purposes, and it's also needed by the activateifneeded command so // it can inspect the database in order to decide whether to activate the // daemon or not.
c176572
// Reset the gateway, shutting it down and starting against from scratch using // the given certificate. // // This is used when disabling clustering on a node.
c176573
// LeaderAddress returns the address of the current raft leader.
c176574
// Wait for the raft node to become leader. Should only be used by Bootstrap, // since we know that we'll self elect.
c176575
// Return information about the LXD nodes that a currently part of the raft // cluster, as configured in the raft log. It returns an error if this node is // not the leader.
c176576
// Return the addresses of the raft nodes as stored in the node-level // database. // // These values might leg behind the actual values, and are refreshed // periodically during heartbeats.
c176577
// Create a dial function that connects to the given listener.
c176578
// DqliteLog redirects dqlite's logs to our own logger
c176579
// MetadataAsMap parses the Response metadata into a map
c176580
// MetadataAsOperation turns the Response metadata into an Operation
c176581
// MetadataAsStringSlice parses the Response metadata into a slice of string
c176582
// MetadataAsStruct parses the Response metadata into a provided struct
c176583
// Load reads current content of the filename and loads records.
c176584
// Write writes current records to file.
c176585
// AddRecord adds a record to the report.
c176586
// LoadConfig reads the configuration from the config path; if the path does // not exist, it returns a default configuration.
c176587
// SaveConfig writes the provided configuration to the config file.
c176588
// ConfigPath returns a joined path of the configuration directory and passed arguments
c176589
// ServerCertPath returns the path for the remote's server certificate
c176590
// NewConfig returns a Config, optionally using default remotes.
c176591
// Check if CRIU supports pre-dumping and number of // pre-dump iterations
c176592
// The function preDumpLoop is the main logic behind the pre-copy migration. // This function contains the actual pre-dump, the corresponding rsync // transfer and it tells the outer loop to abort if the threshold // of memory pages transferred by pre-dumping has been reached.
c176593
// Return a new root command.
c176594
// APIExtensionsCount returns the number of available API extensions.
c176595
// SelectURIs returns a list of LXD API URI strings for the resource yielded by // the given query. // // The f argument must be a function that formats the entity URI using the // columns yielded by the query.
c176596
// SelectStrings executes a statement which must yield rows with a single string // column. It returns the list of column values.
c176597
// Execute the given query and ensure that it yields rows with a single column // of the given database type. For every row yielded, execute the given // scanner.
c176598
// Callers returns a Trace for the current goroutine with element 0 // identifying the calling function.
c176599
// name returns the import path qualified name of the function containing the // call.