API reference
ObliviousOffload.ConnectParams — Type
ConnectParams(; port, hostname, username, password,
cert_dir, ca_cert_path, ca_key_path, trusted_ca_path,
server_privkey_path, server_cert_path, san_config_path,
signing_request_path, insecure_tls=false) -> ConnectParamsConfiguration parameters for connecting to or running an ObliviousOffload server.
Fields
port::Int: Server porthostname::String: Server hostnameusername::String: Username for basic authenticationpassword::String: Password for basic authenticationcert_dir::String: Directory for certificate filesca_cert_path::String: Path to the CA certificateca_key_path::String: Path to the CA private keytrusted_ca_path::String: Path to the remote CA certificate for client verificationserver_privkey_path::String: Path to the server's private keyserver_cert_path::String: Path to the server's certificatesan_config_path::String: Path to the Subject Alternative Names configuration filesigning_request_path::String: Path to the certificate signing requestinsecure_tls::Bool: If true, disables TLS verification (default: false)
Computed Properties
host::String: Computed as "https://hostname:port"
Notes
- All paths are loaded from preferences if available, allowing project-wide configuration
- When
insecure_tls=true, username and password are automatically reset tonothing - Basic authentication is automatically disabled if either username or password is
nothing
ObliviousOffload.OffloadServer — Type
OffloadServer(conn::ConnectParams) -> OffloadServer
OffloadServer() -> OffloadServerCreates a TLS-secured HTTP server that listens for incoming function calls. Services are registered with register_service! and called remotely via offload.
Fields
server::HTTP.Server: The underlying HTTP server instancerouter::HTTP.Handlers.Router: The HTTP router for dispatching requests to registered services
Examples
server = OffloadServer()
register_service!(server, "myfunc", (x, y) -> x + y)
wait(server)ObliviousOffload.access_log_middleware — Method
access_log_middleware(handler)Log each request in an nginx-like access log format:
127.0.0.1 - [14/Jul/2026:13:37:00 +0000] "POST /endpoint HTTP/1.1" 200 1234 0.042sObliviousOffload.make_part — Method
make_part(obj) -> HTTP.MultipartSerialize obj into an HTTP.Multipart part using Julia's Serialization stdlib.
The content type application/x-julia-serialized-object follows the convention established by Java's application/x-java-serialized-object for language-specific serialized objects.
ObliviousOffload.offload — Method
offload(conn::ConnectParams, endpoint::String, args...; kwargs...)
offload(endpoint::String, args...; kwargs...)Call a remote service registered on an ObliviousOffload server.
Serializes args and kwargs, sends them as multipart form data to the server's /<endpoint>, and deserializes the result. Communication is secured via TLS using the certificates configured in conn.
Arguments
conn::ConnectParams: Connection parameters (omit to use defaults)endpoint::String: The service endpoint to callargs...: Positional arguments passed to the remote functionkwargs...: Keyword arguments passed to the remote function
Returns
The deserialized return value of the remote function.
Examples
offload("add", 2, 3) # returns 5
offload("greet", "Alice") # returns "Hello, Alice!"
offload("greet", "Bob", greeting="Howdy") # returns "Howdy, Bob!"ObliviousOffload.parse_parts — Method
parse_parts(parts::Vector{HTTP.Multipart}) -> Dict{String, Any}Deserialize a vector of multipart form parts into a name-value dictionary. Parts with content type application/x-julia-serialized-object are deserialized via Serialization.deserialize.
ObliviousOffload.register_service! — Method
register_service!(server::OffloadServer, endpoint, function_handler)Register a function as a remotely callable service on the server.
The function is exposed as a POST endpoint at /<endpoint>. When called via offload, positional and keyword arguments are serialized, sent as multipart form data, and passed to function_handler. The return value is serialized back to the caller.
Arguments
server::OffloadServer: The server to register the service onendpoint: The URL path segment for this service (e.g.,"myfunc"becomes/myfunc)function_handler: A callable that accepts the offloaded arguments and keyword arguments
Examples
server = OffloadServer()
register_service!(server, "add", (x, y) -> x + y)
function greet(name; greeting="Hello")
return "$(greeting), $(name)!"
end
register_service!(server, "greet", greet)