Documentation
¶
Index ¶
- Constants
- func NewPermissionDeniedError(reason string) error
- type AllowlistAuthorizer
- type AuditFacets
- type AuthKind
- type Authorization
- type Authorizer
- type BudgetContext
- type BudgetEvaluator
- type BudgetUsageProvider
- type CashuAuthorizer
- type Descriptor
- type Driver
- type IsolationDescriptor
- type IsolationLevel
- type Method
- type Outcome
- type Params
- type PermissionDeniedError
- type PreparedRequest
- type ProfileKind
- type Publisher
- type RelayPublisher
- type Request
- type RequestMeta
- type Runtime
- func (r *Runtime) Advertise(ctx context.Context) (*casnostr.Event, error)
- func (r *Runtime) ExecutePrepared(ctx context.Context, prepared *PreparedRequest) (contextvm.Response, error)
- func (r *Runtime) HandleGiftWrap(ctx context.Context, outer *casnostr.Event) (contextvm.Response, error)
- func (r *Runtime) HandleIntent(ctx context.Context, event *casnostr.Event) (contextvm.Response, error)
- func (r *Runtime) PrepareGiftWrap(ctx context.Context, outer *casnostr.Event) (*PreparedRequest, contextvm.Response, error)
- func (r *Runtime) PrepareIntent(ctx context.Context, event *casnostr.Event) (*PreparedRequest, contextvm.Response, error)
- func (r *Runtime) Profile() ProfileKind
- func (r *Runtime) RejectPrepared(ctx context.Context, prepared *PreparedRequest, err error) (contextvm.Response, error)
- type RuntimeConfig
- type Schemas
- type StatusUpdate
- type TermStatus
- type WorkModel
Constants ¶
View Source
const CASStatus30315 = 30315
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllowlistAuthorizer ¶
type AllowlistAuthorizer struct {
// contains filtered or unexported fields
}
func NewControllerAllowlist ¶
func NewControllerAllowlist(pubkeys ...string) *AllowlistAuthorizer
func NewPubkeyACL ¶
func NewPubkeyACL(pubkeys ...string) *AllowlistAuthorizer
func (*AllowlistAuthorizer) Authorize ¶
func (a *AllowlistAuthorizer) Authorize(_ context.Context, request Request) (Authorization, error)
func (*AllowlistAuthorizer) Kind ¶
func (a *AllowlistAuthorizer) Kind() AuthKind
type AuditFacets ¶
type Authorization ¶
type Authorization struct {
Requester string
}
type Authorizer ¶
type BudgetContext ¶
type BudgetEvaluator ¶
type BudgetEvaluator interface {
Evaluate(ctx context.Context, usage costgovernance.BudgetUsage) (*costgovernance.BudgetDecision, error)
}
type BudgetUsageProvider ¶
type BudgetUsageProvider interface {
BudgetUsage(ctx context.Context, request BudgetContext) (costgovernance.BudgetUsage, error)
}
type CashuAuthorizer ¶
type CashuAuthorizer struct {
// contains filtered or unexported fields
}
func NewCashuAuthorizer ¶
func NewCashuAuthorizer(pubkeys ...string) *CashuAuthorizer
func (*CashuAuthorizer) Authorize ¶
func (a *CashuAuthorizer) Authorize(ctx context.Context, request Request) (Authorization, error)
func (*CashuAuthorizer) Kind ¶
func (a *CashuAuthorizer) Kind() AuthKind
type Descriptor ¶
type Descriptor struct {
Profile ProfileKind `json:"profile"`
Runtime string `json:"runtime"`
AdKind int `json:"ad_kind"`
Methods []Method `json:"methods"`
WorkModel WorkModel `json:"work_model"`
Schema Schemas `json:"schema"`
Isolation *IsolationDescriptor `json:"isolation,omitempty"`
}
type IsolationDescriptor ¶
type IsolationDescriptor struct {
Level IsolationLevel `json:"level"`
Mechanism string `json:"mechanism"`
}
type IsolationLevel ¶
type IsolationLevel string
const ( IsolationProcess IsolationLevel = "process" IsolationContainer IsolationLevel = "container" IsolationVM IsolationLevel = "vm" )
type Outcome ¶
type Outcome struct {
Result json.RawMessage `json:"result,omitempty"`
Status TermStatus `json:"status"`
Audit AuditFacets `json:"audit"`
Progress []StatusUpdate `json:"progress,omitempty"`
}
type Params ¶
type Params struct {
Raw json.RawMessage `json:"raw"`
Meta RequestMeta `json:"_meta"`
}
type PermissionDeniedError ¶
type PermissionDeniedError struct {
Reason string
}
PermissionDeniedError lets drivers reject an authorized controller's method-level request without turning the JSON-RPC response into success.
func (*PermissionDeniedError) Error ¶
func (e *PermissionDeniedError) Error() string
type PreparedRequest ¶
type PreparedRequest struct {
// contains filtered or unexported fields
}
func (*PreparedRequest) Method ¶
func (p *PreparedRequest) Method() string
type ProfileKind ¶
type ProfileKind string
const ( ProfileAgentLifecycle ProfileKind = "agent-lifecycle" ProfileCompute ProfileKind = "compute" ProfileCI ProfileKind = "ci" ProfileDocs ProfileKind = "docs" ProfileMaintenance ProfileKind = "maintenance" )
type RelayPublisher ¶
type RelayPublisher struct{ RelayURLs []string }
type RequestMeta ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func NewRuntime(cfg RuntimeConfig) (*Runtime, error)
func (*Runtime) ExecutePrepared ¶
func (*Runtime) HandleGiftWrap ¶
func (*Runtime) HandleIntent ¶
func (*Runtime) PrepareGiftWrap ¶
func (*Runtime) PrepareIntent ¶
func (*Runtime) Profile ¶
func (r *Runtime) Profile() ProfileKind
func (*Runtime) RejectPrepared ¶
type RuntimeConfig ¶
type RuntimeConfig struct {
Driver Driver
Authorizer Authorizer
Signer casnostr.Signer
Publisher Publisher
RelayURLs []string
BudgetEvaluator BudgetEvaluator
BudgetUsageProvider BudgetUsageProvider
}
type StatusUpdate ¶
type TermStatus ¶
type TermStatus string
const ( StatusOK TermStatus = "ok" StatusFailed TermStatus = "failed" StatusRejected TermStatus = "rejected" )
Directories
¶
| Path | Synopsis |
|---|---|
|
drivers
|
|
|
maintenance
Package maintenance implements the per-host fleet hygiene driver ("Swabbie"): scan → classify → quarantine → purge, plus system-pressure metrics.
|
Package maintenance implements the per-host fleet hygiene driver ("Swabbie"): scan → classify → quarantine → purge, plus system-pressure metrics. |
|
Package vmexec defines the provider-neutral contract for running one job in an isolated virtual machine.
|
Package vmexec defines the provider-neutral contract for running one job in an isolated virtual machine. |
|
fake
Package fake provides a scriptable vmexec engine for adapter and driver tests.
|
Package fake provides a scriptable vmexec engine for adapter and driver tests. |
|
protocol
Package protocol implements the versioned NDJSON protocol shared by VM hosts and the cascadia guest agent.
|
Package protocol implements the versioned NDJSON protocol shared by VM hosts and the cascadia guest agent. |
Click to show internal directories.
Click to hide internal directories.