<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[ltstud的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/ltstud</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; ltstud]]></copyright><item><title><![CDATA[etcd]]></title><link>https://blog.csdn.net/ltstud/article/details/87879330</link><guid>https://blog.csdn.net/ltstud/article/details/87879330</guid><author>ltstud</author><pubDate>Mon, 25 Feb 2019 15:22:44 +0800</pubDate><description><![CDATA[1:分布式的key value存储服务，能为整个分布式集群存储一些关键数据，协助分布式集群正常运行。

2:etcd使用比较简单，对外提供了GRPC的接口，可以直接使用protobuf和grpc对etcd存储的数据进行管理，也可以用官方提供的ectdctl去操作数据的存储。

Raft

每一个分布式系统中,etcd都扮演了非常重要的角色，由于很多系统的etcd的服务配置发现和服务配置都存在etc...]]></description><category></category></item><item><title><![CDATA[protobuf 初探]]></title><link>https://blog.csdn.net/ltstud/article/details/85279971</link><guid>https://blog.csdn.net/ltstud/article/details/85279971</guid><author>ltstud</author><pubDate>Thu, 27 Dec 2018 14:23:51 +0800</pubDate><description><![CDATA[1:https://developers.google.com/protocol-buffers/docs/reference/php-generated  //proto php

2:https://developers.google.com/protocol-buffers/docs/reference/go-generated   //go

3:https://godoc.org/git...]]></description><category></category></item><item><title><![CDATA[Go语言学习笔记（8）面向对象]]></title><link>https://blog.csdn.net/ltstud/article/details/84585995</link><guid>https://blog.csdn.net/ltstud/article/details/84585995</guid><author>ltstud</author><pubDate>Thu, 29 Nov 2018 11:30:21 +0800</pubDate><description><![CDATA[
package main

import &quot;fmt&quot;

func main() {
	//定义treeNode结构体
	var root treeNode

	root = treeNode{value:3}
	fmt.Println(root)
	fmt.Println()

	root.left = &amp;amp;treeNode{}
	root.left.print()
	fmt.Printl...]]></description><category></category></item><item><title><![CDATA[Go学习日记（七） map函数]]></title><link>https://blog.csdn.net/ltstud/article/details/84139928</link><guid>https://blog.csdn.net/ltstud/article/details/84139928</guid><author>ltstud</author><pubDate>Tue, 20 Nov 2018 11:40:25 +0800</pubDate><description><![CDATA[基础语法


//map[k]v
func mapData() {

	//一般空的map用make创建
	m1 := make(map[int]int)  // == empty map
	var m2 map[string]int //return nil
	//创建空的map
	m3 := map[string] string{
	}
	//map是hash，是无序的
	m := map[s...]]></description><category></category></item><item><title><![CDATA[Go学习学习笔记（六）切片的使用]]></title><link>https://blog.csdn.net/ltstud/article/details/84138091</link><guid>https://blog.csdn.net/ltstud/article/details/84138091</guid><author>ltstud</author><pubDate>Fri, 16 Nov 2018 14:57:41 +0800</pubDate><description><![CDATA[ 


func sliceToZeroValue() {
	//s1 := []int{1,2,3,4}
	//创建一个已知长度，没有值的切片数组
	s := make([]int, 16)
	s2 := make([]int,10,32) //可以预留cap空间
	sliceToIncrement(s)
	sliceToIncrement(s2)
}

func sliceToIncremen...]]></description><category></category></item><item><title><![CDATA[Go学习笔记数组切片和容器（五）]]></title><link>https://blog.csdn.net/ltstud/article/details/84108764</link><guid>https://blog.csdn.net/ltstud/article/details/84108764</guid><author>ltstud</author><pubDate>Fri, 16 Nov 2018 11:28:31 +0800</pubDate><description><![CDATA[

func main() {
	//定义数组 数量在类型的前面
	var arr [5] int // 不定义值为0
	arr1 := [3]int{1} // := 必须赋值 最少赋值1位
	arr2 := [...]int{4,5,6,7,8} //...可不规定长度
	//二维数组
	var arr3 [2][5]int
	fmt.Println(arr, arr1, arr2, arr3...]]></description><category></category></item><item><title><![CDATA[Go学习笔记四]]></title><link>https://blog.csdn.net/ltstud/article/details/83868106</link><guid>https://blog.csdn.net/ltstud/article/details/83868106</guid><author>ltstud</author><pubDate>Thu, 08 Nov 2018 20:49:47 +0800</pubDate><description><![CDATA[ 


