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
// Requires cfgBytes.txt to contain output of GET /api/cfg | |
// Run as: go run parseCfg.go | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" |
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
// Steps to run: | |
// Spin off a couchbase cluster (1 node: DATA + SEARCH), create travel-sample, adjust host, port info in agent.go | |
// 1. export CBAUTH_REVRPC_URL=http://Administrator:asdasd@localhost:9000/cbft | |
// 2. go run agent.go | |
package main | |
import ( | |
"crypto/tls" | |
"encoding/json" |
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
// Steps to run: | |
// Spin off a couchbase cluster (1 node: DATA + SEARCH), create travel-sample, adjust host, port info in agent.go | |
// 1. export CBAUTH_REVRPC_URL=http://Administrator:asdasd@localhost:9000/cbft | |
// 2. go run agent.go | |
package main | |
import ( | |
"encoding/json" | |
"fmt" |
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 command should set the index up for you.. | |
curl -XPUT -H "Content-type: Application/json" http://<username>:<password>@<ip>:8094/api/index/demo_index -d @temp.json | |
This should be the content of temp.json.. | |
{ | |
"name": "demo_index", | |
"type": "fulltext-index", | |
"params": { | |
"mapping": { |
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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"time" | |
) |
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
package size | |
import ( | |
// "fmt" | |
"reflect" | |
) | |
var registryStatic map[string]int | |
var registryDynamic map[string][]dynamicSizeFunc |