This file contains hidden or 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
| package websocket | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "testing" | |
| ) |
This file contains hidden or 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
| package pools | |
| import ( | |
| "sync" | |
| "time" | |
| ) | |
| var timerPool sync.Pool | |
| // AcquireTimer returns time from pool if possible. |
This file contains hidden or 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
| package main | |
| // Proof of eventual consistency of Redis PUBSUB CHANNELS * command. | |
| import ( | |
| "fmt" | |
| "strconv" | |
| "time" | |
| "github.com/garyburd/redigo/redis" |
This file contains hidden or 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
| func BenchmarkSubscribe(b *testing.B) { | |
| c := dial() | |
| defer c.close() | |
| num := 100000 | |
| batchSize := RedisSubscribeBatchLimit | |
| b.ResetTimer() | |
| for i := 0; i < b.N; i++ { | |
| j := 0 |
This file contains hidden or 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
| /* sockjs-client v1.1.1 | http://sockjs.org | MIT license */ | |
| !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.SockJS=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
| (function (global){ | |
| 'use strict'; | |
| var transportList = require('./transport-list'); | |
| module.exports = require('./main')(transportList); | |
| // TODO can't get rid |
This file contains hidden or 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
| package apiv1 | |
| import ( | |
| "encoding/json" | |
| "testing" | |
| "github.com/buger/jsonparser" | |
| "github.com/centrifugal/centrifugo/libcentrifugo/proto" | |
| "github.com/centrifugal/centrifugo/libcentrifugo/raw" | |
| "github.com/tidwall/gjson" |
This file contains hidden or 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
| package fasthttpserver | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "sync" | |
| "github.com/FZambia/go-logger" | |
| "github.com/centrifugal/centrifugo/libcentrifugo/api/v1" | |
| "github.com/centrifugal/centrifugo/libcentrifugo/node" |
This file contains hidden or 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
| var native = function () { | |
| var initialized = false; | |
| return { | |
| restore: function () { | |
| if (initialized) { | |
| return; | |
| } | |
| initialized = true; |
This file contains hidden or 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
| package libcentrifugo | |
| import ( | |
| "encoding/json" | |
| "strings" | |
| "github.com/FZambia/go-logger" | |
| "github.com/tidwall/redcon" | |
| ) |
This file contains hidden or 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
| package main | |
| import ( | |
| "bytes" | |
| "errors" | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "golang.org/x/crypto/openpgp/armor" |