remotefilter

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package remotefilter implements the RemoteFilter filter to invokes remote apis.

Index

Constants

View Source
const (
	// Kind is the kind of RemoteFilter.
	Kind = "RemoteFilter"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteFilter

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

RemoteFilter is the filter making remote service acting like internal filter.

func (*RemoteFilter) Close

func (rf *RemoteFilter) Close()

Close closes RemoteFilter.

func (*RemoteFilter) Handle

func (rf *RemoteFilter) Handle(ctx *context.Context) (result string)

Handle handles Context by calling remote service.

func (*RemoteFilter) Inherit

func (rf *RemoteFilter) Inherit(previousGeneration filters.Filter)

Inherit inherits previous generation of RemoteFilter.

func (*RemoteFilter) Init

func (rf *RemoteFilter) Init()

Init initializes RemoteFilter.

func (*RemoteFilter) Kind

func (rf *RemoteFilter) Kind() *filters.Kind

Kind returns the kind of RemoteFilter.

func (*RemoteFilter) Name

func (rf *RemoteFilter) Name() string

Name returns the name of the RemoteFilter filter instance.

func (*RemoteFilter) Spec

func (rf *RemoteFilter) Spec() filters.Spec

Spec returns the spec used by the RemoteFilter

func (*RemoteFilter) Status

func (rf *RemoteFilter) Status() interface{}

Status returns status.

type Spec

type Spec struct {
	filters.BaseSpec `json:",inline"`

	URL     string `json:"url" jsonschema:"required,format=uri"`
	Timeout string `json:"timeout,omitempty" jsonschema:"format=duration"`
	// contains filtered or unexported fields
}

Spec describes RemoteFilter.

Jump to

Keyboard shortcuts

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