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 typeenvoy.extensions.wasm.v3.VmConfig- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVmConfig.BuilderConfiguration for a Wasm VM.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOW_PRECOMPILED_FIELD_NUMBERstatic intCODE_FIELD_NUMBERstatic intCONFIGURATION_FIELD_NUMBERstatic intENVIRONMENT_VARIABLES_FIELD_NUMBERstatic intNACK_ON_CODE_CACHE_MISS_FIELD_NUMBERstatic intRUNTIME_FIELD_NUMBERstatic intVM_ID_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)booleangetAllowPrecompiled()Allow the wasm file to include pre-compiled code on VMs which support it.AsyncDataSourcegetCode()The Wasm code that Envoy will execute.AsyncDataSourceOrBuildergetCodeOrBuilder()The Wasm code that Envoy will execute.com.google.protobuf.AnygetConfiguration()The Wasm configuration used in initialization of a new VM (proxy_on_start).com.google.protobuf.AnyOrBuildergetConfigurationOrBuilder()The Wasm configuration used in initialization of a new VM (proxy_on_start).static VmConfiggetDefaultInstance()VmConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()EnvironmentVariablesgetEnvironmentVariables()Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.EnvironmentVariablesOrBuildergetEnvironmentVariablesOrBuilder()Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.booleangetNackOnCodeCacheMiss()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.com.google.protobuf.Parser<VmConfig>getParserForType()StringgetRuntime()The Wasm runtime type.com.google.protobuf.ByteStringgetRuntimeBytes()The Wasm runtime type.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()StringgetVmId()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.ByteStringgetVmIdBytes()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.booleanhasCode()The Wasm code that Envoy will execute.booleanhasConfiguration()The Wasm configuration used in initialization of a new VM (proxy_on_start).booleanhasEnvironmentVariables()Specifies 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.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static VmConfig.BuildernewBuilder()static VmConfig.BuildernewBuilder(VmConfig prototype)VmConfig.BuildernewBuilderForType()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()VmConfig.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
VM_ID_FIELD_NUMBER
public static final int VM_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RUNTIME_FIELD_NUMBER
public static final int RUNTIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CODE_FIELD_NUMBER
public static final int CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONFIGURATION_FIELD_NUMBER
public static final int CONFIGURATION_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALLOW_PRECOMPILED_FIELD_NUMBER
public static final int ALLOW_PRECOMPILED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER
public static final int NACK_ON_CODE_CACHE_MISS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENVIRONMENT_VARIABLES_FIELD_NUMBER
public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin 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
public String 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
public String getRuntime()
The Wasm runtime type. 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.wavm: **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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 [(.validate.rules) = { ... }- Specified by:
getRuntimein interfaceVmConfigOrBuilder- Returns:
- The runtime.
-
getRuntimeBytes
public com.google.protobuf.ByteString getRuntimeBytes()
The Wasm runtime type. 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.wavm: **envoy.wasm.runtime.wavm**: `WAVM <https://wavm.github.io/>`_-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 [(.validate.rules) = { ... }- 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
public AsyncDataSource getCode()
The Wasm code that Envoy will execute.
.envoy.config.core.v3.AsyncDataSource code = 3;- Specified by:
getCodein interfaceVmConfigOrBuilder- Returns:
- The code.
-
getCodeOrBuilder
public AsyncDataSourceOrBuilder 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 enable 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 mostly implicitly called in your language's standard library, so you do not need to call them directly and you can access to env vars just like when you do 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
public EnvironmentVariables 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 mostly implicitly called in your language's standard library, so you do not need to call them directly and you can access to env vars just like when you do 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
public EnvironmentVariablesOrBuilder 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 mostly implicitly called in your language's standard library, so you do not need to call them directly and you can access to env vars just like when you do 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
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- 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
public boolean equals(Object obj)
- 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
public static VmConfig parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static VmConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static VmConfig parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static VmConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static VmConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static VmConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public VmConfig.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static VmConfig.Builder newBuilder()
-
newBuilder
public static VmConfig.Builder newBuilder(VmConfig prototype)
-
toBuilder
public VmConfig.Builder 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
public static VmConfig getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<VmConfig> parser()
-
getParserForType
public com.google.protobuf.Parser<VmConfig> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public VmConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-