wasm

package
v1.18.0-beta33 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WasmFilter_VmType_name = map[int32]string{
		0: "V8",
		1: "WAVM",
	}
	WasmFilter_VmType_value = map[string]int32{
		"V8":   0,
		"WAVM": 1,
	}
)

Enum value maps for WasmFilter_VmType.

View Source
var (
	FilterStage_Stage_name = map[int32]string{
		0: "FaultStage",
		1: "CorsStage",
		2: "WafStage",
		3: "AuthNStage",
		4: "AuthZStage",
		5: "RateLimitStage",
		6: "AcceptedStage",
		7: "OutAuthStage",
		8: "RouteStage",
	}
	FilterStage_Stage_value = map[string]int32{
		"FaultStage":     0,
		"CorsStage":      1,
		"WafStage":       2,
		"AuthNStage":     3,
		"AuthZStage":     4,
		"RateLimitStage": 5,
		"AcceptedStage":  6,
		"OutAuthStage":   7,
		"RouteStage":     8,
	}
)

Enum value maps for FilterStage_Stage.

View Source
var (
	FilterStage_Predicate_name = map[int32]string{
		0: "During",
		1: "Before",
		2: "After",
	}
	FilterStage_Predicate_value = map[string]int32{
		"During": 0,
		"Before": 1,
		"After":  2,
	}
)

Enum value maps for FilterStage_Predicate.

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_wasm_wasm_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FilterStage added in v1.2.13

type FilterStage struct {

	// stage of the filter chain in which the selected filter should be added
	Stage FilterStage_Stage `protobuf:"varint,1,opt,name=stage,proto3,enum=wasm.options.gloo.solo.io.FilterStage_Stage" json:"stage,omitempty"`
	// How this filter should be placed relative to the stage
	Predicate FilterStage_Predicate `protobuf:"varint,2,opt,name=predicate,proto3,enum=wasm.options.gloo.solo.io.FilterStage_Predicate" json:"predicate,omitempty"`
	// contains filtered or unexported fields
}

func (*FilterStage) Clone added in v1.8.24

func (m *FilterStage) Clone() proto.Message

Clone function

func (*FilterStage) Descriptor deprecated added in v1.2.13

func (*FilterStage) Descriptor() ([]byte, []int)

Deprecated: Use FilterStage.ProtoReflect.Descriptor instead.

func (*FilterStage) Equal added in v1.2.13

func (m *FilterStage) Equal(that interface{}) bool

Equal function

func (*FilterStage) GetPredicate added in v1.2.13

func (x *FilterStage) GetPredicate() FilterStage_Predicate

func (*FilterStage) GetStage added in v1.2.13

func (x *FilterStage) GetStage() FilterStage_Stage

func (*FilterStage) Hash deprecated added in v1.2.13

func (m *FilterStage) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*FilterStage) HashUnique

func (m *FilterStage) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*FilterStage) ProtoMessage added in v1.2.13

func (*FilterStage) ProtoMessage()

func (*FilterStage) ProtoReflect added in v1.6.0

func (x *FilterStage) ProtoReflect() protoreflect.Message

func (*FilterStage) Reset added in v1.2.13

func (x *FilterStage) Reset()

func (*FilterStage) String added in v1.2.13

func (x *FilterStage) String() string

type FilterStage_Predicate added in v1.2.13

type FilterStage_Predicate int32

During is the 0th member so that it is the default, even though the reading order can be a little confusing

const (
	FilterStage_During FilterStage_Predicate = 0
	FilterStage_Before FilterStage_Predicate = 1
	FilterStage_After  FilterStage_Predicate = 2
)

func (FilterStage_Predicate) Descriptor added in v1.6.0

func (FilterStage_Predicate) Enum added in v1.6.0

func (FilterStage_Predicate) EnumDescriptor deprecated added in v1.2.13

func (FilterStage_Predicate) EnumDescriptor() ([]byte, []int)

