syntax = "proto3";
import "validate/validate.proto";
message Person {
uint64 id = 1 [(validate.rules).uint64.gt = 999];
string email = 2 [(validate.rules).string.email = true];
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void ios_on_headers(envoy_headers headers, bool end_stream, void *context) { | |
// reconstituted callback. | |
ios_context *c = (ios_context *)context; | |
EnvoyHTTPCallbacks *callbacks = c->callbacks; | |
// dispatching to user-provided dispatch queue. | |
dispatch_async(callbacks.dispatchQueue, ^{ | |
if (!dispatchable(c->closed, end_stream) || !callbacks.onHeaders) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static envoy_data buffer_to_native_data(JNIEnv* env, jobject data) { | |
// keep reference in the JNI. | |
jobject j_data = env->NewGlobalRef(data); | |
envoy_data native_data; | |
native_data.bytes = static_cast<uint8_t*>(env->GetDirectBufferAddress(j_data)); | |
native_data.length = env->GetDirectBufferCapacity(j_data); | |
// releasing function and context that Envoy can trigger. | |
native_data.release = jni_delete_global_ref; | |
native_data.context = j_data; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin: | |
access_log_path: /dev/null | |
address: | |
socket_address: | |
protocol: TCP | |
address: 127.0.0.1 | |
port_value: 8081 | |
static_resources: | |
listeners: | |
- address: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a collection of useful dot files to setup a good environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username@mips:~/mips_source gcc <*.s> -o <output name> | |
username@mips:~/mips_source gdb <output name> | |
-----GBD OUTPUT----- | |
(gdb) b main ----create a breakpoint---- | |
(gdb) run ----run the program---- | |
Breakpoint 1, 0x00400654 in main () | |
(gdb) set step-mode on ----be able to step through | |
(gdb) disas ----show dissasembly | |
Dump of assembler code for function main: | |
-----GDB DISSASEMBLY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks to Brian Ho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks to Marc Rosen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks to Peter H. Frohlich |
NewerOlder