Help us shape the future of Go! Take the 2026 Go Developer Survey

phala

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package phala is the Phala confidential-inference provider: it owns the gateway base-URL default and a typed constructor (New) that wires the reusable, provider-agnostic aci attestation protocol into an attested inference.Client. aci enforces whatever acceptance Policy it is handed; this package ships no pinned trust anchors — the caller supplies the acceptance Policy with their own, externally verified pins (app-id, build provenance, KMS root). aci never imports this package (that would cycle); the dependency is one-way, phala → aci.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(baseURL string, key auth.APIKey, p aci.Policy) (inference.Client, error)

New builds an attested Phala confidential-inference client: it composes the reusable aci attestation protocol with the caller-supplied acceptance Policy (the caller pins its own, externally verified trust anchors). baseURL is the gateway origin (e.g. https://inference.phala.com); an empty baseURL self-defaults to the canonical Phala host (defaultBaseURL). key is the bearer credential and is REQUIRED — the typed auth.APIKey parameter encodes that at compile time, and New fails closed on an empty string with a typed *llm.AuthRequiredError before any network call (checked BEFORE the base-URL default, so a missing key always wins). It then forwards to aci.New, which fails closed with *UnpinnedPolicyError on a policy that pins no acceptance set and did not opt out via aci.UnpinnedPolicy(). On success it returns the inference.Client aci implements.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL