Echo Handler
Overview
EchoHandler
is an simple echo handler.
It returns the request information.
It works as:
HTTP Handler
Config yaml format becomes like below. And the resource specific spec is defined in in the proto format shown in the Resource Definition.
apiVersion: app/v1
kind: EchoHandler
metadata:
name: "default"
namespace: "default"
spec: {}
Features
1. Request information response
Echo handler respond the requet information.
Resource Definition
EchoHandler is defined in the proto/app/v1/handler/echo.proto
syntax = "proto3";
package app.v1;
import "core/v1/http.proto";
import "kernel/resource.proto";
option go_package = "github.com/aileron-gateway/aileron-gateway/apis/app/v1";
// EchoHandler resource definition.
// apiVersion="app/v1", kind="EchoHandler".
message EchoHandler {
string APIVersion = 1 [json_name = "apiVersion"];
string Kind = 2 [json_name = "kind"];
kernel.Metadata Metadata = 3 [json_name = "metadata"];
EchoHandlerSpec Spec = 4 [json_name = "spec"];
}
// EchoHandlerSpec is the specifications for the EchoHandler object.
message EchoHandlerSpec {
// [OPTIONAL]
// Patterns is path patterns that this handler
// is registered to a server.
// Default is not set, or empty string ["/"].
repeated string Patterns = 1 [json_name = "patterns"];
// [OPTIONA]
// Methods is the list of HTTP method this handler can handle.
// Note that it depends on the multiplexer, or HTTP router,
// that the server uses if this field is used or not.
// Default multiplexer does not use this field.
// Default is not set.
repeated core.v1.HTTPMethod Methods = 2 [json_name = "methods"];
}
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.