Crate inapi [] [src]

Intecture API

The Intecture API is the interface between your code and your managed hosts. The library is organised into a set of primitives, which are the building blocks used to configure your systems.

Communication

The API communicates with the Agent service on your managed hosts via several ZeroMQ sockets. If the service is not running on your host when you run you code, the program will hang while it attempts to connect to a non-existent socket.

Modules

command_ffi

FFI interface for Command

directory_ffi

FFI interface for Directory

file_ffi

FFI interface for File

host_ffi

FFI interface for Host

package_ffi

FFI interface for Package

payload_ffi

FFI interface for Payload

service_ffi

FFI interface for Service

template_ffi

FFI interface for Template

Macros

needarray

Helper that returns a Result<Value::Array>. You can optionally pass a JSON pointer to retrieve a nested key.

needbool

Helper that returns a Result<Value::Bool>. You can optionally pass a JSON pointer to retrieve a nested key.

needf64

Helper that returns a Result<Value::F64>. You can optionally pass a JSON pointer to retrieve a nested key.

needi64

Helper that returns a Result<Value::I64>. You can optionally pass a JSON pointer to retrieve a nested key.

neednull

Helper that returns a Result<Value::Null>. You can optionally pass a JSON pointer to retrieve a nested key.

needobj

Helper that returns a Result<Value::Object>. You can optionally pass a JSON pointer to retrieve a nested key.

needstr

Helper that returns a Result<Value::String>. You can optionally pass a JSON pointer to retrieve a nested key.

needu64

Helper that returns a Result<Value::U64>. You can optionally pass a JSON pointer to retrieve a nested key.

wantarray

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantbool

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantf64

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wanti64

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantnull

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantobj

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantstr

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

wantu64

Helper that returns an Option<Value>. You can optionally pass a JSON pointer to retrieve a nested key.

Structs

Command

Primitive for running shell commands.

CommandResult

Result attributes returned from the managed host.

Directory

Primitive for managing directories.

File

Primitive for managing files.

FileOwner

Owner's user and group for a file.

Host

Primitive for communicating with a managed host.

MapBuilder

MapBuilder is a helper type that construct Data types.

Package

Primitive for installing and managing software packages.

Payload

Payloads are self-contained projects that encapsulate a specific feature or system function.

ProviderFactory
Service

Primitive for controlling service daemons.

Template

Primitive for rendering templates into uploadable files.

VecBuilder

Enums

DirectoryOpts

Options for controlling directory operations.

Error

Global error type.

FileOptions
Providers

Supported package providers.

ServiceRunnable

Runnables are the executable items that a Service calls actions on.

Value

Represents any valid JSON value.

Functions

geterr