Decoding Go Language Source Code: A Deep Dive into go: Directives and the Use of Automation Tools

These go: instructions in the Go source code && go automation tools Developers have a strong tendency to automate repetitive tasks, and this also applies to writing code. Boilerplate code may include operations such as setting up a basic file structure, initializing variables, defining functions, or importing libraries or modules. In some cases, packages provide boilerplate code as a starting point for developers to build from, typically generated after the code behavior has been configured....

January 25, 2024 · 22 min · 4561 words · Xinwei Xiong, Me

Concurrent Type Checking and Cross-Platform Development in Go

OpenIM cross-platform source code type checking tool start question In the automation path of OpenIM, it involves more and more comprehensive automated design and testing. In the process, I encountered a problem, so I completed a full set of experience from go language type detection to integrated local and CI. The problem is this issue: https://github.com/openimsdk/open-im-server/issues/1807 Our Go code encountered an integer overflow issue when running on a 32-bit system (linux/386)....

January 24, 2024 · 31 min · 6471 words · Xinwei Xiong, Me

Kubernetes Control Plane - Scheduler

Scheduler kube-scheduler is responsible for scheduling and assigning Pods to nodes within the cluster. It listens to kube-apiserver, queries for Pods that haven’t been assigned to Nodes, and then assigns nodes to these Pods based on scheduling policies (updating the Pod’s NodeName field). The scheduler needs to fully consider many factors: Fair scheduling; Efficient resource utilization; QoS; affinity and anti-affinity; data locality; inter-workload interference; deadlines. kube-scheduler scheduling is divided into two phases, predicate and priority:...

September 28, 2023 · 8 min · 1664 words · Xinwei Xiong, Me