Keep Learning.

Setup Http Proxy
19 December 2019

Recently, I spend some time working on setup a http proxy in synology nas server, it’s a little bit difficult firstly when I setup this first time, here I gonna write down how I setup a http proxy server. First, you need get a virtual host that running the shadowsockes server, and start the shadownsocks server using docker: docker run -e METHOD=aes-256-cfb -e PASSWORD=<password> -p 8388:8388 -p 8388:8388/udp -d shadowsocks/shadowsocks-libev Then, on your laptop, run this to start up the proxy client: docker run -u root -d -p 1080:1080 shadowsocks/shadowsocks-libev:latest ss-local -s <server_ip> -p 8388 -b 0. ... Read More
Overview In OpenShift Dedicated V4, we use Let’s Encrypt to sign the certs for OpenShift controle plane and Ingress router, we designed certman-operator to manage the certs deployed inside the cluster, for more details you can see Using Kubernetes Operators to Manage Let?s Encrypt SSL/TLS Certificates for Red Hat OpenShift Dedicated, here I how the certs is applied to target cluster. How we deploy/update the certs to clusters We manage v4 dedicated clusters using hive, it has a custom resource called clusterdeployment which defines everything about install a cluster, also includes the which certificates to use to secure the api. ... Read More

Golang Interfaces
4 February 2018

Interface make more sense when you make the code more flexible, scalable, and maintainable, interface in go is a different than other languages like java. In java we need use implement to say that type implements an interface, in golang, Every type that implement an interface automatically satisfies that interface, it’s automatically deteced by Go compiler. type I interface{ func M() } type Foo struct{} func (f *foo) M(){} We declare an interface I that have an func M(), and the Foo struct have an M() func, so we can treat Foo is and implementation of interface I ... Read More

Golang Learning Materials
3 February 2018

This is the page that collect golang related learning materials Online free materials: Tour of Go: Very quickstart for learning Go. Go by example: Go by Example is a hands-on introduction to Go using annotated example programs Effective Golang: Golang programming conventions, every Gopher should get farmiliar with this. Wiki Page: This include really a lot that you needed, including blogs, books, etc. Gopher talks: This is a site that contains the talks delivered from GopherCon Tools for Go: ... Read More

Golang Names
1 February 2018

What’s Names You cannot give a variable a name the way you give a dog a name-because it’s cute or it has good sound. The most important consideration in naming a variable is that the name fully and accurately describe the entity the variable represents. Names matter Readability is the defining quality of good code. Good names are critical to readability. This talk is about naming in Go. Good names A good name is: ... Read More