Skip to content

Instantly share code, notes, and snippets.

View nguyenthang98's full-sized avatar
😀
Working

Nguyễn Đức Thắng nguyenthang98

😀
Working
  • Viet Nam
View GitHub Profile
#!/bin/bash
LIST_INDICES=$(curl -s http://localhost:9200/_cat/indices/logstash-\* | awk '$2=="open"{print $3}' | sort)
echo "Current opening indices: "
for index in $LIST_INDICES
do
echo -e "\t$index"
done
package main
import stan "github.com/nats-io/stan.go"
import "github.com/nats-io/nats.go"
import "fmt"
func main() {
nc, err := nats.Connect("tls://localhost:4443", nats.ClientCert("/client-cert.pem", "/client-key.pem"), nats.RootCAs("/client-cert.pem"))
if err != nil {
fmt.Printf("Error connect to nats %v", err)
@nguyenthang98
nguyenthang98 / envoy.hcl
Created May 19, 2021 14:28
envoy-testing
job "envoy" {
datacenters = ["dc1"]
type = "service"
group "envoy" {
constraint {
attribute = "${node.unique.name}"
value = "node-1"
}
count = 1