Expand description
The common module (shared between the CLI and enclave process).
Modules§
- commands_
parser - The module which parses command parameters from command-line arguments.
- document_
errors - The module which provides mappings between NitroCliErrors and their corresponding code.
- json_
output - The module which provides JSON-ready information structures.
- logger
- The module which provides the per-process logger.
- signal_
handler - The module which provides signal handling.
Structs§
- Nitro
CliFailure - Struct that is passed along the backtrace and accumulates error messages.
Enums§
- Enclave
Process Command Type - The type of commands that can be sent to an enclave process.
- Enclave
Process Reply - The type of replies that an enclave process can send to a CLI instance.
- Nitro
CliError Enum - All possible errors which may occur.
Constants§
- ENCLAVE_
PROC_ WAIT_ TIMEOUT_ MSEC - The amount of time in milliseconds an enclave process will wait for certain operations.
- ENCLAVE_
READY_ VSOCK_ PORT - The vsock port used to confirm that the enclave has booted.
- MSG_
ENCLAVE_ CONFIRM - The confirmation code sent by an enclave process to a requesting CLI instance in order to signal that it is alive.
- SOCKETS_
DIR_ PATH_ ENV_ VAR - The environment variable which holds the path to the Unix sockets directory.
- VMADDR_
CID_ PARENT - The CID for the vsock device of the parent VM.
Traits§
- Exit
Gracefully - A trait which allows a more graceful program exit instead of the standard
panic. Provides a custom exit code.
Functions§
- construct_
error_ message - Assembles the error message which gets displayed to the user.
- enclave_
proc_ command_ send_ single - Send a command to a single socket.
- get_
socket_ path - Get the path to the Unix socket owned by an enclave process which also owns the enclave with the given ID.
- get_
sockets_ dir_ path - Get the path to the directory containing the Unix sockets owned by all enclave processes.
- notify_
error - Notify both the user and the logger of an error.
- read_
u64_ le - Read a LE-encoded 64-bit unsigned value from a socket.
- receive_
from_ stream - Receive an object of a specified type from an input stream.
- write_
u64_ le - Write a LE-encoded 64-bit unsigned value to a socket.
Type Aliases§
- Nitro
CliResult - The most common result type provided by Nitro CLI operations.