apiaggregator

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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 the entity to complete rate limiting.

func (*APIAggregator) Close

func (aa *APIAggregator) Close()

Close closes APIAggregator.

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(pipeSpec *httppipeline.FilterSpec,
	previousGeneration httppipeline.Filter, super *supervisor.Supervisor)

Inherit inherits previous generation of APIAggregator.

func (*APIAggregator) Init

func (aa *APIAggregator) Init(pipeSpec *httppipeline.FilterSpec, super *supervisor.Supervisor)

Init initializes APIAggregator.

func (*APIAggregator) InjectMuxMapper added in v1.0.1

func (aa *APIAggregator) InjectMuxMapper(mapper protocol.MuxMapper)

InjectMuxMapper injects mux mapper into 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.

func (*APIAggregator) Status

func (aa *APIAggregator) Status() interface{}

Status returns status.

type APIProxy

type APIProxy struct {
	// HTTPProxy's name in EG
	HTTPProxyName string `yaml:"httpProxyName" jsonschema:"required"`

	// Describes details about the request-target
	Method      string                `yaml:"method" jsonschema:"omitempty,format=httpmethod"`
	Path        *pathadaptor.Spec     `yaml:"path,omitempty" jsonschema:"omitempty"`
	Header      *httpheader.AdaptSpec `yaml:"header,omitempty" jsonschema:"omitempty"`
	DisableBody bool                  `yaml:"disableBody" jsonschema:"omitempty"`
	// contains filtered or unexported fields
}

APIProxy describes the single API in EG's HTTPProxy object.

type Spec

type Spec struct {
	// MaxBodyBytes in [0, 10MB]
	MaxBodyBytes   int64  `yaml:"maxBodyBytes" jsonschema:"omitempty,minimum=0,maximum=102400"`
	PartialSucceed bool   `yaml:"partialSucceed"`
	Timeout        string `yaml:"timeout" jsonschema:"omitempty,format=duration"`
	MergeResponse  bool   `yaml:"mergeResponse"`

	// User describes HTTP service target via an existing HTTPProxy
	APIProxies []*APIProxy `yaml:"apiProxies" jsonschema:"required"`
	// contains filtered or unexported fields
}

Spec describes APIAggregator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL