Documentation
¶
Index ¶
- Constants
- type APIAggregator
- func (aa *APIAggregator) Close()
- func (aa *APIAggregator) DefaultSpec() interface{}
- func (aa *APIAggregator) Description() string
- func (aa *APIAggregator) Handle(ctx context.HTTPContext) (result string)
- func (aa *APIAggregator) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
- func (aa *APIAggregator) Init(filterSpec *httppipeline.FilterSpec)
- func (aa *APIAggregator) Kind() string
- func (aa *APIAggregator) Results() []string
- func (aa *APIAggregator) Status() interface{}
- type Pipeline
- type Spec
Constants ¶
View Source
const (
// Kind is the kind of APIAggregator.
Kind = "APIAggregator"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIAggregator ¶
type APIAggregator struct {
// contains filtered or unexported fields
}
APIAggregator is a filter to aggregate several HTTP API responses.
func (*APIAggregator) DefaultSpec ¶
func (aa *APIAggregator) DefaultSpec() interface{}
DefaultSpec returns default spec of APIAggregator.
func (*APIAggregator) Description ¶
func (aa *APIAggregator) Description() string
Description returns the description of APIAggregator.
func (*APIAggregator) Handle ¶
func (aa *APIAggregator) Handle(ctx context.HTTPContext) (result string)
Handle limits HTTPContext.
func (*APIAggregator) Inherit ¶
func (aa *APIAggregator) Inherit(filterSpec *httppipeline.FilterSpec, previousGeneration httppipeline.Filter)
Inherit inherits previous generation of APIAggregator.
func (*APIAggregator) Init ¶
func (aa *APIAggregator) Init(filterSpec *httppipeline.FilterSpec)
Init initializes APIAggregator.
func (*APIAggregator) Kind ¶
func (aa *APIAggregator) Kind() string
Kind returns the kind of APIAggregator.
func (*APIAggregator) Results ¶
func (aa *APIAggregator) Results() []string
Results returns the results of APIAggregator.
type Pipeline ¶ added in v1.2.0
type Pipeline struct {
// Name is the name of pipeline in EG
Name string `yaml:"name" jsonschema:"required"`
// Method is the HTTP method for requesting this pipeline.
Method string `yaml:"method" jsonschema:"omitempty,format=httpmethod"`
// Path is the HTTP request path adaptor for requesting this pipeline.
Path *pathadaptor.Spec `yaml:"path,omitempty" jsonschema:"omitempty"`
// Header is the HTTP header adaptor for requestring this pipeline.
Header *httpheader.AdaptSpec `yaml:"header,omitempty" jsonschema:"omitempty"`
// DisableBody discart this pipeline's response body if it set to true.
DisableBody bool `yaml:"disableBody" jsonschema:"omitempty"`
// contains filtered or unexported fields
}
Pipeline is the single API HTTP Pipeline in default namespace.
type Spec ¶
type Spec struct {
// MaxBodyBytes in [0, 10MB]
MaxBodyBytes int64 `yaml:"maxBodyBytes" jsonschema:"omitempty,minimum=0,maximum=102400"`
// PartialSucceed indicates wether Whether regards the result of the original request as successful
// or not when a request to some of the API pipelines fails.
PartialSucceed bool `yaml:"partialSucceed"`
// Timeout is the request duration for each APIs.
Timeout string `yaml:"timeout" jsonschema:"omitempty,format=duration"`
// MergeResponse indicates whether to merge JSON response bodies or not.
MergeResponse bool `yaml:"mergeResponse"`
// User describes HTTP service target via an existing Pipeline.
Pipelines []*Pipeline `yaml:"pipelines" jsonschema:"required"`
// contains filtered or unexported fields
}
Spec is APIAggregator's spec.
Click to show internal directories.
Click to hide internal directories.