Documentation
¶
Overview ¶
Package calldecl is the declaration of an ENTRY a call may name: a stack says, in one small YAML file under the reserved CALLS/ subtree, where a call enters it, what the call must carry and what the answer will carry.
OPS/app/_orient/CALLS/orient.yaml
description: Compile the context needed for a job.
entry: 100
timeout: 20000
input:
job:
description: the job record
required: true
text:
description: the message to answer
output:
prompt:
description: the compiled prompt
required: true
sources:
description: the documents it drew on
A rule names the entry when it calls: `EXEC "call://app/_orient" WITH entry = "orient"`. The chassis enters the stack at the declared scope, bounds the call by the declared timeout when that is shorter, refuses a call that lacks a required input before the callee runs (txco_call_invalid_input) and an answer that lacks a required output after it ends (txco_call_invalid_output). Nothing else is checked: the shape of a field is the stacks' business. A call that names no entry is what it was before declarations existed.
The shape is the capability declaration's (chassis/capdecl), so a stack that answers callers inside the tenant and callers outside it writes the same thing twice with different names. The file deploys with `txco apply` as a stack_files row, beside CAPS/, and is validated at apply.
This file is the leaf layer: the reserved-path vocabulary, with no dependency on stores, so the CLI, the admin producer and the processor can import it cheaply.
Index ¶
Constants ¶
const ( Dir = "CALLS" DeclExt = ".yaml" )
Reserved top-level directory and the declaration extension.
Variables ¶
var ErrNotDeclared = errors.New("call: not declared")
ErrNotDeclared: the stack's active version has no CALLS/<name>.yaml.
Functions ¶
func CheckEntry ¶
CheckEntry reports whether the declaration's entry names a scope the stack has.
func IsCallPath ¶
IsCallPath reports whether a stack_files path lives under CALLS/.