インフラ開発で使えるデザインパターンを雑に集めるページ。 パターン名は適当。
- エラーが起こったら余計なことはせずに即座にエラーメッセージを出力して終了すること。
- エラー処理の基本。
bpf-sample: bpf-sample.c | |
gcc -Wall -Wextra -o bpf-sample bpf-sample.c |
package com.ynojima.utilization; | |
import com.sun.jna.Library; | |
import com.sun.jna.Native; | |
import com.sun.jna.Structure; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; |
#include <chrono> | |
#include <cstdint> | |
#include <iostream> | |
#include <google/protobuf/io/coded_stream.h> | |
#include <google/protobuf/io/zero_copy_stream_impl.h> | |
#include <msgpack.hpp> | |
#include "test_msgpack.h" | |
#include "test.pb.h" | |
static const size_t MSGPACK_OUTPUT_BUFFER_RESERVE_SIZE = 271319041; |
#!/usr/bin/python [18/651] | |
''' | |
Pretty printer of LTSV. | |
How to use: | |
$ alias ltsvless='LESSOPEN="||=/path/to/ltsvpipe %s" less' | |
$ ltsvless /path/to/something.ltsv | |
''' |
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c | |
index a869e74..78b5305 100644 | |
--- a/src/http/modules/ngx_http_proxy_module.c | |
+++ b/src/http/modules/ngx_http_proxy_module.c | |
@@ -220,6 +220,7 @@ static ngx_conf_bitmask_t ngx_http_proxy_next_upstream_masks[] = { | |
{ ngx_string("http_403"), NGX_HTTP_UPSTREAM_FT_HTTP_403 }, | |
{ ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 }, | |
{ ngx_string("updating"), NGX_HTTP_UPSTREAM_FT_UPDATING }, | |
+ { ngx_string("before_send"), NGX_HTTP_UPSTREAM_FT_BEFORE_SEND }, | |
{ ngx_string("off"), NGX_HTTP_UPSTREAM_FT_OFF }, |