interceptor

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultOrder = 900

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled    *bool         `yaml:"enabled,omitempty"`
	Name       string        `yaml:"name,omitempty"`
	Type       string        `yaml:"type,omitempty" validate:"required"`
	Properties cfg.CommonCfg `yaml:",inline"`
}

func MergeInterceptorList added in v1.3.0

func MergeInterceptorList(base []*Config, from []*Config) []*Config

MergeInterceptorList merge interceptor lists with defaults. The interceptor will distinguish whether to merge or not according to the UID() by name and type.

func (*Config) DeepCopy added in v1.4.0

func (c *Config) DeepCopy() *Config

func (*Config) GetExtension added in v1.3.0

func (c *Config) GetExtension() (*ExtensionConfig, error)

func (*Config) Merge added in v1.3.0

func (c *Config) Merge(from *Config)

func (*Config) SetBelongTo added in v1.3.0

func (c *Config) SetBelongTo(belongTo []string)

func (*Config) UID added in v1.3.0

func (c *Config) UID() string

type Extension

type Extension interface {
	Order() int
	BelongTo() (componentTypes []string)
	IgnoreRetry() bool
}

type ExtensionConfig

type ExtensionConfig struct {
	Order       int      `yaml:"order,omitempty" default:"900"`
	BelongTo    []string `yaml:"belongTo,omitempty"`
	IgnoreRetry bool     `yaml:"ignoreRetry,omitempty" default:"true"`
}

type SortableInterceptor

type SortableInterceptor []api.Interceptor

func (SortableInterceptor) Len

func (si SortableInterceptor) Len() int

func (SortableInterceptor) Less

func (si SortableInterceptor) Less(i, j int) bool

func (SortableInterceptor) Swap

func (si SortableInterceptor) Swap(i, j int)

Jump to

Keyboard shortcuts

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