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
# get it | |
docker pull mongo | |
# startup a 3 node replica set | |
docker run --name mongo-rs-1 -d mongo --nojournal --oplogSize 10 --replSet rs | |
docker run --name mongo-rs-2 -d mongo --nojournal --oplogSize 10 --replSet rs | |
docker run --name mongo-rs-3 -d mongo --nojournal --oplogSize 10 --replSet rs | |
# connect to first node | |
docker run -it --link mongo-rs-1:mongo1 --link mongo-rs-2:mongo2 --link mongo-rs-3:mongo3 --rm mongo /bin/bash |
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 utils | |
import "crypto/cipher" | |
type ecb struct { | |
b cipher.Block | |
blockSize int | |
} | |
func newECB(b cipher.Block) *ecb { |