Documentation ¶
Index ¶
- Constants
- func CreateEchoFilterFactory(conf map[string]interface{}) (api.StreamFilterChainFactory, error)
- type EchoFilter
- func (f *EchoFilter) Append(ctx context.Context, headers api.HeaderMap, buf buffer.IoBuffer, ...) api.StreamFilterStatus
- func (f *EchoFilter) Log(ctx context.Context, reqHeaders api.HeaderMap, respHeaders api.HeaderMap, ...)
- func (f *EchoFilter) OnDestroy()
- func (f *EchoFilter) OnReceive(ctx context.Context, headers api.HeaderMap, buf buffer.IoBuffer, ...) api.StreamFilterStatus
- func (f *EchoFilter) SetReceiveFilterHandler(handler api.StreamReceiverFilterHandler)
- func (f *EchoFilter) SetSenderFilterHandler(handler api.StreamSenderFilterHandler)
- type FilterConfigFactory
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) 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) 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
Click to show internal directories.
Click to hide internal directories.