Deprecated: Use FilterStage_Predicate.Descriptor instead.

func (FilterStage_Predicate) Number added in v1.6.0

func (FilterStage_Predicate) String added in v1.2.13

func (x FilterStage_Predicate) String() string

func (FilterStage_Predicate) Type added in v1.6.0

type FilterStage_Stage added in v1.2.13

type FilterStage_Stage int32

list of filter stages which can be selected for a WASM filter

const (
	FilterStage_FaultStage     FilterStage_Stage = 0
	FilterStage_CorsStage      FilterStage_Stage = 1
	FilterStage_WafStage       FilterStage_Stage = 2
	FilterStage_AuthNStage     FilterStage_Stage = 3
	FilterStage_AuthZStage     FilterStage_Stage = 4
	FilterStage_RateLimitStage FilterStage_Stage = 5
	FilterStage_AcceptedStage  FilterStage_Stage = 6
	FilterStage_OutAuthStage   FilterStage_Stage = 7
	FilterStage_RouteStage     FilterStage_Stage = 8
)

func (FilterStage_Stage) Descriptor added in v1.6.0

func (FilterStage_Stage) Enum added in v1.6.0

func (FilterStage_Stage) EnumDescriptor deprecated added in v1.2.13

func (FilterStage_Stage) EnumDescriptor() ([]byte, []int)

Deprecated: Use FilterStage_Stage.Descriptor instead.

func (FilterStage_Stage) Number added in v1.6.0

func (FilterStage_Stage) String added in v1.2.13

func (x FilterStage_Stage) String() string

func (FilterStage_Stage) Type added in v1.6.0

type PluginSource

type PluginSource struct {

	// list of WASM filters to be added into the filter chain
	Filters []*WasmFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
	// contains filtered or unexported fields
}

Options config for WASM filters

func (*PluginSource) Clone added in v1.8.24

func (m *PluginSource) Clone() proto.Message

Clone function

func (*PluginSource) Descriptor deprecated

func (*PluginSource) Descriptor() ([]byte, []int)

Deprecated: Use PluginSource.ProtoReflect.Descriptor instead.

func (*PluginSource) Equal

func (m *PluginSource) Equal(that interface{}) bool

Equal function

func (*PluginSource) GetFilters added in v1.2.13

func (x *PluginSource) GetFilters() []*WasmFilter

func (*PluginSource) Hash deprecated added in v1.2.13

func (m *PluginSource) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*PluginSource) HashUnique

func (m *PluginSource) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*PluginSource) ProtoMessage

func (*PluginSource) ProtoMessage()

func (*PluginSource) ProtoReflect added in v1.6.0

func (x *PluginSource) ProtoReflect() protoreflect.Message

func (*PluginSource) Reset

func (x *PluginSource) Reset()

func (*PluginSource) String

func (x *PluginSource) String() string

type WasmFilter added in v1.2.13

