golang API request queue

outline Realization ideas usage method Start queue service Use queue service outline When a third-party API is called, there are basically restrictions on the access speed limit. When there are multiple third-party APIs, it is not good to control the access speed, which often leads to HTTP 429(Too Many Requests) and then it will be banne ...

Posted on Sun, 31 May 2020 04:19:22 -0400 by teomanersan

k8s installation tutorial, CentOS 7.5, ARM architecture server (Feiteng platform)

1 installation environment [root@k8s-master ~]# uname -a Linux k8s-master 4.14.0-49.12.ts7.aarch64 #1 SMP Tue Nov 12 19:06:54 CST 2019 aarch64 aarch64 aarch64 GNU/Linux [root@k8s-master ~]# cat /etc/redhat-release TongyuanOS release 7.5.1810 host IP function k8s-master 192.168.0.239 Master k8s-node1 192.168.0.244 node 2. Modify the h ...

Posted on Fri, 29 May 2020 10:11:49 -0400 by faifas

Use of Etcd in Go language log collection project

Log collection item (II) use of Etcd ETCD introduction Concept: highly available distributed key value storage for configuration sharing and service discovery Similar projects: zookeeper and consumer Development language: Go Interface: provide restful http interface, easy to use Implementation algorithm: a highly consistent, highly available ...

Posted on Fri, 15 May 2020 11:06:41 -0400 by brian183

How to implement an API gateway using Golang

Have you ever wanted to expose an interface to the network. But you have to add some permissions, otherwise it's not good to be called by others. The process of permission verification should be as simple as possible. Maybe it's just to compare two strings that are equal. In general, we need to implement or add a global interceptor. But I still ...

Posted on Thu, 07 May 2020 01:51:19 -0400 by bigdspbandj

Go learning notes - using MySQL database

2017-12-28 15:17:31    At present, there are many drivers supporting MySQL in Go, some of which support database/sql standards, and some of which use their own implementation interfaces. The commonly used ones are as follows:   https://github.com/Go-SQL-Driver/MySQL supports database/sql, all written in go. Https://github.com/ziutek/mysql supp ...

Posted on Tue, 05 May 2020 14:55:35 -0400 by rharden

Gin go learning note 4: upload and download of gin web framework file

File upload and download 1 - > file upload File upload, the use of uploadify.js plug-in In this case, the image file is uploaded, so are other files. 2 - > download of files There are two ways to download files: 1 - > URL path points to the path of the file, which is downloaded by the browser. However, this method has some defects: ima ...

Posted on Tue, 05 May 2020 03:02:15 -0400 by bbxrider

The Foundation of Go s

let's go https://golang.org/ https://play.golang.org/ https://studygolang.com/articles/13958 https://www.jianshu.com/p/aeb27a6aa42d https://www.runoob.com/go/go-variables.html Basic do not want to write, too many duplicates too high, continue to learn go to today, it should be summarized,   development tool GoLand 30-day free trial L ...

Posted on Mon, 04 May 2020 15:48:12 -0400 by johnnyboy16

INI Profile Format Resolution in Go Language

init profile and parsing The INI profile has three elements parameters A configuration, such as key = value. sections sections are a collection of parameters, which must be exclusive and enclosed in []. sections do not have an obvious end. The beginning of one section is the end of another. comments A comment referring to the INI configur ...

Posted on Mon, 04 May 2020 07:41:54 -0400 by umol

Gin go learning note 7: Gin web framework layout page

Template use Page layout 1> An html page consists of: head part, body part, internal css, internal js, external css, and external js. Therefore, a layout file needs to be split for these.     2> Create a new controller for layout.go. Write an instance that references the layout file. The specific code is as follows:     package controlle ...

Posted on Sun, 03 May 2020 00:42:35 -0400 by psychohagis

Gin go learning note 5: operation of gin web framework file

File operation 1> Create, delete, write, and read files. (this instance uses text files.) 2> Gin does not provide a special interface for creating, deleting, reading and writing files. Therefore, the commonly used ioutil package is used for reading and writing files. The os package is used for creating and deleting files 3> Create a fi ...

Posted on Fri, 01 May 2020 00:14:18 -0400 by rbarnett