Documentation
¶
Index ¶
- Constants
- func DirectInvokeHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func EventLogHandler(w http.ResponseWriter, r *http.Request, ...)
- func Execute(w http.ResponseWriter, r *http.Request, sandbox rapidcore.LambdaInvokeAPI)
- func InitHandler(w http.ResponseWriter, r *http.Request, sandbox InteropServer, ...)
- func InternalStateHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func InvokeHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func NewHTTPRouter(ipcSrv InteropServer, lambdaInvokeAPI rapidcore.LambdaInvokeAPI, ...) *chi.Mux
- func PingHandler(w http.ResponseWriter, r *http.Request)
- func ReserveHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func ResetHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func RestoreHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func ShutdownHandler(w http.ResponseWriter, r *http.Request, s InteropServer, ...)
- func WaitUntilInitializedHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- func WaitUntilReleaseHandler(w http.ResponseWriter, r *http.Request, s InteropServer)
- type ErrorReply
- type ErrorType
- type FailureReply
- type InitBody
- type InitRequest
- type InteropServer
- type Reply
- type ResponseWriterProxy
- type RestoreBody
- type RuntimeErrorReply
- type RuntimeInfo
- type SuccessReply
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 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
type InitRequest ¶
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 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) WriteHeader ¶
func (w *ResponseWriterProxy) WriteHeader(statusCode int)
type RestoreBody ¶
type RuntimeErrorReply ¶
type RuntimeErrorReply struct {
Payload []byte
}
func (*RuntimeErrorReply) Send ¶
func (e *RuntimeErrorReply) Send(w http.ResponseWriter, r *http.Request)
type RuntimeInfo ¶
type SuccessReply ¶
type SuccessReply struct {
Body []byte
}
func (*SuccessReply) Send ¶
func (s *SuccessReply) Send(w http.ResponseWriter, r *http.Request)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.