echo

package
v0.0.0-...-c876855 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Echo = "echo"
)

Stream Filter's Type

Variables

This section is empty.

Functions

func CreateEchoFilterFactory

func CreateEchoFilterFactory(conf map[string]interface{}) (api.StreamFilterChainFactory, error)

CreateEchoFilterFactory for create echo filter factory

Types

type EchoFilter

type EchoFilter struct {
	// contains filtered or unexported fields
}

func NewEchoFilter

func NewEchoFilter(f *FilterConfigFactory) *EchoFilter

NewEchoFilter used to create new echo filter

func (*EchoFilter) Append

func (f *EchoFilter) Append(ctx context.Context, headers api.HeaderMap, buf buffer.IoBuffer, trailers api.HeaderMap) api.StreamFilterStatus

func (*EchoFilter) Log

func (f *EchoFilter) Log(ctx context.Context, reqHeaders api.HeaderMap, respHeaders api.HeaderMap, requestInfo api.RequestInfo)

func (*EchoFilter) OnDestroy

func (f *EchoFilter) OnDestroy()

func (*EchoFilter) OnReceive

func (f *EchoFilter) OnReceive(ctx context.Context, headers api.HeaderMap, buf buffer.IoBuffer, trailers api.HeaderMap) api.StreamFilterStatus

func (*EchoFilter) SetReceiveFilterHandler

func (f *EchoFilter) SetReceiveFilterHandler(handler api.StreamReceiverFilterHandler)

func (*EchoFilter) SetSenderFilterHandler

func (f *EchoFilter) SetSenderFilterHandler(handler api.StreamSenderFilterHandler)

type FilterConfigFactory

type FilterConfigFactory struct {
	Status  int               `json:"status"`
	Body    string            `json:"body"`
	Headers map[string]string `json:"header_list"`
}

FilterConfigFactory ... FilterConfigFactory filter config factory

func (*FilterConfigFactory) CreateFilterChain

func (f *FilterConfigFactory) CreateFilterChain(context context.Context, callbacks api.StreamFilterChainFactoryCallbacks)

CreateFilterChain for create echo filter

Jump to

Keyboard shortcuts

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