Skip to content

Instantly share code, notes, and snippets.

View mbroadst's full-sized avatar
💭
I may be slow to respond.

Matt Broadstone mbroadst

💭
I may be slow to respond.
View GitHub Profile
use async_trait::async_trait;
use pingora_core::server::Server;
use pingora_core::services::listening::Service;
use pingora_core::upstreams::peer::HttpPeer; // Note: L4 usually doesn't need this
use tokio::net::TcpStream;
use pingora_core::Result;
use pingora_core::modules::Module;
// 1. Define the L4 Proxy Service
pub struct L4Proxy {
diff --git a/src/mongo/transport/asio/asio_session_impl.cpp b/src/mongo/transport/asio/asio_session_impl.cpp
index dd0bef9f0a8..7a4bd6e4160 100644
--- a/src/mongo/transport/asio/asio_session_impl.cpp
+++ b/src/mongo/transport/asio/asio_session_impl.cpp
@@ -46,6 +46,9 @@
#include "mongo/util/net/socket_utils.h"
#include "mongo/util/signal_handlers_synchronous.h"
+#include "mongo/util/concurrency/ticketholder.h"
+#include "mongo/db/admission/ticketholder_manager.h"
'use strict';
function createCommandOptions(manager, localOptions) {
const options = Object.assign(
{
host: 'defaultHost',
port: 27017,
connectionTimeoutMS: 5000,
socketTimeoutMS: 0,
pool: 1,
const mongodb = require('mongodb');
const MongoClient = mongodb.MongoClient;
const expect = require('chai').expect;
const MongoNetworkError = mongodb.MongoNetworkError;
const testContext = {};
describe('Beta Examples (transactions)', function() {
before(function() {
testContext.url = 'mongodb://localhost:27017/test?replicaSet=rs0';
return MongoClient.connect(testContext.url)
const mongodb = require('mongodb');
const MongoClient = mongodb.MongoClient;
const expect = require('chai').expect;
const MongoNetworkError = mongodb.MongoNetworkError;
const testContext = {};
describe('Beta Examples (transactions)', function() {
before(function() {
testContext.url = 'mongodb://localhost:27017/test?replicaSet=rs0';
return MongoClient.connect(testContext.url)
module testlib [system] {
header "test-library-shim.h"
link "testlib"
export *
}
static NAN_METHOD(Test) {
// do some work
DoReturn(info);
}
void DoReturn(const Nan::FunctionCallbackInfo<v8::Value> &info) {
info.GetReturnValue().Set(5555);
}
From b8965640622e2b649503b67faf88b9acba23bba6 Mon Sep 17 00:00:00 2001
From: Matt Broadstone <mbroadst@gmail.com>
Date: Mon, 11 Apr 2016 09:43:16 -0400
Subject: [PATCH 4/4] remove no-registry flag for npm install
---
mk/support/pkg/npm-pkg.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mk/support/pkg/npm-pkg.inc b/mk/support/pkg/npm-pkg.inc
d /run/rethinkdb 0755 rethinkdb rethinkdb -
[Unit]
Description=RethinkDB database server for instance '%i'
[Service]
User=rethinkdb
Group=rethinkdb
ExecStart=/usr/bin/rethinkdb serve --config-file /etc/rethinkdb/instances.d/%i.conf
KillMode=process
PrivateTmp=true