Coder Social home page Coder Social logo

crawler's Introduction

crawler

存储验证引擎(tag v0.2.7)

docker run -d --name mysql-test -p 3326:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql
docker exec -it mysql-test sh
mysql -uroot -p123456
CREATE DATABASE crawler;
use crawler;

创建proto文件,并编译(tag0.3.0)

git clone [email protected]:googleapis/googleapis.git
mv googleapis/google  $(go env GOPATH)/src/google

git clone [email protected]:protocolbuffers/protobuf.git
src/goole文件夹直接拷贝到GOPATH/src/google下

./scripts/protocgen.sh

访问grpc服务

curl -H "content-type: application/json" -d '{"name": "john"}' http://127.0.0.1:8081/greeter/hello

启动etcd服务

mkdir -p /tmp/etcd-data.tmp && \
 docker run \
  -p 2379:2379 \
  -p 2380:2380 \
  --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
  --name etcd-gcr-v3.5.13 \
  gcr.io/etcd-development/etcd:v3.5.13 \
  /usr/local/bin/etcd \
  --name s1 \
  --data-dir /etcd-data \
  --listen-client-urls http://0.0.0.0:2379 \
  --advertise-client-urls http://0.0.0.0:2379 \
  --listen-peer-urls http://0.0.0.0:2380 \
  --initial-advertise-peer-urls http://0.0.0.0:2380 \
  --initial-cluster s1=http://0.0.0.0:2380 \
  --initial-cluster-token tkn \
  --initial-cluster-state new \
  --log-level info \
  --logger zap \
  --log-outputs stderr

bug: 1.

go: encryptClient/proto imports
        go-micro.dev/v4/api: go-micro.dev/v4/[email protected]: parsing go.mod:
        module declares its path as: github.com/micro/go-micro
                but was required as: go-micro.dev/v4/api

解决办法:

go get go-micro.dev/v4
crawler.pb.gw.go有问题
错误表现是调用接口时,name为空

解决办法:

需要拷贝教程里的代码

crawler's People

Contributors

stupidtao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.