Interface VmConfigOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
VmConfig, VmConfig.Builder

public interface VmConfigOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    The Wasm code that Envoy will execute.
    The Wasm code that Envoy will execute.
    com.google.protobuf.Any
    The Wasm configuration used in initialization of a new VM (``proxy_on_start``).
    com.google.protobuf.AnyOrBuilder
    The Wasm configuration used in initialization of a new VM (``proxy_on_start``).
    Specifies 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.
    boolean
    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.
    The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
    com.google.protobuf.ByteString
    The Wasm runtime type, defaults to the first available Wasm engine used at Envoy build-time.
    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.ByteString
    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.
    boolean
    The Wasm code that Envoy will execute.
    boolean
    The Wasm configuration used in initialization of a new VM (``proxy_on_start``).
    boolean
    Specifies environment variables to be injected to this VM which will be available through WASI's ``environ_get`` and ``environ_get_sizes`` system calls.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getVmId

      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;
      Returns:
      The vmId.
    • getVmIdBytes

      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;
      Returns:
      The bytes for vmId.
    • getRuntime

      String 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;
      Returns:
      The runtime.
    • getRuntimeBytes

      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;
      Returns:
      The bytes for runtime.
    • hasCode

      boolean hasCode()
       The Wasm code that Envoy will execute.
       
      .envoy.config.core.v3.AsyncDataSource code = 3;
      Returns:
      Whether the code field is set.
    • getCode

      AsyncDataSource getCode()
       The Wasm code that Envoy will execute.
       
      .envoy.config.core.v3.AsyncDataSource code = 3;
      Returns:
      The code.
    • getCodeOrBuilder

      AsyncDataSourceOrBuilder getCodeOrBuilder()
       The Wasm code that Envoy will execute.
       
      .envoy.config.core.v3.AsyncDataSource code = 3;
    • hasConfiguration

      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;
      Returns:
      Whether the configuration field is set.
    • getConfiguration

      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;
      Returns:
      The configuration.
    • getConfigurationOrBuilder

      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;
    • getAllowPrecompiled

      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;
      Returns:
      The allowPrecompiled.
    • getNackOnCodeCacheMiss

      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;
      Returns:
      The nackOnCodeCacheMiss.
    • hasEnvironmentVariables

      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;
      Returns:
      Whether the environmentVariables field is set.
    • getEnvironmentVariables

      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 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;
      Returns:
      The environmentVariables.
    • getEnvironmentVariablesOrBuilder

      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 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;