wa-lang.org/wazero@v1.0.2/imports/proxywasm/internal/abi_callback_test_export.go (about) 1 // Copyright 2020-2021 Tetrate 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 //go:build !tinygo 16 17 package internal 18 19 import "wa-lang.org/wazero/imports/proxywasm/types" 20 21 // this file exists only for proxytest package, therefore, these functions are not included in a resulting Wasm binary. 22 23 func ProxyOnVMStart(pluginContextID uint32, vmConfigurationSize int) types.OnVMStartStatus { 24 return proxyOnVMStart(pluginContextID, vmConfigurationSize) 25 } 26 27 func ProxyOnConfigure(pluginContextID uint32, vmConfigurationSize int) types.OnPluginStartStatus { 28 return proxyOnConfigure(pluginContextID, vmConfigurationSize) 29 } 30 31 func ProxyOnNewConnection(contextID uint32) types.Action { 32 return proxyOnNewConnection(contextID) 33 } 34 35 func ProxyOnDownstreamData(contextID uint32, dataSize int, endOfStream bool) types.Action { 36 return proxyOnDownstreamData(contextID, dataSize, endOfStream) 37 } 38 39 func ProxyOnDownstreamConnectionClose(contextID uint32, pType types.PeerType) { 40 proxyOnDownstreamConnectionClose(contextID, pType) 41 } 42 43 func ProxyOnUpstreamData(contextID uint32, dataSize int, endOfStream bool) types.Action { 44 return proxyOnUpstreamData(contextID, dataSize, endOfStream) 45 } 46 47 func ProxyOnUpstreamConnectionClose(contextID uint32, pType types.PeerType) { 48 proxyOnUpstreamConnectionClose(contextID, pType) 49 } 50 51 func ProxyOnRequestHeaders(contextID uint32, numHeaders int, endOfStream bool) types.Action { 52 return proxyOnRequestHeaders(contextID, numHeaders, endOfStream) 53 } 54 55 func ProxyOnRequestBody(contextID uint32, bodySize int, endOfStream bool) types.Action { 56 return proxyOnRequestBody(contextID, bodySize, endOfStream) 57 } 58 59 func ProxyOnRequestTrailers(contextID uint32, numTrailers int) types.Action { 60 return proxyOnRequestTrailers(contextID, numTrailers) 61 } 62 63 func ProxyOnResponseHeaders(contextID uint32, numHeaders int, endOfStream bool) types.Action { 64 return proxyOnResponseHeaders(contextID, numHeaders, endOfStream) 65 } 66 67 func ProxyOnResponseBody(contextID uint32, bodySize int, endOfStream bool) types.Action { 68 return proxyOnResponseBody(contextID, bodySize, endOfStream) 69 } 70 71 func ProxyOnResponseTrailers(contextID uint32, numTrailers int) types.Action { 72 return proxyOnResponseTrailers(contextID, numTrailers) 73 } 74 75 func ProxyOnHttpCallResponse(pluginContextID, calloutID uint32, numHeaders, bodySize, numTrailers int) { 76 proxyOnHttpCallResponse(pluginContextID, calloutID, numHeaders, bodySize, numTrailers) 77 } 78 79 func ProxyOnContextCreate(contextID uint32, pluginContextID uint32) { 80 proxyOnContextCreate(contextID, pluginContextID) 81 } 82 83 func ProxyOnDone(contextID uint32) bool { 84 return proxyOnDone(contextID) 85 } 86 87 func ProxyOnLog(pluginContextID uint32) { 88 proxyOnLog(pluginContextID) 89 } 90 91 func ProxyOnQueueReady(contextID, queueID uint32) { 92 proxyOnQueueReady(contextID, queueID) 93 } 94 95 func ProxyOnTick(pluginContextID uint32) { 96 proxyOnTick(pluginContextID) 97 } 98 99 func ProxyOnDelete(contextID uint32) { 100 proxyOnDelete(contextID) 101 }