Documentation
¶
Overview ¶
Package runtimesdk provides the developer kit for building third-party Fenced Runtimes conforming to fenced.runtime.interface/v1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerToHTTP ¶
func HandlerToHTTP(h LifecycleHandler) http.Handler
HandlerToHTTP creates an http.Handler serving the fenced.runtime.interface/v1 specification from a LifecycleHandler implementation.
func Serve ¶
func Serve(h LifecycleHandler, addr string) error
Serve starts an HTTP server for the given LifecycleHandler on the specified address.
Types ¶
type LifecycleHandler ¶
type LifecycleHandler interface {
Health(ctx context.Context) (agent.HealthResponse, error)
Start(ctx context.Context, req agent.StartRequest) (agent.StartResponse, error)
Event(ctx context.Context, executionID string, after int64) (agent.EventList, error)
Result(ctx context.Context, executionID string) (agent.Result, error)
Checkpoint(ctx context.Context, executionID string) (agent.CheckpointResponse, error)
Restore(ctx context.Context, req agent.RestoreRequest) (agent.RestoreResponse, error)
Stop(ctx context.Context, executionID string) (agent.StopResponse, error)
}
LifecycleHandler defines the 7 explicit lifecycle methods a third-party runtime implements: health / start / event / result / checkpoint / restore / stop.
Click to show internal directories.
Click to hide internal directories.