Implementation principle and source code analysis of timer in Go

Please state the source of reprint ~, this article is posted on luozhiyun's blog: https://www.luozhiyun.com The source code of go used in this article is 15.7. It should be noted that the timer is revised due to version 1.14, but there is no great difference between versions 1.14 and 1.15 I wrote an article about the time wheel during the Spri ...

Posted by slipperyfish on Wed, 06 Apr 2022 01:38:08 +0300

Random notes of Go knowledge points

1. Structure (using structure to implicitly realize object-oriented) 1) Use '.' regardless of the structure type or pointer to the structure As selector 2) Structure factory (Convention: the name of the factory starts with new or new) is actually the constructor of the structure. After constructing the structure factory, you can prohibit the ...

Posted by LightningSt on Tue, 05 Apr 2022 17:32:49 +0300

golang kafka message queue based log collection project

logagent of configuration file 1. Read the configuration file and use ini to load the package of the configuration file Note that you should pay attention to "tag" when creating structure reflection configuration file, otherwise it cannot be mapped type Config struct {    KafkaConfig `ini:"kafka"`    CollectConfig `ini:"collect"` } ...

Posted by davejj on Tue, 05 Apr 2022 17:16:29 +0300

Kind deploys Karmada multi cluster management

What is karma? Karmada is a cloud native project of CNCF. Its main capability is to manage multiple Kubernetes clusters and distribute the resource objects based on the native Kubernetes to multiple clusters. For some Deployment, Job and other workload with computing resource requirements, the specific copy number scheduling ability allows dif ...

Posted by bravo81 on Tue, 05 Apr 2022 10:49:44 +0300

Talk about three transmission protocols and implementation of Git

Absrtact: as we all know, Git is the most popular distributed version control system at present. In recent two years, due to the rapid development of DevOps, everything code is becoming a standard practice. All this needs to be controlled by a configuration management center. Git has undoubtedly become a favorite in this field. In our daily dev ...

Posted by Spudgun on Tue, 05 Apr 2022 00:07:00 +0300

27 "Introduction to Go language" one-way channel (chan)

This is my handwritten introduction to Go language. I'll teach you how to get started. Source code + article, you will 🥴! I put all the code in the article github.com/GanZhiXiong/go_learning In this warehouse! When reading the article, the learning effect is better compared with the code in the warehouse! What is a one-way channel A on ...

Posted by nickminute on Mon, 04 Apr 2022 23:10:27 +0300

Life is short. I use GO -- GO slice

catalogue Slice slice How to create slices Slice initialization Create slices with make Operate slice with append built-in function (slice append) Exceeds the original slice Cap limit, the underlying array will be reallocated, even if the original array is not full. Slice copy   Slice traversal String and slice Chinese character st ...

Posted by micmac on Mon, 04 Apr 2022 17:24:38 +0300

Export csdn blog to markdown format

background I don't want to continue blogging on the dungpit website, so I Set up a static blog with Vuepress , it works well with github pages and server. But the blogs written before are basically all in CSDN. If you want to export them, it's too tired to copy them one by one manually, so you use go to write a crawler to automatically export t ...

Posted by lobski on Mon, 04 Apr 2022 13:31:45 +0300

EbitenCookBook Chinese tutorial lesson 1: installing Ebiten

This article updates the original address in real time: https://ebitencookbook.vercel.app/docs/CookBook_Start/class1 Lesson 1 installing Ebiten Welcome to Ebiten Chinese tutorial Today, we officially began to study the development of Ebiten Install development environment You can also refer to the official tutorial (Chinese document): https://e ...

Posted by rishiraj on Mon, 04 Apr 2022 08:11:51 +0300

Sync. In go Interpretation of cond source code

sync.Cond preface What is sync Cond Look at the source code Wait Signal Broadcast summary sync.Cond preface This code is based on go version go1 13.15 darwin/amd64 What is sync Cond Condition variable sync. In Go language standard library Cond, which allows a group of goroutines to be awakened when certain conditions are met. Each Cond ...

Posted by borabora12 on Mon, 04 Apr 2022 07:14:52 +0300