Add a new location - a place where other packets might be found and pulled into your local archive. Currently only file-based locations are supported.

outpack_location_add(name, type, args, priority = 0, root = NULL)

Arguments

name

The short name of the location to use. Cannot be in use, and cannot be one of local or orphan

type

The type of location to add. Currently supported values are path (a location that exists elsewhere on the filesystem) and http (a location accessed over outpack's http API).

args

Arguments to the location driver. The arguments here will vary depending on the type used, see Details.

priority

The priority of the location. This is used when deciding where to pull packets from (outpack_location_pull_packet), and will be used in the query interface. A priority of 0 corresponds to the same priority as local packets, while larger numbers have higher priority and negative numbers have lower priority. Ties will be resolved in an arbitrary order.

root

The outpack root. Will be searched for from the current directory if not given.

Value

Nothing

Details

We currently support two types of locations - path, which points to an outpack archive accessible by path (e.g., on the same computer or on a mounted network share) and http, which requires that an outpack server is running at some url and uses an HTTP API to communicate. More types may be added later, and more configuration options to these location types will definitely be needed in future.

Configuration options for different location types:

Path locations:

  • path: The path to the other archive root. This should generally be an absolute path, or the behaviour of outpack will be unreliable.

HTTP locations:

Accessing outpack over HTTP requires that an outpack server is running. The interface here is expected to change as we expand the API, but also as we move to support things like TLS and authentication.

  • url: The location of the server, including protocol, for example http://example.com:8080

Warning

The API here may change as we move to support different types of locations.