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
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# Protection from SYN flood attack. | |
net.ipv4.tcp_syncookies = 1 | |
# See evil packets in your logs. | |
#net.ipv4.conf.all.log_martians = 1 | |
# Disable packet forwarding. |
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
{ | |
"cluster_name" : "logging-search", | |
"nodes" : { | |
"gpObg-oHQ4e_B8XeprCi1w" : { | |
"timestamp" : 1408566038068, | |
"name" : "Vibraxas", | |
"transport_address" : "inet[/10.x.x.x:9300]", | |
"hostname" : "foo", | |
"indices" : { | |
"docs" : { |
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 ( | |
"fmt" | |
"time" | |
"github.com/myodc/go-micro/registry" | |
) | |
func do() { |
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" | |
"flag" | |
"fmt" | |
"net/http" | |
"net/url" | |
"os" | |
"runtime" |
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 ( | |
"github.com/gorilla/handlers" | |
"github.com/gorilla/mux" | |
"net/http" | |
"os" | |
"strings" | |
"text/template" | |
) |
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
$ go run micro/main.go get service go.micro.srv.greeter | |
service go.micro.srv.greeter | |
version 1.0.0 | |
Id Address Port Metadata | |
go.micro.srv.greeter-4b0fe9f5-8612-11e5-9965-68a86d0d36b6 192.168.1.64 55576 | |
version 1.0.2 |
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 ( | |
"fmt" | |
h "github.com/grpc/grpc-common/go/helloworld" | |
"github.com/myodc/go-micro/client" | |
"golang.org/x/net/context" | |
) |
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
const ( | |
Error MessageType = iota | |
Request | |
Response | |
Publication | |
) | |
type Codec interface { | |
Encoder | |
Decoder |
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 kv | |
import ( | |
"errors" | |
consul "github.com/hashicorp/consul/api" | |
) | |
type consulKV struct { | |
Client *consul.Client |
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 ( | |
"fmt" | |
"github.com/micro/go-micro/registry" | |
) | |
func main() { | |
w, err := registry.Watch() | |
if err != nil { |