package main

import (
	&quot;bufio&quot;
	&quot;fmt&quot;
	&quot;io/ioutil&quot;
	&quot;os&quot;
	&quot;strconv&quot;
)

func main() {
//  sum := 0
////	不需要括号
//  for i:=1; i &amp;lt;= 100; i++ {
//  	 sum += i
//  }
  //fmt.Println(fors())
  //fmt...]]></description><category></category></item><item><title><![CDATA[Go语言学习笔记三]]></title><link>https://blog.csdn.net/ltstud/article/details/83862666</link><guid>https://blog.csdn.net/ltstud/article/details/83862666</guid><author>ltstud</author><pubDate>Thu, 08 Nov 2018 16:02:36 +0800</pubDate><description><![CDATA[
package main

import (
	&quot;fmt&quot;
	&quot;io/ioutil&quot;
)

func main() {
//branch()
//outil()
//otila()
	//ioutils()
	//ioutilss()
	//block()
	const (
		a int = 100
		b int = 250
	)

	fmt.Printf(switch3(60))
	//f...]]></description><category></category></item><item><title><![CDATA[Go语言学习笔记二]]></title><link>https://blog.csdn.net/ltstud/article/details/83833953</link><guid>https://blog.csdn.net/ltstud/article/details/83833953</guid><author>ltstud</author><pubDate>Wed, 07 Nov 2018 23:27:37 +0800</pubDate><description><![CDATA[
package main

import (
&quot;fmt&quot;
&quot;math&quot;
)

func main() {
	//
	//constes()
	//elumn()
	sqm()

}
//可以定义公共常量
const(
	sex int = 1
	public string = &quot;公共的&quot;
)
func constes() {
	const names = &quot;常量&quot;
	const a, b = 3...]]></description><category></category></item><item><title><![CDATA[go语言学习笔记一]]></title><link>https://blog.csdn.net/ltstud/article/details/83833204</link><guid>https://blog.csdn.net/ltstud/article/details/83833204</guid><author>ltstud</author><pubDate>Wed, 07 Nov 2018 22:41:53 +0800</pubDate><description><![CDATA[
package main
//引入fmt库
import (
	&quot;fmt&quot;
	&quot;math&quot;
	&quot;math/cmplx&quot;
)

func variableZeroValue()  {
	//定义变量
	var id int
	var name string
	fmt.Printf(&quot;%d %q\n&quot;, id, name)
	//fmt.Println(id, name)
}
func main()...]]></description><category></category></item><item><title><![CDATA[Protobuf 实践小Demo二]]></title><link>https://blog.csdn.net/ltstud/article/details/83784987</link><guid>https://blog.csdn.net/ltstud/article/details/83784987</guid><author>ltstud</author><pubDate>Tue, 06 Nov 2018 13:33:01 +0800</pubDate><description><![CDATA[先参考这篇博客：

https://blog.csdn.net/BraveMelon/article/details/82560845

vim cbstest.proto 内容如下


syntax = &quot;proto2&quot;;
package Proto.Cbstest;
message Person {
    required string name = 1;
    required int3...]]></description><category></category></item><item><title><![CDATA[gRPC初识一]]></title><link>https://blog.csdn.net/ltstud/article/details/83748220</link><guid>https://blog.csdn.net/ltstud/article/details/83748220</guid><author>ltstud</author><pubDate>Mon, 05 Nov 2018 21:12:25 +0800</pubDate><description><![CDATA[gRPC 客户端和服务端可以在多种环境中运行和交互 - 从 google 内部的服务器到你自己的笔记本，并且可以用任何 gRPC 支持的语言来编写。所以，你可以很容易地用 Java 创建一个 gRPC 服务端，用 Go、Python、Ruby 来创建客户端。此外，Google 最新 API 将有 gRPC 版本的接口，使你很容易地将 Google 的功能集成到你的应用里。先贴出官网，有不详细的地方...]]></description><category></category></item><item><title><![CDATA[laradocke中不能安装php-xdebug解决]]></title><link>https://blog.csdn.net/ltstud/article/details/83621740</link><guid>https://blog.csdn.net/ltstud/article/details/83621740</guid><author>ltstud</author><pubDate>Thu, 01 Nov 2018 15:50:00 +0800</pubDate><description><![CDATA[he source has updated http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/x/xdebug/,so you get 404
