wa-lang.org/wazero@v1.0.2/imports/proxywasm/internal/abi_hostcalls.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 //export proxy_log 20 func ProxyLog(logLevel LogLevel, messageData *byte, messageSize int) Status 21 22 //export proxy_send_local_response 23 func ProxySendLocalResponse(statusCode uint32, statusCodeDetailData *byte, statusCodeDetailsSize int, 24 bodyData *byte, bodySize int, headersData *byte, headersSize int, grpcStatus int32) Status 25 26 //export proxy_get_shared_data 27 func ProxyGetSharedData(keyData *byte, keySize int, returnValueData **byte, returnValueSize *int, returnCas *uint32) Status 28 29 //export proxy_set_shared_data 30 func ProxySetSharedData(keyData *byte, keySize int, valueData *byte, valueSize int, cas uint32) Status 31 32 //export proxy_register_shared_queue 33 func ProxyRegisterSharedQueue(nameData *byte, nameSize int, returnID *uint32) Status 34 35 //export proxy_resolve_shared_queue 36 func ProxyResolveSharedQueue(vmIDData *byte, vmIDSize int, nameData *byte, nameSize int, returnID *uint32) Status 37 38 //export proxy_dequeue_shared_queue 39 func ProxyDequeueSharedQueue(queueID uint32, returnValueData **byte, returnValueSize *int) Status 40 41 //export proxy_enqueue_shared_queue 42 func ProxyEnqueueSharedQueue(queueID uint32, valueData *byte, valueSize int) Status 43 44 //export proxy_get_header_map_value 45 func ProxyGetHeaderMapValue(mapType MapType, keyData *byte, keySize int, returnValueData **byte, returnValueSize *int) Status 46 47 //export proxy_add_header_map_value 48 func ProxyAddHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status 49 50 //export proxy_replace_header_map_value 51 func ProxyReplaceHeaderMapValue(mapType MapType, keyData *byte, keySize int, valueData *byte, valueSize int) Status 52 53 //export proxy_remove_header_map_value 54 func ProxyRemoveHeaderMapValue(mapType MapType, keyData *byte, keySize int) Status 55 56 //export proxy_get_header_map_pairs 57 func ProxyGetHeaderMapPairs(mapType MapType, returnValueData **byte, returnValueSize *int) Status 58 59 //export proxy_set_header_map_pairs 60 func ProxySetHeaderMapPairs(mapType MapType, mapData *byte, mapSize int) Status 61 62 //export proxy_get_buffer_bytes 63 func ProxyGetBufferBytes(bufferType BufferType, start int, maxSize int, returnBufferData **byte, returnBufferSize *int) Status 64 65 //export proxy_set_buffer_bytes 66 func ProxySetBufferBytes(bufferType BufferType, start int, maxSize int, bufferData *byte, bufferSize int) Status 67 68 //export proxy_continue_stream 69 func ProxyContinueStream(streamType StreamType) Status 70 71 //export proxy_close_stream 72 func ProxyCloseStream(streamType StreamType) Status 73 74 //export proxy_http_call 75 func ProxyHttpCall(upstreamData *byte, upstreamSize int, headerData *byte, headerSize int, 76 bodyData *byte, bodySize int, trailersData *byte, trailersSize int, timeout uint32, calloutIDPtr *uint32, 77 ) Status 78 79 //export proxy_call_foreign_function 80 func ProxyCallForeignFunction(funcNamePtr *byte, funcNameSize int, paramPtr *byte, paramSize int, returnData **byte, returnSize *int) Status 81 82 //export proxy_set_tick_period_milliseconds 83 func ProxySetTickPeriodMilliseconds(period uint32) Status 84 85 //export proxy_set_effective_context 86 func ProxySetEffectiveContext(contextID uint32) Status 87 88 //export proxy_done 89 func ProxyDone() Status 90 91 //export proxy_define_metric 92 func ProxyDefineMetric(metricType MetricType, metricNameData *byte, metricNameSize int, returnMetricIDPtr *uint32) Status 93 94 //export proxy_increment_metric 95 func ProxyIncrementMetric(metricID uint32, offset int64) Status 96 97 //export proxy_record_metric 98 func ProxyRecordMetric(metricID uint32, value uint64) Status 99 100 //export proxy_get_metric 101 func ProxyGetMetric(metricID uint32, returnMetricValue *uint64) Status 102 103 //export proxy_get_property 104 func ProxyGetProperty(pathData *byte, pathSize int, returnValueData **byte, returnValueSize *int) Status 105 106 //export proxy_set_property 107 func ProxySetProperty(pathData *byte, pathSize int, valueData *byte, valueSize int) Status