- 博客(19)
- 资源 (3)
- 收藏
- 关注
原创 共识机制比较
共识 CAP理论 一致性consistency 服务可用性availability:请求在一定时间内得到响应,可终止、不会一直等待 分区容错性partition-tolerance:网络分区情况下,被分割的节点仍能对外服务 tendermint 协议中的参与者叫着 “验证人”(validator)。他们轮流对交易区块进行提议,并对这些区块进行投票。区块会被提交到链上,每一个块占据一个“高度”(height)。提交块可能会失败,如果失败,协议就会开始下一轮的提交,并且一个新的验证人会继续提交那个高度的区块。
2021-10-10 18:35:57
10559
1
原创 golang面试
Golang 面试资料 序言 整理golang基础知识及linux、后端开发相关面试资料。 声明:未经许可,禁止原文转载。 目录 golang 数据类型 string slice reslice map interface channel 底层原理 深度解密 内存分配 分配器 图解内存管理 内存管理分析 变量分配到哪里 内存逃逸 调度器 goroutine https://mp.weixin.qq.com/s/rfjysi-LB-uFiGiZjh-XNw goroutine 泄
2021-10-09 10:46:03
368
原创 golang全家桶
golangFamily 【超全golang面试题合集+golang学习指南+golang知识图谱+成长路线】 一份涵盖大部分golang程序员所需要掌握的核心知识。 脑图持续不断更新中,在线查看地址 后续文章和内容会不断更新到 github项目 中,欢迎关注。 目录(善用Ctrl+F) 基础入门 新手 Golang开发新手常犯的50个错误 数据类型 连nil切片和空切片一不一样都不清楚?那BAT面试官只好让你回去等通知了。 nil切片和空切片指向的地址不一
2021-10-09 10:37:37
1408
原创 FastDFS安装,以及nginx代理查看文件
FastDFS安装 1安装FastDFS依赖包 https://github.com/happyfish100/libfastcommon 解压缩libfastcommon-master.zip 进入到libfastcommon-master的目录中 执行./make.sh sudo apt-get install make 执行sudo ./make.sh install 2安装FastDFS https://github.com/happyfish100/fastdfs 解压缩
2021-08-29 22:57:34
908
原创 gin cookie session用法
cookie import ( "github.com/gin-gonic/gin" ) func main(){ router := gin.Default() //设置cookie http://127.0.0.1:8080/setcookie router.GET("/setcookie", func(ctx *gin.Context) { ctx.SetCookie("key","value",0,"","",false,true) ctx.Writer.WriteStrin
2021-08-28 21:11:11
509
原创 go gin consul服务发现 redis mysql(微服务)
包的引入: import ( "github.com/gin-gonic/gin" "github.com/hashicorp/consul/api" "github.com/micro/go-micro/v2" "github.com/micro/go-micro/v2/logger" "github.com/micro/go-plugins/registry/consul/v2" "github.com/gomodule/redigo/redis" "github.com/jin
2021-08-28 10:28:01
486
原创 ubuntu mysql安装
安装 安装 sudo apt-get install mysql-server #查看进程: ps -aux |grep mysql #查看版本: mysql --version 登录以及密码修改 #本地登录 mysql -uroot -p #远程登录 mysql -h 192.168.1.101 -P 3306 -uroot -p #登录修改密码: ```sql use mysql; update user set authentication_string=PASSWORD(‘roo
2021-08-25 12:07:14
342
原创 ubuntu安装redis
Redis 官网:https://redis.io/ 安装 直接输入命令 sudo apt-get install redis-server 安装完成后,Redis服务器会自动启动。 使用命令可以看到服务器系统进程默认端口6379 ps -aux|grep redis 查看redis服务器状态 netstat -nlt|grep 6379 查看Redis服务器状态 sudo /etc/init.d/redis-server status 卸载redis sudo apt-get remove red
2021-08-24 14:12:28
278
原创 go-micro及相关的常用命令
protobuf go 语言中 编译proto命令: protoc --go_out=./ *proto` service 服务名 { rpc 函数名(参数:消息体) returns (返回值:消息) } message People { string name = 1; } message Student { int32 age = 2; } 例: service hello { rpc HelloWorld(People) returns (Student); } `` #### 简单g
2021-08-22 22:08:04
490
原创 GO111MODULE=on环境下,ubuntu go微服务相关安装
protobuf的安装 1.安装依赖: sudo apt-get install autoconf automake libtool curl make g++ unzip libffi-dev -y 2.下载prorobuf: git clone https://github.com/protocolbuffers/protobuf.git 3.安装 cd protobuf/ ./autogen.sh ./configure make sudo make install ##刷新linux共
2021-08-22 21:48:13
544
原创 go env配置以及goland配置
go get下载go包太慢: go env -w GO111MODULE=on go env -w GOPROXY="https://goproxy.cn,direct" go get 下载的包到了pkg目录下: 这是因为设置了GO111MODULE=on ,项目中若因为找不到包可以: go mod init example.com/m go mod tidy go mod vendor goland设置 1.goland打开时,不启动项目: 2.GO111MODULE=on的环境下应该设置:
2021-08-22 21:09:14
3084
原创 ubuntu go 微服务相关安装
protobuf的安装 1.下载 protobuf git clone https://github.com/protocolbuffers/protobuf.git 2.安装 (1)安装依赖工具(联网) $ sudo apt-get install autoconf automake libtool curl make g++ unzip libffi-dev -y (2)进入protobuf文件 cd protobuf/ (3)进行安装检测 并生成自动安装脚本 ./autogen.sh ./con
2021-08-22 12:54:20
221
原创 ubuntu java python go环境安装配置
java1.8 python3.7 go1.16 下载官网: java:https://www.oracle.com/java/technologies/javase-downloads.html python:https://www.python.org/downloads/ go:https://golang.google.cn/dl/ 下载包 java包下载 wget https://download.oracle.com/otn/java/jdk/8u301-b09/d3c52aa6bfa54d
2021-08-22 11:20:27
211
原创 Ubuntu安装设置
下载 https://ubuntu.com/download/alternative-downloads 修改为国内源 备份 sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak 修改源: sudo gedit /etc/apt/sources.list 内容修改为: ubuntu18.04: deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multive
2021-08-22 09:12:29
130
原创 hyperledger fabric 链码执行query时出错
hyperledger fabric 链码执行query时出错: Error: endorsement failure during query. response: status:500 message:“failed to execute transaction af2644c8185e848effd2821e8bdaeb4cc2d1587a709d9c71f35cc04841db083f: error sending: chaincode stream terminated” 查看容器: 果然容器退
2021-08-01 13:32:04
1224
原创 hyperleder fabric链码初始化报错
hyperleder fabric链码初始化报错 Error: endorsement failure during query. response: status:500 message:“make sure the chaincode mycc has been successfully instantiated and try again: chaincode mycc not found” 解决方法: 找到区块生成的配置文件。将本地的ip地址改为orderer容器服务名称。 fabric中许多莫名
2021-08-01 10:42:49
1462
原创 hyperledger fabric搭建kafka排序
hyperledger fabric搭建kafka排序时: 问题1 [channel: testchainid] Cannot post CONNECT message = kafka server: In the middle of a leadership election, there is currently no leader for this partition and hence it is unavailable for writes. panic: [channel: testchaini
2021-07-30 22:23:06
861
1
原创 Truffle框架中,用nodemon启动服务器报错:UnhandledPromiseRejectionWarning: TypeError: xxx.watch is not a function
Truffle框架中,用nodemon启动服务器报错:UnhandledPromiseRejectionWarning: TypeError: xxx.watch is not a function 以太坊Ebay项目。使用web3监听solidity中事件时,在启用nodemon服务器时出现UnhandledPromiseRejectionWarning: TypeError: xxx.watch is not a function,这是web3没有被正常使用的结果。 .watch监听是web3老版本的
2021-07-24 09:48:14
5527
1
原创 Hyperledger Fabric以及pbft(实用拜占庭)共识环境配置[ubuntu16.04 docker配置]
工具包: -fabric1.4.4,docker以及pbft工具包百度云链接 链接:https://pan.baidu.com/s/1hshTuQXyFlZA0xeiFF-fwQ 提取码:8888 Go安装 先解压安装包: tar -xf go1.15.linux-amd64.tar.gz 将解压包移到安装路径: mv go /usr/local 创建工作目录: mkdir /usr/local/gopath mkdir -p /usr/local/gopath/src/github.com/hyperl
2020-08-17 18:49:46
3465
22
六级答题卡000000000.zip
2020-07-09
六级答题卡(新题型).zip
2021-06-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