You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
3.3 KiB
89 lines
3.3 KiB
syntax = "proto3"; |
|
|
|
package envoy.extensions.wasm.v3; |
|
|
|
import "envoy/config/core/v3/base.proto"; |
|
|
|
import "google/protobuf/any.proto"; |
|
|
|
import "udpa/annotations/versioning.proto"; |
|
|
|
import "validate/validate.proto"; |
|
|
|
option java_package = "io.envoyproxy.envoy.extensions.wasm.v3"; |
|
option java_outer_classname = "WasmProto"; |
|
option java_multiple_files = true; |
|
|
|
// [#protodoc-title: Wasm service] |
|
|
|
// Configuration for a Wasm VM. |
|
// [#next-free-field: 6] |
|
// [#not-implemented-hide:] pending implementation. |
|
message VmConfig { |
|
option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.VmConfig"; |
|
|
|
// An ID which will be used along with a hash of the wasm code (or the name of the registered Null |
|
// VM plugin) 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. Sharing a VM between plugins can |
|
// reduce memory utilization and make sharing of data easier which may have security implications. |
|
// See ref: "TODO: add ref" for details. |
|
string vm_id = 1; |
|
|
|
// The Wasm runtime type (either "v8" or "null" for code compiled into Envoy). |
|
string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; |
|
|
|
// The Wasm code that Envoy will execute. |
|
config.core.v3.AsyncDataSource code = 3; |
|
|
|
// The Wasm configuration used in initialization of a new VM (proxy_on_start). |
|
google.protobuf.Any configuration = 4; |
|
|
|
// Allow the wasm file to include pre-compiled code on VMs which support it. |
|
// Warning: this should only be enable for trusted sources as the precompiled code is not |
|
// verified. |
|
bool allow_precompiled = 5; |
|
} |
|
|
|
// Base Configuration for Wasm Plugins e.g. filters and services. |
|
// [#next-free-field: 6] |
|
// [#not-implemented-hide:] pending implementation. |
|
message PluginConfig { |
|
option (udpa.annotations.versioning).previous_message_type = |
|
"envoy.config.wasm.v2alpha.PluginConfig"; |
|
|
|
// A unique name for a filters/services in a VM for use in identifying the filter/service if |
|
// multiple filters/services are handled by the same *vm_id* and *group_name* and for |
|
// logging/debugging. |
|
string name = 1; |
|
|
|
// 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 group_name with the same *vm_id* will share Context(s). |
|
string group_name = 2; |
|
|
|
// Configuration for finding or starting VM. |
|
oneof vm_config { |
|
VmConfig inline_vm_config = 3; |
|
// In the future add referential VM configurations. |
|
} |
|
|
|
// Filter/service configuration used to configure or reconfigure a plugin |
|
// (proxy_on_configuration). |
|
google.protobuf.Any configuration = 5; |
|
} |
|
|
|
// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig |
|
// <envoy_api_msg_extensions.wasm.v3.WasmService>`. This opaque configuration will be used to |
|
// create a Wasm Service. |
|
// [#not-implemented-hide:] pending implementation. |
|
message WasmService { |
|
option (udpa.annotations.versioning).previous_message_type = |
|
"envoy.config.wasm.v2alpha.WasmService"; |
|
|
|
// General plugin configuration. |
|
PluginConfig config = 1; |
|
|
|
// If true, create a single VM rather than creating one VM per worker. Such a singleton can |
|
// not be used with filters. |
|
bool singleton = 2; |
|
}
|
|
|