Documentation
¶
Overview ¶
Package program compiles globally ordered directive module programs and executes their exchange and round-trip lifetimes. An Executable is immutable: Compile runs once for a resolved Payload, while each recovery round trip only opens fresh round-trip instances from the existing bindings.
Index ¶
- Variables
- type Compiler
- type Executable
- type HealthProvider
- type HealthSnapshot
- type HealthStatus
- type Run
- type Runtime
- type Scope
- type ScopeSet
- func (s *ScopeSet) DirectivePrepared(ctx context.Context, value lifecycle.DirectivePrepared) error
- func (s *ScopeSet) DownstreamBodyChunk(ctx context.Context, value lifecycle.BodyChunk) error
- func (s *ScopeSet) DownstreamBodyEnded(ctx context.Context, value lifecycle.BodyEnded) error
- func (s *ScopeSet) DownstreamResponseStarted(ctx context.Context, value lifecycle.ResponseStarted) error
- func (s *ScopeSet) DownstreamSSEComment(ctx context.Context, value lifecycle.SSEComment) error
- func (s *ScopeSet) DownstreamSSEData(ctx context.Context, value lifecycle.SSEData) error
- func (s *ScopeSet) Finish(ctx context.Context, cause module.FinishCause) error
- func (s *ScopeSet) HasOutboundBodyMutators() bool
- func (s *ScopeSet) HasUpstreamBodyMutators() bool
- func (s *ScopeSet) MutateOutboundBodyChunk(ctx context.Context, draft *lifecycle.BodyDraft) error
- func (s *ScopeSet) MutateOutboundRequest(ctx context.Context, request *http.Request) error
- func (s *ScopeSet) MutateUpstreamBodyChunk(ctx context.Context, draft *lifecycle.BodyDraft) error
- func (s *ScopeSet) MutateUpstreamResponse(ctx context.Context, draft *lifecycle.ResponseDraft) error
- func (s *ScopeSet) RecoveryDecided(ctx context.Context, value lifecycle.RecoveryDecided) error
- func (s *ScopeSet) RecoveryFinished(ctx context.Context, value lifecycle.RecoveryFinished) error
- func (s *ScopeSet) RecoveryStarted(ctx context.Context, value lifecycle.RecoveryStarted) error
- func (s *ScopeSet) RequestBodyChunk(ctx context.Context, value lifecycle.BodyChunk) error
- func (s *ScopeSet) RequestBodyEnded(ctx context.Context, value lifecycle.RequestBodyEnded) error
- func (s *ScopeSet) RequestFinished(ctx context.Context, value lifecycle.RequestFinished) error
- func (s *ScopeSet) RequestStarted(ctx context.Context, value lifecycle.RequestStarted) error
- func (s *ScopeSet) RoundTripFinished(ctx context.Context, value lifecycle.RoundTripFinished) error
- func (s *ScopeSet) RoundTripStarted(ctx context.Context, value lifecycle.RoundTripStarted) error
- func (s *ScopeSet) SetRoundTrip(roundTrip int)
- func (s *ScopeSet) UpstreamBodyChunk(ctx context.Context, value lifecycle.BodyChunk) error
- func (s *ScopeSet) UpstreamBodyEnded(ctx context.Context, value lifecycle.BodyEnded) error
- func (s *ScopeSet) UpstreamResponseStarted(ctx context.Context, value lifecycle.ResponseStarted) error
- func (s *ScopeSet) UpstreamStarted(ctx context.Context, value lifecycle.UpstreamStarted) error
- type StreamObserver
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRuntimeClosed = errors.New("program runtime is closed") ErrRunClosed = errors.New("program run is closed") )
Functions ¶
This section is empty.
Types ¶
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
type HealthProvider ¶
type HealthProvider interface {
ModuleHealth() HealthSnapshot
}
type HealthSnapshot ¶
type HealthSnapshot struct {
Status string `json:"status"`
Modules map[string]HealthStatus `json:"modules"`
}
type HealthStatus ¶
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
func (*Run) OpenExchange ¶
func (run *Run) OpenExchange(ctx module.OpenContext) (*Scope, error)
func (*Run) OpenRoundTrip ¶
func (run *Run) OpenRoundTrip(ctx module.OpenContext) (*Scope, error)
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func (*Runtime) ModuleHealth ¶
func (runtime *Runtime) ModuleHealth() HealthSnapshot
type ScopeSet ¶
type ScopeSet struct {
// contains filtered or unexported fields
}
ScopeSet is the globally ordered view of all currently active module scopes. It keeps directive program order across exchange- and round-trip-scoped modules.
func NewScopeSet ¶
func (*ScopeSet) DirectivePrepared ¶
func (*ScopeSet) DownstreamBodyChunk ¶
func (*ScopeSet) DownstreamBodyEnded ¶
func (*ScopeSet) DownstreamResponseStarted ¶
func (*ScopeSet) DownstreamSSEComment ¶
func (*ScopeSet) DownstreamSSEData ¶
func (*ScopeSet) HasOutboundBodyMutators ¶
func (*ScopeSet) HasUpstreamBodyMutators ¶
func (*ScopeSet) MutateOutboundBodyChunk ¶
func (*ScopeSet) MutateOutboundRequest ¶
func (*ScopeSet) MutateUpstreamBodyChunk ¶
func (*ScopeSet) MutateUpstreamResponse ¶
func (*ScopeSet) RecoveryDecided ¶
func (*ScopeSet) RecoveryFinished ¶
func (*ScopeSet) RecoveryStarted ¶
func (*ScopeSet) RequestBodyChunk ¶
func (*ScopeSet) RequestBodyEnded ¶
func (*ScopeSet) RequestFinished ¶
func (*ScopeSet) RequestStarted ¶
func (*ScopeSet) RoundTripFinished ¶
func (*ScopeSet) RoundTripStarted ¶
func (*ScopeSet) SetRoundTrip ¶
func (*ScopeSet) UpstreamBodyChunk ¶
func (*ScopeSet) UpstreamBodyEnded ¶
func (*ScopeSet) UpstreamResponseStarted ¶
func (*ScopeSet) UpstreamStarted ¶
Click to show internal directories.
Click to hide internal directories.