type WasmFilter struct {

	// Types that are assignable to Src:
	//
	//	*WasmFilter_Image
	//	*WasmFilter_FilePath
	Src isWasmFilter_Src `protobuf_oneof:"src"`
	// Filter/service configuration used to configure or reconfigure a plugin
	// (proxy_on_configuration).
	// `google.protobuf.Struct` is serialized as JSON before
	// passing it to the plugin. `google.protobuf.BytesValue` and
	// `google.protobuf.StringValue` are passed directly without the wrapper.
	Config *anypb.Any `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// the stage in the filter chain where this filter should be placed
	FilterStage *FilterStage `protobuf:"bytes,4,opt,name=filter_stage,json=filterStage,proto3" json:"filter_stage,omitempty"`
	// the name of the filter, used for logging
	Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	// the root_id of the filter which should be run, if this value is incorrect, or
	// empty the filter will crash
	RootId string `protobuf:"bytes,6,opt,name=root_id,json=rootId,proto3" json:"root_id,omitempty"`
	// selected VM type
	VmType WasmFilter_VmType `` /* 129-byte string literal not displayed */
	// when true, bypass the filter if there is a fatal error on the VM; defaults to false
	FailOpen bool `protobuf:"varint,9,opt,name=fail_open,json=failOpen,proto3" json:"fail_open,omitempty"`
	// contains filtered or unexported fields
}

This message defines a single Envoy WASM filter to be placed into the filter chain

func (*WasmFilter) Clone added in v1.8.24

func (m *WasmFilter) Clone() proto.Message

Clone function

func (*WasmFilter) Descriptor deprecated added in v1.2.13

func (*WasmFilter) Descriptor() ([]byte, []int)

Deprecated: Use WasmFilter.ProtoReflect.Descriptor instead.

func (*WasmFilter) Equal added in v1.2.13

func (m *WasmFilter) Equal(that interface{}) bool

Equal function

func (*WasmFilter) GetConfig added in v1.2.13

func (x *WasmFilter) GetConfig() *anypb.Any

func (*WasmFilter) GetFailOpen added in v1.9.25

func (x *WasmFilter) GetFailOpen() bool

func (*WasmFilter) GetFilePath added in v1.6.0

func (x *WasmFilter) GetFilePath() string

func (*WasmFilter) GetFilterStage added in v1.2.13

func (x *WasmFilter) GetFilterStage() *FilterStage

func (*WasmFilter) GetImage added in v1.2.13

func (x *WasmFilter) GetImage() string

func (*WasmFilter) GetName added in v1.2.13

func (x *WasmFilter) GetName() string

func (*WasmFilter) GetRootId added in v1.2.13

func (x *WasmFilter) GetRootId() string

func (*WasmFilter) GetSrc added in v1.6.0

func (m *WasmFilter) GetSrc() isWasmFilter_Src

func (*WasmFilter) GetVmType added in v1.2.13

func (x *WasmFilter) GetVmType() WasmFilter_VmType

func (*WasmFilter) Hash deprecated added in v1.2.13

func (m *WasmFilter) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*WasmFilter) HashUnique

func (m *WasmFilter) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*WasmFilter) ProtoMessage added in v1.2.13

func (*WasmFilter) ProtoMessage()

func (*WasmFilter) ProtoReflect added in v1.6.0

func (x *WasmFilter) ProtoReflect() protoreflect.Message

func (*WasmFilter) Reset added in v1.2.13

func (x *WasmFilter) Reset()

func (*WasmFilter) String added in v1.2.13

func (x *WasmFilter) String() string

type WasmFilter_FilePath added in v1.6.0

type WasmFilter_FilePath struct {
	// path from which to load wasm filter from disk
	FilePath string `protobuf:"bytes,8,opt,name=file_path,json=filePath,proto3,oneof"`
}

type WasmFilter_Image added in v1.6.0

type WasmFilter_Image struct {
	// name of image which houses the compiled wasm filter
	Image string `protobuf:"bytes,2,opt,name=image,proto3,oneof"`
}

type WasmFilter_VmType added in v1.2.13

type WasmFilter_VmType int32

represents the different types of WASM VMs available with which envoy can run the WASM filter module

const (
	WasmFilter_V8   WasmFilter_VmType = 0
	WasmFilter_WAVM WasmFilter_VmType = 1
)

func (WasmFilter_VmType) Descriptor added in v1.6.0

func (WasmFilter_VmType) Enum added in v1.6.0

func (WasmFilter_VmType) EnumDescriptor deprecated added in v1.2.13

func (WasmFilter_VmType) EnumDescriptor() ([]byte, []int)

Deprecated: Use WasmFilter_VmType.Descriptor instead.

func (WasmFilter_VmType) Number added in v1.6.0

func (WasmFilter_VmType) String added in v1.2.13

func (x WasmFilter_VmType) String() string

func (WasmFilter_VmType) Type added in v1.6.0

Jump to

Keyboard shortcuts

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