config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginConfig

type PluginConfig struct {
	// A unique name for a filters/services in a VM for use in identifiying the filter/service if
	// multiple filters/services are handled by the same vm_id and root_id and for logging/debugging.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// A unique ID for a set of filters/services in a VM which will share a RootContext and Contexts
	// if applicable (e.g. an Wasm HttpFilter and an Wasm AccessLog). If left blank, all
	// filters/services with a blank root_id with the same vm_id will share Context(s).
	RootId string `protobuf:"bytes,2,opt,name=root_id,json=rootId,proto3" json:"root_id,omitempty"`
	// Configuration for finding or starting VM.
	VmConfig *VmConfig `protobuf:"bytes,3,opt,name=vm_config,json=vmConfig,proto3" json:"vm_config,omitempty"`
	// Filter/service configuration string e.g. a serialized protobuf which will be the
	// argument to the proxy_onConfigure() call.
	Configuration        string   `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Base Configuration for Wasm Plugins, e.g. filters and services.

func (*PluginConfig) Descriptor

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

func (*PluginConfig) GetConfiguration

func (m *PluginConfig) GetConfiguration() string

func (*PluginConfig) GetName

func (m *PluginConfig) GetName() string

func (*PluginConfig) GetRootId

func (m *PluginConfig) GetRootId() string

func (*PluginConfig) GetVmConfig

func (m *PluginConfig) GetVmConfig() *VmConfig

func (*PluginConfig) Hash added in v1.2.13

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

Hash function

func (*PluginConfig) ProtoMessage

func (*PluginConfig) ProtoMessage()

func (*PluginConfig) Reset

func (m *PluginConfig) Reset()

func (*PluginConfig) String

func (m *PluginConfig) String() string

func (*PluginConfig) XXX_DiscardUnknown

func (m *PluginConfig) XXX_DiscardUnknown()

func (*PluginConfig) XXX_Marshal

func (m *PluginConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PluginConfig) XXX_Merge

func (m *PluginConfig) XXX_Merge(src proto.Message)

func (*PluginConfig) XXX_Size

func (m *PluginConfig) XXX_Size() int

func (*PluginConfig) XXX_Unmarshal

func (m *PluginConfig) XXX_Unmarshal(b []byte) error

type VmConfig

type VmConfig struct {
	// An ID which will be used along with a hash of the wasm code (or null_vm_id) to determine which
	// VM will be used for the plugin. All plugins which use the same vm_id and code will use the same
	// VM. May be left blank.
	VmId string `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
	// The Wasm runtime type (see source/extensions/commmon/wasm/well_known_names.h).
	Runtime string `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"`
	// The Wasm code that Envoy will execute.
	Code *core.AsyncDataSource `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
	// The Wasm configuration string used on initialization of a new VM (proxy_onStart).
	Configuration string `protobuf:"bytes,4,opt,name=configuration,proto3" json:"configuration,omitempty"`
	// Allow the wasm file to include pre-compiled code on VMs which support it.
	AllowPrecompiled     bool     `protobuf:"varint,5,opt,name=allow_precompiled,json=allowPrecompiled,proto3" json:"allow_precompiled,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Configuration for a Wasm VM. [#next-free-field: 6]

func (*VmConfig) Descriptor

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

func (*VmConfig) GetAllowPrecompiled

func (m *VmConfig) GetAllowPrecompiled() bool

func (*VmConfig) GetCode

func (m *VmConfig) GetCode() *core.AsyncDataSource

func (*VmConfig) GetConfiguration

func (m *VmConfig) GetConfiguration() string

func (*VmConfig) GetRuntime

func (m *VmConfig) GetRuntime() string

func (*VmConfig) GetVmId

func (m *VmConfig) GetVmId() string

func (*VmConfig) Hash added in v1.2.13

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

Hash function

func (*VmConfig) ProtoMessage

func (*VmConfig) ProtoMessage()

func (*VmConfig) Reset

func (m *VmConfig) Reset()

func (*VmConfig) String

func (m *VmConfig) String() string

func (*VmConfig) XXX_DiscardUnknown

func (m *VmConfig) XXX_DiscardUnknown()

func (*VmConfig) XXX_Marshal

func (m *VmConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VmConfig) XXX_Merge

func (m *VmConfig) XXX_Merge(src proto.Message)

func (*VmConfig) XXX_Size

func (m *VmConfig) XXX_Size() int

func (*VmConfig) XXX_Unmarshal

func (m *VmConfig) XXX_Unmarshal(b []byte) error

type WasmService

type WasmService struct {
	// General plugin configuration.
	Config *PluginConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// If true, create a single VM rather than creating one VM per silo. Such a singleton can
	// not be used with filters.
	Singleton bool `protobuf:"varint,2,opt,name=singleton,proto3" json:"singleton,omitempty"`
	// If set add 'stat_prefix' as a prefix to all stats.
	StatPrefix           string   `protobuf:"bytes,3,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

WasmService is configured as a built-in *envoy.wasm_service* `ServiceConfig (envoy_api_msg_config.wasm.v2.ServiceConfig)`. This opaque configuration will be used to create a Wasm Service.

func (*WasmService) Descriptor

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

func (*WasmService) GetConfig

func (m *WasmService) GetConfig() *PluginConfig

func (*WasmService) GetSingleton

func (m *WasmService) GetSingleton() bool

func (*WasmService) GetStatPrefix

func (m *WasmService) GetStatPrefix() string

func (*WasmService) Hash added in v1.2.13

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

Hash function

func (*WasmService) ProtoMessage

func (*WasmService) ProtoMessage()

func (*WasmService) Reset

func (m *WasmService) Reset()

func (*WasmService) String

func (m *WasmService) String() string

func (*WasmService) XXX_DiscardUnknown

func (m *WasmService) XXX_DiscardUnknown()

func (*WasmService) XXX_Marshal

func (m *WasmService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WasmService) XXX_Merge

func (m *WasmService) XXX_Merge(src proto.Message)

func (*WasmService) XXX_Size

func (m *WasmService) XXX_Size() int

func (*WasmService) XXX_Unmarshal

func (m *WasmService) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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