New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

lxdn

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lxdn

Yet another LXD client for nodeJS

latest
Source
npmnpm
Version
0.1.10
Version published
Maintainers
1
Created
Source

lxdn

Yet another node-lxd client

API autogenerated from docs

Usage

Take a look at: https://github.com/lxc/lxd/blob/master/doc/rest-api.md#api-structure

Every API URL is simply mapped to a function.

Example: GET /1.0/containers/<name>/console -> client.api.containers(name).console.get()

Every final request function (.get(), .post(), etc.) allows three arguments:

  • parameters: Parameters to post/send. Not allowed on GET (simply set it to null if using other args)
  • query: Query parameters to add
  • headers: Additional headers

Some API calls might return buffers, these usually have set N/A as their return type.

Some other API calls might return async operations. For those check the .isAsync flag if async is among the types listed in operation. These calls return an AsyncOperation object

AsyncOperation:

  • async wait(timeout?): Wait, with possible timeout value. Will throw if operation errors.
  • async cancel(): Cancel an operation. Throws if not running or uncancelable
  • async refresh(): Refresh details about the operation
  • async websocket(): For websocket-type operations this returns a websocket connection, for others it throws
  • verifySuccess(): Throws if the operation has errored. Prior to calling this .refresh() should be called

Keywords

lxd

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts