Documentation
¶
Overview ¶
Shared contracts are defined in core; aliases preserve type identity.
Index ¶
- Constants
- type Artifact
- type Connection
- type Endpoint
- type Instance
- type Native
- func (n *Native) Await(ctx context.Context, id string, states ...State) (Instance, error)
- func (n *Native) Close() error
- func (n *Native) Health(ctx context.Context, id string, check bool) (bool, error)
- func (n *Native) Instance(ctx context.Context, id string) (out Instance, err error)
- func (n *Native) Instances(ctx context.Context) (out []Instance, err error)
- func (n *Native) Logs(ctx context.Context, id string) (out string, err error)
- func (n *Native) Orphans(ctx context.Context) (out []Instance, err error)
- func (n *Native) Ready(ctx context.Context, id string, pid int, ready bool) error
- func (n *Native) ResolveOrphan(ctx context.Context, id string) error
- func (n *Native) Start(ctx context.Context, spec NativeSpec, secrets map[string]string) (out Instance, err error)
- func (n *Native) Stop(ctx context.Context, id string) error
- type NativeOptions
- type NativeRestart
- type NativeSpec
- type Orphan
- type State
Constants ¶
const StateCrashed = shared.StateCrashed
const StateOrphaned = shared.StateOrphaned
const StateReady = shared.StateReady
const StateRestarting = shared.StateRestarting
const StateRunning = shared.StateRunning
const StateStarting = shared.StateStarting
const StateStopped = shared.StateStopped
const StateStopping = shared.StateStopping
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection = shared.Connection
type Native ¶
type Native struct {
// contains filtered or unexported fields
}
func OpenNative ¶
func OpenNative(ctx context.Context, store *ledger.NativeStore, options NativeOptions) (*Native, error)
type NativeOptions ¶
type NativeOptions struct {
LogLimit int `json:"log_limit,omitempty"`
RuntimeID string `json:"runtime_id,omitempty"`
RequireChecksum bool `json:"require_checksum,omitempty"`
OrphanPolicy string `json:"orphan_policy,omitempty"`
LeaseMilliseconds int64 `json:"lease_ms,omitempty"`
RetainTerminal int `json:"retain_terminal,omitempty"`
}
NativeOptions configures the C supervisor. Ownership and orphan policy remain explicit; opening does not silently substitute the compatibility supervisor.
type NativeRestart ¶
type NativeSpec ¶
type NativeSpec struct {
Artifact Artifact `json:"artifact"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Dir string `json:"dir,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
Endpoints []Endpoint `json:"endpoints,omitempty"`
Connections []Connection `json:"connections,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
Restart NativeRestart `json:"restart,omitempty"`
AwaitReadiness bool `json:"await_readiness,omitempty"`
ReadinessTimeoutMilliseconds int64 `json:"readiness_timeout_ms,omitempty"`
}
NativeSpec is the C wire contract. Readiness and health checks are reported explicitly by the application; no Go callback is passed into the engine.