standalone

package
v0.0.0-...-bef5c4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ReservationTokenHeader = "Reservation-Token"
	InvokeIDHeader         = "Invoke-ID"
	VersionIDHeader        = "Version-ID"
)
View Source
const (
	DoneFailedHTTPCode = 502
)

Variables

This section is empty.

Functions

func DirectInvokeHandler

func DirectInvokeHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func EventLogHandler

func EventLogHandler(w http.ResponseWriter, r *http.Request, eventsAPI *telemetry.StandaloneEventsAPI)

func Execute

func Execute(w http.ResponseWriter, r *http.Request, sandbox rapidcore.LambdaInvokeAPI)

func InitHandler

func InitHandler(w http.ResponseWriter, r *http.Request, sandbox InteropServer, bs interop.Bootstrap)

func InternalStateHandler

func InternalStateHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func InvokeHandler

func InvokeHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func NewHTTPRouter

func NewHTTPRouter(ipcSrv InteropServer, lambdaInvokeAPI rapidcore.LambdaInvokeAPI, eventsAPI *telemetry.StandaloneEventsAPI, shutdownFunc context.CancelFunc, bs interop.Bootstrap) *chi.Mux

func PingHandler

func PingHandler(w http.ResponseWriter, r *http.Request)

func ReserveHandler

func ReserveHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func ResetHandler

func ResetHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func RestoreHandler

func RestoreHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func ShutdownHandler

func ShutdownHandler(w http.ResponseWriter, r *http.Request, s InteropServer, shutdownFunc context.CancelFunc)

func WaitUntilInitializedHandler

func WaitUntilInitializedHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

func WaitUntilReleaseHandler

func WaitUntilReleaseHandler(w http.ResponseWriter, r *http.Request, s InteropServer)

Types

type ErrorReply

type ErrorReply struct {
	model.ErrorResponse
}

func (*ErrorReply) Send

func (e *ErrorReply) Send(w http.ResponseWriter, r *http.Request)

type ErrorType

type ErrorType int
const (
	ClientInvalidRequest ErrorType = iota
)

func (ErrorType) String

func (t ErrorType) String() string

type FailureReply

type FailureReply struct {
	Body []byte
}

func (*FailureReply) Send

func (s *FailureReply) Send(w http.ResponseWriter, r *http.Request)

type InitBody

type InitBody struct {
	Handler         string      `json:"handler"`
	FunctionName    string      `json:"functionName"`
	FunctionVersion string      `json:"functionVersion"`
	InvokeTimeoutMs int64       `json:"invokeTimeoutMs"`
	RuntimeInfo     RuntimeInfo `json:"runtimeInfo"`
	Customer        struct {
		Environment map[string]string `json:"environment"`
	} `json:"customer"`
	AwsKey            *string   `json:"awskey"`
	AwsSecret         *string   `json:"awssecret"`
	AwsSession        *string   `json:"awssession"`
	CredentialsExpiry time.Time `json:"credentialsExpiry"`
	Throttled         bool      `json:"throttled"`
}

TODO: introduce suppress init flag

func (*InitBody) Validate

func (c *InitBody) Validate() error

type InitRequest

type InitRequest struct {
	InitBody
	ReplyChan chan Reply
}

type InteropServer

type InteropServer interface {
	Init(i *interop.Init, invokeTimeoutMs int64) error
	AwaitInitialized() error
	FastInvoke(w http.ResponseWriter, i *interop.Invoke, direct bool) error
	Reserve(id string, traceID, lambdaSegmentID string) (*rapidcore.ReserveResponse, error)
	Reset(reason string, timeoutMs int64) (*statejson.ResetDescription, error)
	AwaitRelease() (*statejson.ReleaseResponse, error)
	Shutdown(shutdown *interop.Shutdown) *statejson.InternalStateDescription
	InternalState() (*statejson.InternalStateDescription, error)
	CurrentToken() *interop.Token
	Restore(restore *interop.Restore) (interop.RestoreResult, error)
}

type Reply

type Reply interface {
	Send(http.ResponseWriter, *http.Request)
}

type ResponseWriterProxy

type ResponseWriterProxy struct {
	Body       []byte
	StatusCode int
	// contains filtered or unexported fields
}

func (*ResponseWriterProxy) Header

func (w *ResponseWriterProxy) Header() http.Header

func (*ResponseWriterProxy) IsError

func (w *ResponseWriterProxy) IsError() bool

func (*ResponseWriterProxy) Write

func (w *ResponseWriterProxy) Write(b []byte) (int, error)

func (*ResponseWriterProxy) WriteHeader

func (w *ResponseWriterProxy) WriteHeader(statusCode int)

type RestoreBody

type RestoreBody struct {
	AwsKey               string    `json:"awskey"`
	AwsSecret            string    `json:"awssecret"`
	AwsSession           string    `json:"awssession"`
	CredentialsExpiry    time.Time `json:"credentialsExpiry"`
	RestoreHookTimeoutMs int64     `json:"restoreHookTimeoutMs"`
}

type RuntimeErrorReply

type RuntimeErrorReply struct {
	Payload []byte
}

func (*RuntimeErrorReply) Send

type RuntimeInfo

type RuntimeInfo struct {
	ImageJSON string `json:"runtimeImageJSON,omitempty"`
	Arn       string `json:"runtimeArn,omitempty"`
	Version   string `json:"runtimeVersion,omitempty"`
}

type SuccessReply

type SuccessReply struct {
	Body []byte
}

func (*SuccessReply) Send

func (s *SuccessReply) Send(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL