Class VmConfig
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.wasm.v3.VmConfig
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,VmConfigOrBuilder,Serializable
public final class VmConfig
extends com.google.protobuf.GeneratedMessageV3
implements VmConfigOrBuilder
Configuration for a Wasm VM. [#next-free-field: 8]Protobuf type
envoy.extensions.wasm.v3.VmConfig- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for a Wasm VM.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanAllow the wasm file to include pre-compiled code on VMs which support it. .. warning:: This should only be enabled for trusted sources as the precompiled code is not verified.getCode()The Wasm code that Envoy will execute.The Wasm code that Envoy will execute.com.google.protobuf.AnyThe Wasm configuration used in initialization of a new VM (``proxy_on_start``).com.google.protobuf.AnyOrBuilderThe Wasm configuration used in initialization of a new VM (``proxy_on_start``).static VmConfigstatic final com.google.protobuf.Descriptors.DescriptorSpecifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.booleanIf true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter warming state.com.google.protobuf.Parser<VmConfig>The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.com.google.protobuf.ByteStringThe Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.intgetVmId()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.com.google.protobuf.ByteStringAn 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.booleanhasCode()The Wasm code that Envoy will execute.booleanThe Wasm configuration used in initialization of a new VM (``proxy_on_start``).booleanSpecifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic VmConfig.Builderstatic VmConfig.BuildernewBuilder(VmConfig prototype) protected VmConfig.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static VmConfigparseDelimitedFrom(InputStream input) static VmConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static VmConfigparseFrom(byte[] data) static VmConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static VmConfigparseFrom(com.google.protobuf.ByteString data) static VmConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static VmConfigparseFrom(com.google.protobuf.CodedInputStream input) static VmConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static VmConfigparseFrom(InputStream input) static VmConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static VmConfigparseFrom(ByteBuffer data) static VmConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<VmConfig>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
VM_ID_FIELD_NUMBER
public static final int VM_ID_FIELD_NUMBER- See Also:
-
RUNTIME_FIELD_NUMBER
public static final int RUNTIME_FIELD_NUMBER- See Also:
-
CODE_FIELD_NUMBER
public static final int CODE_FIELD_NUMBER- See Also:
-
CONFIGURATION_FIELD_NUMBER
public static final int CONFIGURATION_FIELD_NUMBER- See Also:
-
ALLOW_PRECOMPILED_FIELD_NUMBER
public static final int ALLOW_PRECOMPILED_FIELD_NUMBER- See Also:
-
NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER
public static final int NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER- See Also:
-
ENVIRONMENT_VARIABLES_FIELD_NUMBER
public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getVmId
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. [#comment: TODO: add ref for details.]
string vm_id = 1;- Specified by:
getVmIdin interfaceVmConfigOrBuilder- Returns:
- The vmId.
-
getVmIdBytes
public com.google.protobuf.ByteString getVmIdBytes()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. [#comment: TODO: add ref for details.]
string vm_id = 1;- Specified by:
getVmIdBytesin interfaceVmConfigOrBuilder- Returns:
- The bytes for vmId.
-
getRuntime
The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time. The priority to search for the available engine is: v8 -> wasmtime -> wamr. Available Wasm runtime types are registered as extensions. The following runtimes are included in Envoy code base: .. _extension_envoy.wasm.runtime.null: **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the Envoy binary. The registered name is given in the ``code`` field as ``inline_string``. .. _extension_envoy.wasm.runtime.v8: **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime. .. _extension_envoy.wasm.runtime.wamr: **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime. This runtime is not enabled in the official build. .. _extension_envoy.wasm.runtime.wasmtime: **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime. This runtime is not enabled in the official build. [#extension-category: envoy.wasm.runtime]
string runtime = 2;- Specified by:
getRuntimein interfaceVmConfigOrBuilder- Returns:
- The runtime.
-
getRuntimeBytes
public com.google.protobuf.ByteString getRuntimeBytes()The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time. The priority to search for the available engine is: v8 -> wasmtime -> wamr. Available Wasm runtime types are registered as extensions. The following runtimes are included in Envoy code base: .. _extension_envoy.wasm.runtime.null: **envoy.wasm.runtime.null**: Null sandbox, the Wasm module must be compiled and linked into the Envoy binary. The registered name is given in the ``code`` field as ``inline_string``. .. _extension_envoy.wasm.runtime.v8: **envoy.wasm.runtime.v8**: `V8 <https://v8.dev/>`_-based WebAssembly runtime. .. _extension_envoy.wasm.runtime.wamr: **envoy.wasm.runtime.wamr**: `WAMR <https://github.com/bytecodealliance/wasm-micro-runtime/>`_-based WebAssembly runtime. This runtime is not enabled in the official build. .. _extension_envoy.wasm.runtime.wasmtime: **envoy.wasm.runtime.wasmtime**: `Wasmtime <https://wasmtime.dev/>`_-based WebAssembly runtime. This runtime is not enabled in the official build. [#extension-category: envoy.wasm.runtime]
string runtime = 2;- Specified by:
getRuntimeBytesin interfaceVmConfigOrBuilder- Returns:
- The bytes for runtime.
-
hasCode
public boolean hasCode()The Wasm code that Envoy will execute.
.envoy.config.core.v3.AsyncDataSource code = 3;- Specified by:
hasCodein interfaceVmConfigOrBuilder- Returns:
- Whether the code field is set.
-
getCode
The Wasm code that Envoy will execute.
.envoy.config.core.v3.AsyncDataSource code = 3;- Specified by:
getCodein interfaceVmConfigOrBuilder- Returns:
- The code.
-
getCodeOrBuilder
The Wasm code that Envoy will execute.
.envoy.config.core.v3.AsyncDataSource code = 3;- Specified by:
getCodeOrBuilderin interfaceVmConfigOrBuilder
-
hasConfiguration
public boolean hasConfiguration()The Wasm configuration used in initialization of a new VM (``proxy_on_start``). ``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.
.google.protobuf.Any configuration = 4;- Specified by:
hasConfigurationin interfaceVmConfigOrBuilder- Returns:
- Whether the configuration field is set.
-
getConfiguration
public com.google.protobuf.Any getConfiguration()The Wasm configuration used in initialization of a new VM (``proxy_on_start``). ``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.
.google.protobuf.Any configuration = 4;- Specified by:
getConfigurationin interfaceVmConfigOrBuilder- Returns:
- The configuration.
-
getConfigurationOrBuilder
public com.google.protobuf.AnyOrBuilder getConfigurationOrBuilder()The Wasm configuration used in initialization of a new VM (``proxy_on_start``). ``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.
.google.protobuf.Any configuration = 4;- Specified by:
getConfigurationOrBuilderin interfaceVmConfigOrBuilder
-
getAllowPrecompiled
public boolean getAllowPrecompiled()Allow the wasm file to include pre-compiled code on VMs which support it. .. warning:: This should only be enabled for trusted sources as the precompiled code is not verified.
bool allow_precompiled = 5;- Specified by:
getAllowPrecompiledin interfaceVmConfigOrBuilder- Returns:
- The allowPrecompiled.
-
getNackOnCodeCacheMiss
public boolean getNackOnCodeCacheMiss()If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration update and do a background fetch to fill the cache, otherwise fetch the code asynchronously and enter warming state.
bool nack_on_code_cache_miss = 6;- Specified by:
getNackOnCodeCacheMissin interfaceVmConfigOrBuilder- Returns:
- The nackOnCodeCacheMiss.
-
hasEnvironmentVariables
public boolean hasEnvironmentVariables()Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are generally called implicitly by your language's standard library. Therefore, you do not need to call them directly. You can access environment variables in the same way you would on native platforms. .. warning:: Envoy rejects the configuration if there's conflict of key space.
.envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;- Specified by:
hasEnvironmentVariablesin interfaceVmConfigOrBuilder- Returns:
- Whether the environmentVariables field is set.
-
getEnvironmentVariables
Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are generally called implicitly by your language's standard library. Therefore, you do not need to call them directly. You can access environment variables in the same way you would on native platforms. .. warning:: Envoy rejects the configuration if there's conflict of key space.
.envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;- Specified by:
getEnvironmentVariablesin interfaceVmConfigOrBuilder- Returns:
- The environmentVariables.
-
getEnvironmentVariablesOrBuilder
Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls. Note that these functions are generally called implicitly by your language's standard library. Therefore, you do not need to call them directly. You can access environment variables in the same way you would on native platforms. .. warning:: Envoy rejects the configuration if there's conflict of key space.
.envoy.extensions.wasm.v3.EnvironmentVariables environment_variables = 7;- Specified by:
getEnvironmentVariablesOrBuilderin interfaceVmConfigOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static VmConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VmConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VmConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VmConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VmConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static VmConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static VmConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static VmConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static VmConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected VmConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-