golang study notes 015--goroutine and channel

1.goroutine 1.1 process and thread introduction ● process is an execution process of a program in the operating system and the basic unit for resource allocation and scheduling of the system ● thread is an execution instance of a process and the smallest unit of program execution. It is a smaller basic unit that can run independently than ...

Posted by theda on Sat, 29 Jan 2022 23:59:10 +0100

prometheus service discovery analysis

Introduction to service discovery For the monitoring system, the on-demand resource usage in cloud native and container scenarios means that there is no fixed monitoring target and all monitoring objects (infrastructure, applications and services) Service) are changing dynamically, which brings challenges to the traditional monitoring softwar ...

Posted by MrPixel on Sat, 29 Jan 2022 16:21:03 +0100

(get the red envelope cover for free) [redis series] redis learning IV, set set, hash, zset ordered set preliminary cognition

Get the red envelope cover at the end of the article for free. There are 2000 in total, on a first come, first served basis Set set The data in the set cannot be re read SADD key member [member ...] Adds an element to the set collection SMEMBERS key View all elements in the collection SISMEMBER key member Check whether a data is in the col ...

Posted by PURU on Sat, 29 Jan 2022 08:03:31 +0100

Go grammar review 2

1.if statement In go language, there is a special if statement usage. if statement,condition{ } example: package main import "fmt" func main() { //Here num is a local variable if num := 4; num > 0 { fmt.Printf("number=%d\n", num) } //Global variable here num1 := 2 fmt.Println(num1) } result: number=4 2 2. R ...

Posted by Cyberspace on Sat, 29 Jan 2022 07:58:06 +0100

Using JWT in the gin framework

The full name of JWT is JSON Web Token. It is a cross domain authentication solution and belongs to an open standard. It specifies an implementation method of Token. At present, it is mostly used in front and back-end separation projects and oauth2 0 business scenario. What is JWT? The full name of JWT is JSON Web Token. It is a cross domain au ...

Posted by kidbrax on Sat, 29 Jan 2022 02:03:13 +0100

Go single test series 5 - driving with monkey

This is the fourth in a series of tutorials on Go language unit testing from zero to slip. It introduces how to use monkey in unit testing. In the previous "Go single test series 5 - mock interface test", we introduced how to use gomock and gostub tools to mock interface and pile driving in unit test. In this article, we will introduc ...

Posted by Doug G on Fri, 28 Jan 2022 16:53:21 +0100

go language learning record 3

catalogue go language pointer Address: Define pointer: Use pointer: Null pointer: go language structure Define structure Access structure members Structure as function parameter Structure pointer go language recursive function Factorial: Fibonacci sequence: go language type conversion go language interface Relationship between ...

Posted by JimStrosky on Fri, 28 Jan 2022 13:44:06 +0100

gin plus vue use nginx proxy to deploy server

The front and back ends are separated, and then deployed to a server. When vue is packaged, the benchmark path is packaged as the address of the back-end service without adding the end slogan. Then, the main operations of the back-end and server are as follows: You can use goland to connect to the server, which is more convenient The server is ...

Posted by lnfreish on Fri, 28 Jan 2022 11:32:38 +0100

MIT 6.824 Lab4 AB completion record

explain Detailed implementation ideas and experimental principles are provided here, and most of the code at the skeleton level is provided. Not all codes are provided.Complete code. If you really need it, please send a private letter or leave a message. Overall architecture The overall experimental description of lab4 is very lengthy. We ne ...

Posted by hmiller73 on Thu, 27 Jan 2022 23:46:43 +0100

golang source code reading: how to deal with the priority of collaboration in VictoriaMetrics

Python wechat ordering applet course video https://edu.csdn.net/course/detail/36074 Python actual combat quantitative transaction financial management system https://edu.csdn.net/course/detail/35475 In reading VictoriaMetrics When I read the source code of, I read such an ordinary paragraph: // AddRows adds the given mrs to s. func (s *Stor ...

Posted by dinsdale on Thu, 27 Jan 2022 21:36:10 +0100