作者 kevin

initial import

  1 +**/.git
  1 +* text=auto eol=lf
  1 +name: Go
  2 +
  3 +on:
  4 + push:
  5 + branches: [ master ]
  6 + pull_request:
  7 + branches: [ master ]
  8 +
  9 +jobs:
  10 +
  11 + build:
  12 + name: Build
  13 + runs-on: ubuntu-latest
  14 + steps:
  15 +
  16 + - name: Set up Go 1.x
  17 + uses: actions/setup-go@v2
  18 + with:
  19 + go-version: ^1.13
  20 + id: go
  21 +
  22 + - name: Check out code into the Go module directory
  23 + uses: actions/checkout@v2
  24 +
  25 + - name: Get dependencies
  26 + run: |
  27 + go get -v -t -d ./...
  28 +
  29 + - name: Test
  30 + run: go test -v -race ./...
  1 +# Ignore all
  2 +*
  3 +
  4 +# Unignore all with extensions
  5 +!*.*
  6 +!**/Dockerfile
  7 +
  8 +# Unignore all dirs
  9 +!*/
  10 +!api
  11 +
  12 +.idea
  13 +**/.DS_Store
  14 +**/logs
  15 +!Makefile
  16 +
  17 +# gitlab ci
  18 +.cache
  19 +
  20 +# vim auto backup file
  21 +*~
  22 +!OWNERS
  1 +run:
  2 + # concurrency: 6
  3 + timeout: 5m
  4 + skip-dirs:
  5 + - core
  6 + - doc
  7 + - example
  8 + - rest
  9 + - rpcx
  10 + - tools
  11 +
  12 +
  13 +linters:
  14 + disable-all: true
  15 + enable:
  16 + - bodyclose
  17 + - deadcode
  18 + - errcheck
  19 + - gosimple
  20 + - govet
  21 + - ineffassign
  22 + - staticcheck
  23 + - structcheck
  24 + - typecheck
  25 + - unused
  26 + - varcheck
  27 +# - dupl
  28 +
  29 +
  30 +linters-settings:
  31 +
  32 +issues:
  33 + exclude-rules:
  34 + - linters:
  35 + - staticcheck
  36 + text: 'SA1019: (baseresponse.BoolResponse|oldresponse.FormatBadRequestResponse|oldresponse.FormatResponse)|SA5008: unknown JSON option ("optional"|"default=|"range=|"options=)'
  1 +module github.com/tal-tech/go-stash
  2 +
  3 +go 1.14
  4 +
  5 +require (
  6 + github.com/fortytw2/leaktest v1.3.0 // indirect
  7 + github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
  8 + github.com/json-iterator/go v1.1.10
  9 + github.com/mailru/easyjson v0.7.3 // indirect
  10 + github.com/olivere/elastic v6.2.34+incompatible
  11 + github.com/segmentio/kafka-go v0.3.5
  12 + github.com/tal-tech/go-zero v1.0.1
  13 +)
  1 +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
  2 +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
  3 +github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
  4 +github.com/DataDog/zstd v1.4.0/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
  5 +github.com/StackExchange/wmi v0.0.0-20170410192909-ea383cf3ba6e/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
  6 +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
  7 +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
  8 +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
  9 +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
  10 +github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
  11 +github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
  12 +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q=
  13 +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
  14 +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
  15 +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
  16 +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
  17 +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
  18 +github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
  19 +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
  20 +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
  21 +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
  22 +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
  23 +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
  24 +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
  25 +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
  26 +github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
  27 +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
  28 +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
  29 +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
  30 +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
  31 +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
  32 +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
  33 +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
  34 +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
  35 +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
  36 +github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
  37 +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
  38 +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
  39 +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=
  40 +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
  41 +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
  42 +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
  43 +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
  44 +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
  45 +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
  46 +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
  47 +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
  48 +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
  49 +github.com/frankban/quicktest v1.7.2 h1:2QxQoC1TS09S7fhCPsrvqYdvP1H5M1P1ih5ABm3BTYk=
  50 +github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o=
  51 +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
  52 +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
  53 +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is=
  54 +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
  55 +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
  56 +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
  57 +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
  58 +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
  59 +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=
  60 +github.com/go-redis/redis v6.15.7+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
  61 +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
  62 +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
  63 +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
  64 +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
  65 +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
  66 +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
  67 +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
  68 +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
  69 +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
  70 +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
  71 +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
  72 +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
  73 +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
  74 +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
  75 +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
  76 +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
  77 +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
  78 +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
  79 +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
  80 +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
  81 +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
  82 +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
  83 +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
  84 +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
  85 +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
  86 +github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
  87 +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
  88 +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
  89 +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
  90 +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
  91 +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
  92 +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
  93 +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
  94 +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
  95 +github.com/google/gops v0.3.7/go.mod h1:bj0cwMmX1X4XIJFTjR99R5sCxNssNJ8HebFNvoQlmgY=
  96 +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
  97 +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
  98 +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
  99 +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
  100 +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
  101 +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
  102 +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
  103 +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
  104 +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
  105 +github.com/grpc-ecosystem/grpc-gateway v1.14.3/go.mod h1:6CwZWGDSPRJidgKAtJVvND6soZe6fT7iteq8wDPdhb0=
  106 +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
  107 +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
  108 +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
  109 +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
  110 +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
  111 +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
  112 +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
  113 +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
  114 +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
  115 +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
  116 +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
  117 +github.com/justinas/alice v1.2.0/go.mod h1:fN5HRH/reO/zrUflLfTN43t3vXvKzvZIENsNEe7i7qA=
  118 +github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
  119 +github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
  120 +github.com/keybase/go-ps v0.0.0-20161005175911-668c8856d999/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ=
  121 +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
  122 +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
  123 +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
  124 +github.com/klauspost/compress v1.9.8 h1:VMAMUUOh+gaxKTMk+zqbjsSjsIcUcL/LF4o63i82QyA=
  125 +github.com/klauspost/compress v1.9.8/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
  126 +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
  127 +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
  128 +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
  129 +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
  130 +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
  131 +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
  132 +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
  133 +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
  134 +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
  135 +github.com/kshvakov/clickhouse v1.3.11/go.mod h1:/SVBAcqF3u7rxQ9sTWCZwf8jzzvxiZGeQvtmSF2BBEc=
  136 +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
  137 +github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
  138 +github.com/mailru/easyjson v0.7.3 h1:M6wcO9gFHCIPynXGu4iA+NMs//FCgFUWR2jxqV3/+Xk=
  139 +github.com/mailru/easyjson v0.7.3/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
  140 +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
  141 +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
  142 +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
  143 +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
  144 +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
  145 +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
  146 +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
  147 +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
  148 +github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
  149 +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
  150 +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
  151 +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
  152 +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
  153 +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
  154 +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
  155 +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
  156 +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
  157 +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
  158 +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
  159 +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
  160 +github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
  161 +github.com/olivere/elastic v1.0.1 h1:UeafjZg+TifCVPhCJNPof0pUHig6vbXuJEbC/A+Ouo0=
  162 +github.com/olivere/elastic v6.2.34+incompatible h1:GdvWBAqyIyEEUd+J2sSj6EnIaBywz7zZtN+Ps4JCv0g=
  163 +github.com/olivere/elastic v6.2.34+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8=
  164 +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
  165 +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
  166 +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
  167 +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
  168 +github.com/pierrec/lz4 v2.5.1+incompatible h1:Yq0up0149Hh5Ekhm/91lgkZuD1ZDnXNM26bycpTzYBM=
  169 +github.com/pierrec/lz4 v2.5.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
  170 +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
  171 +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
  172 +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
  173 +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
  174 +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
  175 +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
  176 +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
  177 +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
  178 +github.com/prometheus/client_golang v1.5.1 h1:bdHYieyGlH+6OLEk2YQha8THib30KP0/yD0YH9m6xcA=
  179 +github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
  180 +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
  181 +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
  182 +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
  183 +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
  184 +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
  185 +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
  186 +github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
  187 +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
  188 +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
  189 +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
  190 +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8=
  191 +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
  192 +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
  193 +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
  194 +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
  195 +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
  196 +github.com/segmentio/kafka-go v0.3.5 h1:2JVT1inno7LxEASWj+HflHh5sWGfM0gkRiLAxkXhGG4=
  197 +github.com/segmentio/kafka-go v0.3.5/go.mod h1:OT5KXBPbaJJTcvokhWR2KFmm0niEx3mnccTwjmLvSi4=
  198 +github.com/segmentio/kafka-go v0.4.1 h1:jyGn8DlpqI5iPArVxQj6o1IqPk76A+VN3JkhTkDr2Mo=
  199 +github.com/segmentio/kafka-go v0.4.1/go.mod h1:Inh7PqOsxmfgasV8InZYKVXWsdjcCq2d9tFV75GLbuM=
  200 +github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
  201 +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
  202 +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
  203 +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
  204 +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
  205 +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
  206 +github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
  207 +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
  208 +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
  209 +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
  210 +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
  211 +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
  212 +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
  213 +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
  214 +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
  215 +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
  216 +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
  217 +github.com/tal-tech/go-zero v1.0.0 h1:qVms7WxxgwVEkDMsOL4VNXfNnw2DJ8I54thcTBPgNFA=
  218 +github.com/tal-tech/go-zero v1.0.0/go.mod h1:MZHttkq0yf8kUd3TGaGvwUpiRIw9eD2iNFFfkx4YgG4=
  219 +github.com/tal-tech/go-zero v1.0.1 h1:GVhVDk1LNNZ0/3FomAY1lJ7NAdFUMARhYLDrc5Pyc2g=
  220 +github.com/tal-tech/go-zero v1.0.1/go.mod h1:MZHttkq0yf8kUd3TGaGvwUpiRIw9eD2iNFFfkx4YgG4=
  221 +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
  222 +github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
  223 +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
  224 +github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
  225 +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk=
  226 +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
  227 +github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
  228 +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
  229 +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
  230 +github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
  231 +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
  232 +github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=
  233 +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
  234 +go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=
  235 +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
  236 +go.uber.org/automaxprocs v1.3.0 h1:II28aZoGdaglS5vVNnspf28lnZpXScxtIozx1lAjdb0=
  237 +go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA=
  238 +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
  239 +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
  240 +go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
  241 +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
  242 +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
  243 +golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
  244 +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
  245 +golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
  246 +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
  247 +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
  248 +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
  249 +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
  250 +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
  251 +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
  252 +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
  253 +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
  254 +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
  255 +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
  256 +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
  257 +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
  258 +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
  259 +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  260 +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  261 +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  262 +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  263 +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  264 +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
  265 +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
  266 +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
  267 +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
  268 +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
  269 +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
  270 +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
  271 +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
  272 +golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
  273 +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
  274 +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
  275 +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
  276 +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
  277 +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
  278 +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
  279 +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
  280 +golang.org/x/sys v0.0.0-20171017063910-8dbc5d05d6ed/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  281 +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  282 +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  283 +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  284 +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  285 +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  286 +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  287 +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  288 +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
  289 +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  290 +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  291 +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  292 +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  293 +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  294 +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  295 +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  296 +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  297 +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1 h1:sIky/MyNRSHTrdxfsiUSS4WIAMvInbeXljJz+jDjeYE=
  298 +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
  299 +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
  300 +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
  301 +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
  302 +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
  303 +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
  304 +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
  305 +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
  306 +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
  307 +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
  308 +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
  309 +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
  310 +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
  311 +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
  312 +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
  313 +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
  314 +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
  315 +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
  316 +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
  317 +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
  318 +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
  319 +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
  320 +golang.org/x/tools v0.0.0-20200410132612-ae9902aceb98/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
  321 +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
  322 +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
  323 +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
  324 +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
  325 +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
  326 +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
  327 +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
  328 +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
  329 +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
  330 +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
  331 +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
  332 +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
  333 +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
  334 +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA=
  335 +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
  336 +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
  337 +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
  338 +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
  339 +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
  340 +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
  341 +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
  342 +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
  343 +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
  344 +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
  345 +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
  346 +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
  347 +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
  348 +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
  349 +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
  350 +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
  351 +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
  352 +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
  353 +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
  354 +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
  355 +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
  356 +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
  357 +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
  358 +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
  359 +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
  360 +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
  361 +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
  362 +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  363 +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  364 +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  365 +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  366 +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  367 +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
  368 +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
  369 +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
  370 +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
  371 +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
  372 +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
  373 +rsc.io/goversion v1.0.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo=
  374 +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
  375 +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
  376 +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
  377 +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
  1 +package kq
  2 +
  3 +import "github.com/tal-tech/go-zero/core/service"
  4 +
  5 +const (
  6 + firstOffset = "first"
  7 + lastOffset = "last"
  8 +)
  9 +
  10 +type KqConf struct {
  11 + service.ServiceConf
  12 + Brokers []string
  13 + Group string
  14 + Topic string
  15 + Offset string `json:",options=first|last,default=last"`
  16 + NumConns int `json:",default=1"`
  17 + NumProducers int `json:",default=8"`
  18 + NumConsumers int `json:",default=8"`
  19 + MinBytes int `json:",default=10240"` // 10K
  20 + MaxBytes int `json:",default=10485760"` // 10M
  21 +}
  1 +package kq
  2 +
  3 +import (
  4 + "context"
  5 + "strconv"
  6 + "time"
  7 +
  8 + "github.com/segmentio/kafka-go"
  9 + "github.com/segmentio/kafka-go/snappy"
  10 + "github.com/tal-tech/go-zero/core/executors"
  11 + "github.com/tal-tech/go-zero/core/logx"
  12 +)
  13 +
  14 +type (
  15 + PushOption func(options *chunkOptions)
  16 +
  17 + Pusher struct {
  18 + produer *kafka.Writer
  19 + topic string
  20 + executor *executors.ChunkExecutor
  21 + }
  22 +
  23 + chunkOptions struct {
  24 + chunkSize int
  25 + flushInterval time.Duration
  26 + }
  27 +)
  28 +
  29 +func NewPusher(addrs []string, topic string, opts ...PushOption) *Pusher {
  30 + producer := kafka.NewWriter(kafka.WriterConfig{
  31 + Brokers: addrs,
  32 + Topic: topic,
  33 + Balancer: &kafka.LeastBytes{},
  34 + CompressionCodec: snappy.NewCompressionCodec(),
  35 + })
  36 +
  37 + pusher := &Pusher{
  38 + produer: producer,
  39 + topic: topic,
  40 + }
  41 + pusher.executor = executors.NewChunkExecutor(func(tasks []interface{}) {
  42 + chunk := make([]kafka.Message, len(tasks))
  43 + for i := range tasks {
  44 + chunk[i] = tasks[i].(kafka.Message)
  45 + }
  46 + if err := pusher.produer.WriteMessages(context.Background(), chunk...); err != nil {
  47 + logx.Error(err)
  48 + }
  49 + }, newOptions(opts)...)
  50 +
  51 + return pusher
  52 +}
  53 +
  54 +func (p *Pusher) Close() error {
  55 + return p.produer.Close()
  56 +}
  57 +
  58 +func (p *Pusher) Name() string {
  59 + return p.topic
  60 +}
  61 +
  62 +func (p *Pusher) Push(v string) error {
  63 + msg := kafka.Message{
  64 + Key: []byte(strconv.FormatInt(time.Now().UnixNano(), 10)),
  65 + Value: []byte(v),
  66 + }
  67 + if p.executor != nil {
  68 + return p.executor.Add(msg, len(v))
  69 + } else {
  70 + return p.produer.WriteMessages(context.Background(), msg)
  71 + }
  72 +}
  73 +
  74 +func WithChunkSize(chunkSize int) PushOption {
  75 + return func(options *chunkOptions) {
  76 + options.chunkSize = chunkSize
  77 + }
  78 +}
  79 +
  80 +func WithFlushInterval(interval time.Duration) PushOption {
  81 + return func(options *chunkOptions) {
  82 + options.flushInterval = interval
  83 + }
  84 +}
  85 +
  86 +func newOptions(opts []PushOption) []executors.ChunkOption {
  87 + var options chunkOptions
  88 + for _, opt := range opts {
  89 + opt(&options)
  90 + }
  91 +
  92 + var chunkOpts []executors.ChunkOption
  93 + if options.chunkSize > 0 {
  94 + chunkOpts = append(chunkOpts, executors.WithChunkBytes(options.chunkSize))
  95 + }
  96 + if options.flushInterval > 0 {
  97 + chunkOpts = append(chunkOpts, executors.WithFlushInterval(options.flushInterval))
  98 + }
  99 + return chunkOpts
  100 +}
  1 +package kq
  2 +
  3 +import (
  4 + "context"
  5 + "io"
  6 + "log"
  7 + "time"
  8 +
  9 + "github.com/segmentio/kafka-go"
  10 + _ "github.com/segmentio/kafka-go/gzip"
  11 + _ "github.com/segmentio/kafka-go/lz4"
  12 + _ "github.com/segmentio/kafka-go/snappy"
  13 + "github.com/tal-tech/go-zero/core/logx"
  14 + "github.com/tal-tech/go-zero/core/queue"
  15 + "github.com/tal-tech/go-zero/core/service"
  16 + "github.com/tal-tech/go-zero/core/stat"
  17 + "github.com/tal-tech/go-zero/core/threading"
  18 + "github.com/tal-tech/go-zero/core/timex"
  19 +)
  20 +
  21 +const (
  22 + defaultCommitInterval = time.Second
  23 + defaultMaxWait = time.Second
  24 +)
  25 +
  26 +type (
  27 + ConsumeHandle func(key, value string) error
  28 +
  29 + ConsumeHandler interface {
  30 + Consume(key, value string) error
  31 + }
  32 +
  33 + queueOptions struct {
  34 + commitInterval time.Duration
  35 + maxWait time.Duration
  36 + metrics *stat.Metrics
  37 + }
  38 +
  39 + QueueOption func(*queueOptions)
  40 +
  41 + kafkaQueue struct {
  42 + c KqConf
  43 + consumer *kafka.Reader
  44 + handler ConsumeHandler
  45 + channel chan kafka.Message
  46 + producerRoutines *threading.RoutineGroup
  47 + consumerRoutines *threading.RoutineGroup
  48 + metrics *stat.Metrics
  49 + }
  50 +
  51 + kafkaQueues struct {
  52 + queues []queue.MessageQueue
  53 + group *service.ServiceGroup
  54 + }
  55 +)
  56 +
  57 +func MustNewQueue(c KqConf, handler ConsumeHandler, opts ...QueueOption) queue.MessageQueue {
  58 + q, err := NewQueue(c, handler, opts...)
  59 + if err != nil {
  60 + log.Fatal(err)
  61 + }
  62 +
  63 + return q
  64 +}
  65 +
  66 +func NewQueue(c KqConf, handler ConsumeHandler, opts ...QueueOption) (queue.MessageQueue, error) {
  67 + if err := c.SetUp(); err != nil {
  68 + return nil, err
  69 + }
  70 +
  71 + var options queueOptions
  72 + for _, opt := range opts {
  73 + opt(&options)
  74 + }
  75 + ensureQueueOptions(c, &options)
  76 +
  77 + if c.NumConns < 1 {
  78 + c.NumConns = 1
  79 + }
  80 + q := kafkaQueues{
  81 + group: service.NewServiceGroup(),
  82 + }
  83 + for i := 0; i < c.NumConns; i++ {
  84 + q.queues = append(q.queues, newKafkaQueue(c, handler, options))
  85 + }
  86 +
  87 + return q, nil
  88 +}
  89 +
  90 +func newKafkaQueue(c KqConf, handler ConsumeHandler, options queueOptions) queue.MessageQueue {
  91 + var offset int64
  92 + if c.Offset == firstOffset {
  93 + offset = kafka.FirstOffset
  94 + } else {
  95 + offset = kafka.LastOffset
  96 + }
  97 + consumer := kafka.NewReader(kafka.ReaderConfig{
  98 + Brokers: c.Brokers,
  99 + GroupID: c.Group,
  100 + Topic: c.Topic,
  101 + StartOffset: offset,
  102 + MinBytes: c.MinBytes, // 10KB
  103 + MaxBytes: c.MaxBytes, // 10MB
  104 + MaxWait: options.maxWait,
  105 + CommitInterval: options.commitInterval,
  106 + })
  107 +
  108 + return &kafkaQueue{
  109 + c: c,
  110 + consumer: consumer,
  111 + handler: handler,
  112 + channel: make(chan kafka.Message),
  113 + producerRoutines: threading.NewRoutineGroup(),
  114 + consumerRoutines: threading.NewRoutineGroup(),
  115 + metrics: options.metrics,
  116 + }
  117 +}
  118 +
  119 +func (q *kafkaQueue) Start() {
  120 + q.startConsumers()
  121 + q.startProducers()
  122 +
  123 + q.producerRoutines.Wait()
  124 + close(q.channel)
  125 + q.consumerRoutines.Wait()
  126 +}
  127 +
  128 +func (q *kafkaQueue) Stop() {
  129 + q.consumer.Close()
  130 + logx.Close()
  131 +}
  132 +
  133 +func (q *kafkaQueue) consumeOne(key, val string) error {
  134 + startTime := timex.Now()
  135 + err := q.handler.Consume(key, val)
  136 + q.metrics.Add(stat.Task{
  137 + Duration: timex.Since(startTime),
  138 + })
  139 + return err
  140 +}
  141 +
  142 +func (q *kafkaQueue) startConsumers() {
  143 + for i := 0; i < q.c.NumConsumers; i++ {
  144 + q.consumerRoutines.Run(func() {
  145 + for msg := range q.channel {
  146 + if err := q.consumeOne(string(msg.Key), string(msg.Value)); err != nil {
  147 + logx.Errorf("Error on consuming: %s, error: %v", string(msg.Value), err)
  148 + }
  149 + }
  150 + })
  151 + }
  152 +}
  153 +
  154 +func (q *kafkaQueue) startProducers() {
  155 + for i := 0; i < q.c.NumProducers; i++ {
  156 + q.producerRoutines.Run(func() {
  157 + for {
  158 + msg, err := q.consumer.ReadMessage(context.Background())
  159 + // io.EOF means consumer closed
  160 + // io.ErrClosedPipe means committing messages on the consumer,
  161 + // kafka will refire the messages on uncommitted messages, ignore
  162 + if err == io.EOF || err == io.ErrClosedPipe {
  163 + return
  164 + }
  165 + if err != nil {
  166 + logx.Errorf("Error on reading mesage, %q", err.Error())
  167 + continue
  168 + }
  169 + q.channel <- msg
  170 + }
  171 + })
  172 + }
  173 +}
  174 +
  175 +func (q kafkaQueues) Start() {
  176 + for _, each := range q.queues {
  177 + q.group.Add(each)
  178 + }
  179 + q.group.Start()
  180 +}
  181 +
  182 +func (q kafkaQueues) Stop() {
  183 + q.group.Stop()
  184 +}
  185 +
  186 +func WithCommitInterval(interval time.Duration) QueueOption {
  187 + return func(options *queueOptions) {
  188 + options.commitInterval = interval
  189 + }
  190 +}
  191 +
  192 +func WithHandle(handle ConsumeHandle) ConsumeHandler {
  193 + return innerConsumeHandler{
  194 + handle: handle,
  195 + }
  196 +}
  197 +
  198 +func WithMaxWait(wait time.Duration) QueueOption {
  199 + return func(options *queueOptions) {
  200 + options.maxWait = wait
  201 + }
  202 +}
  203 +
  204 +func WithMetrics(metrics *stat.Metrics) QueueOption {
  205 + return func(options *queueOptions) {
  206 + options.metrics = metrics
  207 + }
  208 +}
  209 +
  210 +type innerConsumeHandler struct {
  211 + handle ConsumeHandle
  212 +}
  213 +
  214 +func (ch innerConsumeHandler) Consume(k, v string) error {
  215 + return ch.handle(k, v)
  216 +}
  217 +
  218 +func ensureQueueOptions(c KqConf, options *queueOptions) {
  219 + if options.commitInterval == 0 {
  220 + options.commitInterval = defaultCommitInterval
  221 + }
  222 + if options.maxWait == 0 {
  223 + options.maxWait = defaultMaxWait
  224 + }
  225 + if options.metrics == nil {
  226 + options.metrics = stat.NewMetrics(c.Name)
  227 + }
  228 +}
  1 +# go-stash项目介绍
  2 +
  3 +go-stash is a free and open server-side data processing pipeline that ingests data from Kafka, transforms it, and then sends it to ElasticSearch.
  4 +
  1 +package config
  2 +
  3 +import (
  4 + "time"
  5 +
  6 + "github.com/tal-tech/go-stash/kq"
  7 +)
  8 +
  9 +type (
  10 + Condition struct {
  11 + Key string
  12 + Value string
  13 + Type string `json:",default=match,options=match|contains"`
  14 + Op string `json:",default=and,options=and|or"`
  15 + }
  16 +
  17 + ElasticSearchConf struct {
  18 + Hosts []string
  19 + DailyIndexPrefix string
  20 + TimeZone string `json:",optional"`
  21 + MaxChunkBytes int `json:",default=1048576"`
  22 + Compress bool `json:",default=false"`
  23 + }
  24 +
  25 + Filter struct {
  26 + Action string `json:",options=drop|remove_field"`
  27 + Conditions []Condition `json:",optional"`
  28 + Fields []string `json:",optional"`
  29 + }
  30 +
  31 + Config struct {
  32 + Input struct {
  33 + Kafka kq.KqConf
  34 + }
  35 + Filters []Filter
  36 + Output struct {
  37 + ElasticSearch ElasticSearchConf
  38 + }
  39 + GracePeriod time.Duration `json:",default=10s"`
  40 + }
  41 +)
  1 +package es
  2 +
  3 +import (
  4 + "context"
  5 + "sync"
  6 + "time"
  7 +
  8 + "github.com/olivere/elastic"
  9 + "github.com/tal-tech/go-zero/core/fx"
  10 + "github.com/tal-tech/go-zero/core/logx"
  11 + "github.com/tal-tech/go-zero/core/syncx"
  12 +)
  13 +
  14 +const sharedCallsKey = "ensureIndex"
  15 +
  16 +type (
  17 + IndexFormat func(time.Time) string
  18 + IndexFunc func() string
  19 +
  20 + Index struct {
  21 + client *elastic.Client
  22 + indexFormat IndexFormat
  23 + index string
  24 + lock sync.RWMutex
  25 + sharedCalls syncx.SharedCalls
  26 + }
  27 +)
  28 +
  29 +func NewIndex(client *elastic.Client, indexFormat IndexFormat) *Index {
  30 + return &Index{
  31 + client: client,
  32 + indexFormat: indexFormat,
  33 + sharedCalls: syncx.NewSharedCalls(),
  34 + }
  35 +}
  36 +
  37 +func (idx *Index) GetIndex(t time.Time) string {
  38 + index := idx.indexFormat(t)
  39 + if err := idx.ensureIndex(index); err != nil {
  40 + logx.Error(err)
  41 + }
  42 + return index
  43 +}
  44 +
  45 +func (idx *Index) ensureIndex(index string) error {
  46 + idx.lock.RLock()
  47 + if index == idx.index {
  48 + idx.lock.RUnlock()
  49 + return nil
  50 + }
  51 + idx.lock.RUnlock()
  52 +
  53 + _, err := idx.sharedCalls.Do(sharedCallsKey, func() (i interface{}, err error) {
  54 + idx.lock.Lock()
  55 + defer idx.lock.Unlock()
  56 +
  57 + existsService := elastic.NewIndicesExistsService(idx.client)
  58 + existsService.Index([]string{index})
  59 + exist, err := existsService.Do(context.Background())
  60 + if err != nil {
  61 + return nil, err
  62 + }
  63 + if exist {
  64 + idx.index = index
  65 + return nil, nil
  66 + }
  67 +
  68 + createService := idx.client.CreateIndex(index)
  69 + if err := fx.DoWithRetries(func() error {
  70 + // is it necessary to check the result?
  71 + _, err := createService.Do(context.Background())
  72 + return err
  73 + }); err != nil {
  74 + return nil, err
  75 + }
  76 +
  77 + idx.index = index
  78 + return nil, nil
  79 + })
  80 + return err
  81 +}
  1 +package es
  2 +
  3 +import (
  4 + "context"
  5 + "time"
  6 +
  7 + "github.com/olivere/elastic"
  8 + "github.com/tal-tech/go-stash/stash/config"
  9 + "github.com/tal-tech/go-zero/core/executors"
  10 + "github.com/tal-tech/go-zero/core/logx"
  11 +)
  12 +
  13 +const docType = "doc"
  14 +
  15 +type (
  16 + Writer struct {
  17 + client *elastic.Client
  18 + indexer *Index
  19 + inserter *executors.ChunkExecutor
  20 + }
  21 +
  22 + valueWithTime struct {
  23 + t time.Time
  24 + val string
  25 + }
  26 +)
  27 +
  28 +func NewWriter(c config.ElasticSearchConf, indexer *Index) (*Writer, error) {
  29 + client, err := elastic.NewClient(
  30 + elastic.SetSniff(false),
  31 + elastic.SetURL(c.Hosts...),
  32 + elastic.SetGzip(c.Compress),
  33 + )
  34 + if err != nil {
  35 + return nil, err
  36 + }
  37 +
  38 + writer := Writer{
  39 + client: client,
  40 + indexer: indexer,
  41 + }
  42 + writer.inserter = executors.NewChunkExecutor(writer.execute, executors.WithChunkBytes(c.MaxChunkBytes))
  43 + return &writer, nil
  44 +}
  45 +
  46 +func (w *Writer) Write(t time.Time, val string) error {
  47 + return w.inserter.Add(valueWithTime{
  48 + t: t,
  49 + val: val,
  50 + }, len(val))
  51 +}
  52 +
  53 +func (w *Writer) execute(vals []interface{}) {
  54 + var bulk = w.client.Bulk()
  55 + for _, val := range vals {
  56 + pair := val.(valueWithTime)
  57 + req := elastic.NewBulkIndexRequest().Index(w.indexer.GetIndex(pair.t)).Type(docType).Doc(pair.val)
  58 + bulk.Add(req)
  59 + }
  60 + _, err := bulk.Do(context.Background())
  61 + if err != nil {
  62 + logx.Error(err)
  63 + }
  64 +}
  1 +{
  2 + "Input": {
  3 + "Kafka": {
  4 + "Name": "gostash",
  5 + "Brokers": [
  6 + "172.16.186.16:19092",
  7 + "172.16.186.17:19092"
  8 + ],
  9 + "Topic": "k8slog",
  10 + "Group": "pro",
  11 + "NumProducers": 16,
  12 + "MetricsUrl": "http://localhost:2222/add"
  13 + }
  14 + },
  15 + "Filters": [
  16 + {
  17 + "Action": "drop",
  18 + "Conditions": [
  19 + {
  20 + "Key": "k8s_container_name",
  21 + "Value": "-rpc",
  22 + "Type": "contains"
  23 + },
  24 + {
  25 + "Key": "level",
  26 + "Value": "info",
  27 + "Type": "match",
  28 + "Op": "and"
  29 + }
  30 + ]
  31 + },
  32 + {
  33 + "Action": "remove_field",
  34 + "Fields": [
  35 + "message",
  36 + "_source",
  37 + "_type",
  38 + "_score",
  39 + "_id",
  40 + "@version",
  41 + "topic",
  42 + "index",
  43 + "beat",
  44 + "docker_container",
  45 + "offset",
  46 + "prospector",
  47 + "source",
  48 + "stream"
  49 + ]
  50 + }
  51 + ],
  52 + "Output": {
  53 + "ElasticSearch": {
  54 + "Hosts": [
  55 + "172.16.141.4:9200",
  56 + "172.16.141.5:9200"
  57 + ],
  58 + "DailyIndexPrefix": "k8s_pro-"
  59 + }
  60 + }
  61 +}
  1 +package filter
  2 +
  3 +import (
  4 + "strings"
  5 +
  6 + "github.com/globalsign/mgo/bson"
  7 + "github.com/tal-tech/go-stash/stash/config"
  8 +)
  9 +
  10 +const (
  11 + filterDrop = "drop"
  12 + filterRemoveFields = "remove_field"
  13 + opAnd = "and"
  14 + opOr = "or"
  15 + typeContains = "contains"
  16 + typeMatch = "match"
  17 +)
  18 +
  19 +type FilterFunc func(map[string]interface{}) map[string]interface{}
  20 +
  21 +func CreateFilters(c config.Config) []FilterFunc {
  22 + var filters []FilterFunc
  23 +
  24 + for _, f := range c.Filters {
  25 + switch f.Action {
  26 + case filterDrop:
  27 + filters = append(filters, DropFilter(f.Conditions))
  28 + case filterRemoveFields:
  29 + filters = append(filters, RemoveFieldFilter(f.Fields))
  30 + }
  31 + }
  32 +
  33 + return filters
  34 +}
  35 +
  36 +func DropFilter(conds []config.Condition) FilterFunc {
  37 + return func(m map[string]interface{}) map[string]interface{} {
  38 + var qualify bool
  39 + for _, cond := range conds {
  40 + var qualifyOnce bool
  41 + switch cond.Type {
  42 + case typeMatch:
  43 + qualifyOnce = cond.Value == m[cond.Key]
  44 + case typeContains:
  45 + if val, ok := m[cond.Key].(string); ok {
  46 + qualifyOnce = strings.Contains(val, cond.Value)
  47 + }
  48 + }
  49 +
  50 + switch cond.Op {
  51 + case opAnd:
  52 + if !qualifyOnce {
  53 + return m
  54 + } else {
  55 + qualify = true
  56 + }
  57 + case opOr:
  58 + if qualifyOnce {
  59 + qualify = true
  60 + }
  61 + }
  62 + }
  63 +
  64 + if qualify {
  65 + return nil
  66 + } else {
  67 + return m
  68 + }
  69 + }
  70 +}
  71 +
  72 +func RemoveFieldFilter(fields []string) FilterFunc {
  73 + return func(m map[string]interface{}) map[string]interface{} {
  74 + for _, field := range fields {
  75 + delete(m, field)
  76 + }
  77 + return m
  78 + }
  79 +}
  80 +
  81 +func AddUriFieldFilter(inField, outFirld string) FilterFunc {
  82 + return func(m map[string]interface{}) map[string]interface{} {
  83 + if val, ok := m[inField].(string); ok {
  84 + var datas []string
  85 + idx := strings.Index(val, "?")
  86 + if idx < 0 {
  87 + datas = strings.Split(val, "/")
  88 + } else {
  89 + datas = strings.Split(val[:idx], "/")
  90 + }
  91 +
  92 + for i, data := range datas {
  93 + if bson.IsObjectIdHex(data) {
  94 + datas[i] = "*"
  95 + }
  96 + }
  97 +
  98 + m[outFirld] = strings.Join(datas, "/")
  99 + }
  100 +
  101 + return m
  102 + }
  103 +}
  1 +package handler
  2 +
  3 +import (
  4 + "time"
  5 +
  6 + jsoniter "github.com/json-iterator/go"
  7 + "github.com/tal-tech/go-stash/stash/es"
  8 + "github.com/tal-tech/go-stash/stash/filter"
  9 +)
  10 +
  11 +const (
  12 + timestampFormat = "2006-01-02T15:04:05.000Z"
  13 + timestampKey = "@timestamp"
  14 +)
  15 +
  16 +type MessageHandler struct {
  17 + writer *es.Writer
  18 + filters []filter.FilterFunc
  19 +}
  20 +
  21 +func NewHandler(writer *es.Writer) *MessageHandler {
  22 + return &MessageHandler{
  23 + writer: writer,
  24 + }
  25 +}
  26 +
  27 +func (mh *MessageHandler) AddFilters(filters ...filter.FilterFunc) {
  28 + for _, f := range filters {
  29 + mh.filters = append(mh.filters, f)
  30 + }
  31 +}
  32 +
  33 +func (mh *MessageHandler) Consume(_, val string) error {
  34 + m := make(map[string]interface{})
  35 + if err := jsoniter.Unmarshal([]byte(val), &m); err != nil {
  36 + return err
  37 + }
  38 +
  39 + for _, proc := range mh.filters {
  40 + if m = proc(m); m == nil {
  41 + return nil
  42 + }
  43 + }
  44 +
  45 + bs, err := jsoniter.Marshal(m)
  46 + if err != nil {
  47 + return err
  48 + }
  49 +
  50 + return mh.writer.Write(mh.getTime(m), string(bs))
  51 +}
  52 +
  53 +func (mh *MessageHandler) getTime(m map[string]interface{}) time.Time {
  54 + if ti, ok := m[timestampKey]; ok {
  55 + if ts, ok := ti.(string); ok {
  56 + if t, err := time.Parse(timestampFormat, ts); err == nil {
  57 + return t
  58 + }
  59 + }
  60 + }
  61 +
  62 + return time.Now()
  63 +}
  1 +package main
  2 +
  3 +import (
  4 + "flag"
  5 + "time"
  6 +
  7 + "github.com/olivere/elastic"
  8 + "github.com/tal-tech/go-stash/kq"
  9 + "github.com/tal-tech/go-stash/stash/config"
  10 + "github.com/tal-tech/go-stash/stash/es"
  11 + "github.com/tal-tech/go-stash/stash/filter"
  12 + "github.com/tal-tech/go-stash/stash/handler"
  13 + "github.com/tal-tech/go-zero/core/conf"
  14 + "github.com/tal-tech/go-zero/core/lang"
  15 + "github.com/tal-tech/go-zero/core/proc"
  16 +)
  17 +
  18 +const dateFormat = "2006.01.02"
  19 +
  20 +var configFile = flag.String("f", "etc/config.json", "Specify the config file")
  21 +
  22 +func main() {
  23 + flag.Parse()
  24 +
  25 + var c config.Config
  26 + conf.MustLoad(*configFile, &c)
  27 + proc.SetTimeoutToForceQuit(c.GracePeriod)
  28 +
  29 + client, err := elastic.NewClient(
  30 + elastic.SetSniff(false),
  31 + elastic.SetURL(c.Output.ElasticSearch.Hosts...),
  32 + )
  33 + lang.Must(err)
  34 +
  35 + indexFormat := c.Output.ElasticSearch.DailyIndexPrefix + dateFormat
  36 + var loc *time.Location
  37 + if len(c.Output.ElasticSearch.TimeZone) > 0 {
  38 + loc, err = time.LoadLocation(c.Output.ElasticSearch.TimeZone)
  39 + lang.Must(err)
  40 + } else {
  41 + loc = time.Local
  42 + }
  43 + indexer := es.NewIndex(client, func(t time.Time) string {
  44 + return t.In(loc).Format(indexFormat)
  45 + })
  46 +
  47 + filters := filter.CreateFilters(c)
  48 + writer, err := es.NewWriter(c.Output.ElasticSearch, indexer)
  49 + lang.Must(err)
  50 +
  51 + handle := handler.NewHandler(writer)
  52 + handle.AddFilters(filters...)
  53 + handle.AddFilters(filter.AddUriFieldFilter("url", "uri"))
  54 + q := kq.MustNewQueue(c.Input.Kafka, handle)
  55 + q.Start()
  56 +}