Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResponseForVerb ¶
func ResponseForVerb(sch *schema.Schema, verb *schema.Verb, response HTTPResponse) ([]byte, http.Header, error)
ResponseForVerb returns the HTTP response for a given verb.
func Start ¶
func Start(ctx context.Context, config Config, schemaEventSource schemaeventsource.EventSource, client routing.CallClient, timelineClient *timeline.Client) error
Start the HTTP ingress service. Blocks until the context is cancelled.
Types ¶
type Config ¶
type Config struct { Bind *url.URL `help:"Socket to bind to for ingress." default:"http://127.0.0.1:8891" env:"FTL_BIND"` AllowOrigins []*url.URL `help:"Allow CORS requests to ingress endpoints from these origins." env:"FTL_INGRESS_ALLOW_ORIGIN"` AllowHeaders []string `help:"Allow these headers in CORS requests. (Requires AllowOrigins)" env:"FTL_INGRESS_ALLOW_HEADERS"` }
type HTTPResponse ¶
type HTTPResponse struct { Status int `json:"status,omitempty"` Headers map[string][]string `json:"headers,omitempty"` Body json.RawMessage `json:"body,omitempty"` Error json.RawMessage `json:"error,omitempty"` }
HTTPResponse mirrors builtins.HttpResponse.
Click to show internal directories.
Click to hide internal directories.