edit file laradock/workspace/Dockerfile line 261apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug...]]></description><category></category></item><item><title><![CDATA[CentOS 7 下 PHP 7，MySQL 5.7 和 Nginx 1.8 的安装与配置（实用）]]></title><link>https://blog.csdn.net/ltstud/article/details/83086922</link><guid>https://blog.csdn.net/ltstud/article/details/83086922</guid><author>ltstud</author><pubDate>Tue, 16 Oct 2018 14:09:56 +0800</pubDate><description><![CDATA[下面将一步步在 CentOS 7 下 PHP 7，MySQL 5.7 和 Nginx 1.8 的安装与配置。首先我的 CentOS 版本是7.0.1406


[root@lnmp ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    Cen...]]></description><category></category></item><item><title><![CDATA[【mysql】You must reset your password using ALTER USER statement before executing this statement报错处理]]></title><link>https://blog.csdn.net/ltstud/article/details/83081032</link><guid>https://blog.csdn.net/ltstud/article/details/83081032</guid><author>ltstud</author><pubDate>Tue, 16 Oct 2018 13:11:59 +0800</pubDate><description><![CDATA[安装完mysql 之后，登陆以后，不管运行任何命令，总是提示这个

mysql&amp;gt; show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql&amp;gt; use mysql;
ERROR 1820...]]></description><category></category></item><item><title><![CDATA[PHP编译安装时常见错误解决办法，php编译常见错误]]></title><link>https://blog.csdn.net/ltstud/article/details/83069638</link><guid>https://blog.csdn.net/ltstud/article/details/83069638</guid><author>ltstud</author><pubDate>Tue, 16 Oct 2018 10:53:05 +0800</pubDate><description><![CDATA[转载自：http://www.bkjia.com/PHPjc/1008013.html

 

This article is post on https://coderwall.com/p/ggmpfa

configure: error: xslt-config not found. Please reinstall the libxslt &amp;gt;= 1.1.0 distribution复制...]]></description><category></category></item><item><title><![CDATA[swoole的worker进程变量赋值]]></title><link>https://blog.csdn.net/ltstud/article/details/83056408</link><guid>https://blog.csdn.net/ltstud/article/details/83056408</guid><author>ltstud</author><pubDate>Mon, 15 Oct 2018 11:24:06 +0800</pubDate><description><![CDATA[
&amp;lt;?php
Class Test{
    public $index = 18;
}

Class Server {

    private $server;

    public $test;
    public function __construct()
    {
        $this-&amp;gt;server = new swoole_server('0.0.0.0',...]]></description><category></category></item><item><title><![CDATA[Swoole  Echo服务器随意搭建 及set函数详解]]></title><link>https://blog.csdn.net/ltstud/article/details/83028458</link><guid>https://blog.csdn.net/ltstud/article/details/83028458</guid><author>ltstud</author><pubDate>Fri, 12 Oct 2018 15:54:01 +0800</pubDate><description><![CDATA[
&amp;lt;?php
//Server
Class Server
{
    private $serv;

    /**
     * 链接swoole服务器
     * Server constructor.
     */
    public function __construct()
    {
        //创建swoole_server对象
        $this-&amp;g...]]></description><category></category></item><item><title><![CDATA[linux centos7 安装php7.2 + 扩展]]></title><link>https://blog.csdn.net/ltstud/article/details/83016781</link><guid>https://blog.csdn.net/ltstud/article/details/83016781</guid><author>ltstud</author><pubDate>Thu, 11 Oct 2018 18:26:50 +0800</pubDate><description><![CDATA[目前php最高稳定版本是7.2，wordpress中也建议采用该版本。

若直接采用centos中的yum安装：sudo yum -y install php，版本是5.4，远远不够，因此我们要手动更新rpm即可。

首先获取rpm：

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm  ...]]></description><category></category></item><item><title><![CDATA[linux 安装docker&docker-compose]]></title><link>https://blog.csdn.net/ltstud/article/details/83013129</link><guid>https://blog.csdn.net/ltstud/article/details/83013129</guid><author>ltstud</author><pubDate>Thu, 11 Oct 2018 15:41:20 +0800</pubDate><description><![CDATA[ 

1:yum install docker 安装的版本为1.3.1（太老了）

2:https://blog.csdn.net/WarnerWu/article/details/79130854 （更新yum源的文章 你们可以试试反正我没用 - -）

3.看官方手册

第一步




先移除yum包 
 sudo yum remove docker \
&amp;gt;               ...]]></description><category></category></item></channel></rss>