Documentation ¶
Overview ¶
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FaultInjection ¶ added in v0.3.0
type FaultInjection struct { // Embed the default plugin here, // so that we don't need to reimplement all the methods. plugin.DefaultPlugin }
FaultInjection is used in the benchmark
func (*FaultInjection) Name ¶ added in v0.3.0
func (p *FaultInjection) Name() string
func (*FaultInjection) ParseConf ¶ added in v0.3.0
func (p *FaultInjection) ParseConf(in []byte) (interface{}, error)
func (*FaultInjection) RequestFilter ¶ added in v0.4.0
func (p *FaultInjection) RequestFilter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)
type FaultInjectionConf ¶ added in v0.3.0
type LimitReq ¶ added in v0.2.0
type LimitReq struct { // Embed the default plugin here, // so that we don't need to reimplement all the methods. plugin.DefaultPlugin }
LimitReq is a demo for a real world plugin
func (*LimitReq) ParseConf ¶ added in v0.2.0
ParseConf is called when the configuration is changed. And its output is unique per route.
func (*LimitReq) RequestFilter ¶ added in v0.4.0
func (p *LimitReq) RequestFilter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)
RequestFilter is called when a request hits the route
type LimitReqConf ¶ added in v0.2.0
type ResponseRewrite ¶ added in v0.4.0
type ResponseRewrite struct { // Embed the default plugin here, // so that we don't need to reimplement all the methods. plugin.DefaultPlugin }
ResponseRewrite is a demo to show how to rewrite response data.
func (*ResponseRewrite) Name ¶ added in v0.4.0
func (p *ResponseRewrite) Name() string
func (*ResponseRewrite) ParseConf ¶ added in v0.4.0
func (p *ResponseRewrite) ParseConf(in []byte) (interface{}, error)
func (*ResponseRewrite) ResponseFilter ¶ added in v0.4.0
func (p *ResponseRewrite) ResponseFilter(conf interface{}, w pkgHTTP.Response)
type ResponseRewriteConf ¶ added in v0.4.0
type Say ¶
type Say struct { // Embed the default plugin here, // so that we don't need to reimplement all the methods. plugin.DefaultPlugin }
Say is a demo to show how to return data directly instead of proxying it to the upstream.
func (*Say) RequestFilter ¶ added in v0.4.0
func (p *Say) RequestFilter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)