Skip to content

Commit

Permalink
blobsfile,...: switched to Zstandard
Browse files Browse the repository at this point in the history
  • Loading branch information
tsileo committed Dec 22, 2018
1 parent 765e411 commit 1fa5baf
Show file tree
Hide file tree
Showing 100 changed files with 20,227 additions and 3,263 deletions.
38 changes: 28 additions & 10 deletions go.mod
@@ -1,44 +1,62 @@
module a4.io/blobstash module a4.io/blobstash


require ( require (
a4.io/blobsfile v0.0.0-20181029195936-c742249a3522 a4.io/blobsfile v0.1.0
a4.io/gluapp v0.0.0-20181217122610-c6ba9b02f21b a4.io/gluapp v0.0.0-20181218195258-2be1706b2908
a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f
a4.io/ssse v0.0.0-20181202155639-1949828a8689
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/aws/aws-sdk-go v1.16.6 github.com/aws/aws-sdk-go v1.16.11
github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f
github.com/carbocation/handlers v0.0.0-20140528190747-c939c6d9ef31 // indirect
github.com/carbocation/interpose v0.0.0-20161206215253-723534742ba3 github.com/carbocation/interpose v0.0.0-20161206215253-723534742ba3
github.com/cespare/trie v0.0.0-20150610204604-3fe1a95cbba9 // indirect
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
github.com/codegangsta/negroni v1.0.0 // indirect
github.com/cznic/kv v0.0.0-20181122101858-e9cdcade440e github.com/cznic/kv v0.0.0-20181122101858-e9cdcade440e
github.com/dave/jennifer v1.2.0 github.com/dave/jennifer v1.2.0
github.com/dustin/go-humanize v1.0.0 github.com/dustin/go-humanize v1.0.0
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/evanphx/json-patch v4.1.0+incompatible github.com/evanphx/json-patch v4.1.0+incompatible
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/goods/httpbuf v0.0.0-20120503183857-5709e9bb814c // indirect
github.com/gorilla/context v1.1.1 github.com/gorilla/context v1.1.1
github.com/gorilla/handlers v1.4.0 github.com/gorilla/handlers v1.4.0
github.com/gorilla/mux v1.6.2 github.com/gorilla/mux v1.6.2
github.com/hashicorp/golang-lru v0.5.0 github.com/hashicorp/golang-lru v0.5.0
github.com/inconshreveable/log15 v0.0.0-20180818164646-67afb5ed74ec github.com/inconshreveable/log15 v0.0.0-20180818164646-67afb5ed74ec
github.com/interpose/middleware v0.0.0-20150216143757-05ed56ed52fa // indirect
github.com/justinas/nosurf v0.0.0-20181122113328-3af30e51c05b // indirect
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.4 // indirect
github.com/meatballhat/negroni-logrus v0.0.0-20170801195057-31067281800f // indirect
github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936 github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/onsi/ginkgo v1.7.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029 // indirect
github.com/reiver/go-porterstemmer v1.0.1 github.com/reiver/go-porterstemmer v1.0.1
github.com/restic/chunker v0.2.0 github.com/restic/chunker v0.2.0
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967 github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967
github.com/rwcarlsen/goexif v0.0.0-20180518182100-8d986c03457a github.com/rwcarlsen/goexif v0.0.0-20180518182100-8d986c03457a
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect
github.com/sirupsen/logrus v1.2.0 // indirect
github.com/syndtr/goleveldb v0.0.0-20181128100959-b001fa50d6b2 github.com/syndtr/goleveldb v0.0.0-20181128100959-b001fa50d6b2
github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606 github.com/toqueteos/trie v0.0.0-20150530104557-56fed4a05683 // indirect
github.com/unrolled/secure v0.0.0-20181221173256-0d6b5bb13069
github.com/urfave/negroni v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.1+incompatible github.com/vmihailenco/msgpack v4.0.1+incompatible
github.com/xeonx/timeago v1.0.0-rc3 github.com/xeonx/timeago v1.0.0-rc3
github.com/yuin/gopher-lua v0.0.0-20181214045814-db9ae37725ec github.com/yuin/gopher-lua v0.0.0-20181214045814-db9ae37725ec
github.com/zpatrick/rbac v0.0.0-20180829190353-d2c4f050cf28 github.com/zpatrick/rbac v0.0.0-20180829190353-d2c4f050cf28
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9
golang.org/x/net v0.0.0-20181217023233-e147a9138326 golang.org/x/net v0.0.0-20181220203305-927f97764cc3
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 // indirect golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect
google.golang.org/appengine v1.4.0 // indirect
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec
gopkg.in/src-d/enry.v1 v1.6.7 gopkg.in/src-d/enry.v1 v1.6.7
gopkg.in/src-d/go-billy.v4 v4.3.0 // indirect
gopkg.in/src-d/go-git-fixtures.v3 v3.3.0 // indirect
gopkg.in/src-d/go-git.v4 v4.8.1 gopkg.in/src-d/go-git.v4 v4.8.1
gopkg.in/toqueteos/substring.v1 v1.0.2 // indirect
gopkg.in/yaml.v2 v2.2.2 gopkg.in/yaml.v2 v2.2.2
) )
21 changes: 21 additions & 0 deletions go.sum
@@ -1,12 +1,19 @@
a4.io/blobsfile v0.0.0-20181029195936-c742249a3522 h1:QVL41vUxtKA6ceXG4W9ha6ZOERVmpjGRSBW9bbuaje4= a4.io/blobsfile v0.0.0-20181029195936-c742249a3522 h1:QVL41vUxtKA6ceXG4W9ha6ZOERVmpjGRSBW9bbuaje4=
a4.io/blobsfile v0.0.0-20181029195936-c742249a3522/go.mod h1:jTrsc9CgnEavpl6Tmowi2bZbGXldVGr5gvkFsS12bKs= a4.io/blobsfile v0.0.0-20181029195936-c742249a3522/go.mod h1:jTrsc9CgnEavpl6Tmowi2bZbGXldVGr5gvkFsS12bKs=
a4.io/blobsfile v0.1.0 h1:nE9v20zzfL7UKvZuA2J42ncYBCqZ9mgVU9am9+XZdZk=
a4.io/blobsfile v0.1.0/go.mod h1:kJFL3M8OxlvHZWzxZ6C9o+ky9iJHmx0jZj59nilWzJM=
a4.io/blobstash v0.0.0-20181216235946-aa2d4a59f200/go.mod h1:PVI3EM/VmUQAz7pbz/govGO4gHypTF5YWhS56qETj+M= a4.io/blobstash v0.0.0-20181216235946-aa2d4a59f200/go.mod h1:PVI3EM/VmUQAz7pbz/govGO4gHypTF5YWhS56qETj+M=
a4.io/blobstash v0.0.0-20181218201750-765e41187e8a/go.mod h1:QH1JUxPtdWiC/hCXrfzS03p5tX9mqALuBzUd2yYflso=
a4.io/gluapp v0.0.0-20181203183836-c136dc4e9123 h1:k15yXbQ2YfmsxIvcVmuNEGNaE4Gh792Ciye6nTDV0rM= a4.io/gluapp v0.0.0-20181203183836-c136dc4e9123 h1:k15yXbQ2YfmsxIvcVmuNEGNaE4Gh792Ciye6nTDV0rM=
a4.io/gluapp v0.0.0-20181203183836-c136dc4e9123/go.mod h1:rK/CQwI+tDICKCR1szNtBP0rJdH1LCrO/ZnculcIjWI= a4.io/gluapp v0.0.0-20181203183836-c136dc4e9123/go.mod h1:rK/CQwI+tDICKCR1szNtBP0rJdH1LCrO/ZnculcIjWI=
a4.io/gluapp v0.0.0-20181217122610-c6ba9b02f21b h1:0mDg1XGqGMCUMIu69JHmJp17iAKpA8549I26/knLx20= a4.io/gluapp v0.0.0-20181217122610-c6ba9b02f21b h1:0mDg1XGqGMCUMIu69JHmJp17iAKpA8549I26/knLx20=
a4.io/gluapp v0.0.0-20181217122610-c6ba9b02f21b/go.mod h1:hDz8O30eiYv+1bAFzssTvbRaLy27xwk7pdR7v2md7Ew= a4.io/gluapp v0.0.0-20181217122610-c6ba9b02f21b/go.mod h1:hDz8O30eiYv+1bAFzssTvbRaLy27xwk7pdR7v2md7Ew=
a4.io/gluapp v0.0.0-20181218195258-2be1706b2908 h1:4X4w3ef5+gyUErHpxdyMoHXSKUCY9naICJGwdwceLc4=
a4.io/gluapp v0.0.0-20181218195258-2be1706b2908/go.mod h1:hDz8O30eiYv+1bAFzssTvbRaLy27xwk7pdR7v2md7Ew=
a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f h1:mfEWN0Dd2AfIXU5WO5ZfqbFVk63Qz5M/CANs182pm+U= a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f h1:mfEWN0Dd2AfIXU5WO5ZfqbFVk63Qz5M/CANs182pm+U=
a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f/go.mod h1:t7OhwCmPQfuUf8cjm7n8chSbZt5CTILu+dTLu1MQKjQ= a4.io/gluarequire2 v0.0.0-20170611121149-66e0eb2c6a9f/go.mod h1:t7OhwCmPQfuUf8cjm7n8chSbZt5CTILu+dTLu1MQKjQ=
a4.io/ssse v0.0.0-20181202155639-1949828a8689 h1:xXG2KAzqyucPIo7c7zEW9aGUDXV+Fqg5jVrQiw7s2DU=
a4.io/ssse v0.0.0-20181202155639-1949828a8689/go.mod h1:/4k4qDJv4lDmiIcMs9k/5Rs7bU/1FkIvu42oMyf5A7Y=
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 h1:FNCRpXiquG1aoyqcIWVFmpTSKVcx2bQD38uZZeGtdlw= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 h1:FNCRpXiquG1aoyqcIWVFmpTSKVcx2bQD38uZZeGtdlw=
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
Expand All @@ -15,6 +22,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/aws/aws-sdk-go v1.16.6 h1:pig/KdfESvIv4gUu1B8nVAJAURxbPCTt6e5u79Nqxqc= github.com/aws/aws-sdk-go v1.16.6 h1:pig/KdfESvIv4gUu1B8nVAJAURxbPCTt6e5u79Nqxqc=
github.com/aws/aws-sdk-go v1.16.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.16.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.16.11 h1:g/c7gJeVyHoXCxM2fddS85bPGVkBF8s2q8t3fyElegc=
github.com/aws/aws-sdk-go v1.16.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f h1:kqbi9lqXLLs+zfWlgo1PIiRQ86n33K1JKotjj4rSYOg= github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f h1:kqbi9lqXLLs+zfWlgo1PIiRQ86n33K1JKotjj4rSYOg=
github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f/go.mod h1:IInt5XRvpiGE09KOk9mmCMLjHhydIhNPKPPFLFBB7L8= github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f/go.mod h1:IInt5XRvpiGE09KOk9mmCMLjHhydIhNPKPPFLFBB7L8=
github.com/carbocation/handlers v0.0.0-20140528190747-c939c6d9ef31 h1:SDMgCFII5drFRIyAaihze9ceRMpTt1FW6Q5jjpc2u4c= github.com/carbocation/handlers v0.0.0-20140528190747-c939c6d9ef31 h1:SDMgCFII5drFRIyAaihze9ceRMpTt1FW6Q5jjpc2u4c=
Expand Down Expand Up @@ -105,6 +114,8 @@ github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE
github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/reedsolomon v1.7.0 h1:pLFmRKGko2ZieiTGyo9DahLCIuljyxm+Zzhz/fYEonE= github.com/klauspost/reedsolomon v1.7.0 h1:pLFmRKGko2ZieiTGyo9DahLCIuljyxm+Zzhz/fYEonE=
github.com/klauspost/reedsolomon v1.7.0/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4= github.com/klauspost/reedsolomon v1.7.0/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4=
github.com/klauspost/reedsolomon v1.8.0 h1:lvvOkvk64cE1EGbBIgFk7WSOOsI1GexpuLiT7zjab6g=
github.com/klauspost/reedsolomon v1.8.0/go.mod h1:CwCi+NUr9pqSVktrkN+Ondf06rkhYZ/pcNv7fu+8Un4=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
Expand Down Expand Up @@ -165,8 +176,12 @@ github.com/toqueteos/trie v0.0.0-20150530104557-56fed4a05683 h1:ej8ns+4aeQO+mm9V
github.com/toqueteos/trie v0.0.0-20150530104557-56fed4a05683/go.mod h1:Ywk48QhEqhU1+DwhMkJ2x7eeGxDHiGkAdc9+0DYcbsM= github.com/toqueteos/trie v0.0.0-20150530104557-56fed4a05683/go.mod h1:Ywk48QhEqhU1+DwhMkJ2x7eeGxDHiGkAdc9+0DYcbsM=
github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606 h1:dU9yXzNi9rl6Mou7+3npdfPyeFPb2+7BHs3zL47bhPY= github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606 h1:dU9yXzNi9rl6Mou7+3npdfPyeFPb2+7BHs3zL47bhPY=
github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA= github.com/unrolled/secure v0.0.0-20181022170031-4b6b7cf51606/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
github.com/unrolled/secure v0.0.0-20181221173256-0d6b5bb13069 h1:RKeYksgIwGE8zFJTvXI1WWx09QPrGyaVFMy0vpU7j/o=
github.com/unrolled/secure v0.0.0-20181221173256-0d6b5bb13069/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/gozstd v1.2.1 h1:ZZcVQLO6Ff5I3Ca6OMZFmg5SA9lan3C7kIS84YlRjpY=
github.com/valyala/gozstd v1.2.1/go.mod h1:oYOS+oJovjw9ewtrwEYb9+ybolEXd6pHyLMuAWN5zts=
github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU= github.com/vmihailenco/msgpack v4.0.1+incompatible h1:RMF1enSPeKTlXrXdOcqjFUElywVZjjC6pqse21bKbEU=
github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro= github.com/xanzy/ssh-agent v0.2.0 h1:Adglfbi5p9Z0BmK2oKU9nTG+zKfniSfnaMYB+ULd+Ro=
Expand All @@ -186,6 +201,8 @@ golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6 h1:gT0Y6H7hbVPUtvtk0YGxMXPgN
golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181217023233-e147a9138326 h1:iCzOf0xz39Tstp+Tu/WwyGjUXCk34QhQORRxBeXXTA4= golang.org/x/net v0.0.0-20181217023233-e147a9138326 h1:iCzOf0xz39Tstp+Tu/WwyGjUXCk34QhQORRxBeXXTA4=
golang.org/x/net v0.0.0-20181217023233-e147a9138326/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181217023233-e147a9138326/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -197,10 +214,14 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUk
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM= golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM=
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6 h1:IcgEB62HYgAhX0Nd/QrVgZlxlcyxbGQHElLUhW2X4Fo=
golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk= google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk=
google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
1 change: 1 addition & 0 deletions integration_tests/blobstore_kvstore.py
Expand Up @@ -45,6 +45,7 @@


logging.info('Enumerating blobs') logging.info('Enumerating blobs')
blobs_resp = c._get('/api/blobstore/blobs').json() blobs_resp = c._get('/api/blobstore/blobs').json()
print(blobs_resp)
assert len(blobs_resp['refs']) == 1, 'failed to enumate blobs, expected 1 got {}'.format(len(blobs_resp['refs'])) assert len(blobs_resp['refs']) == 1, 'failed to enumate blobs, expected 1 got {}'.format(len(blobs_resp['refs']))
blob_ref = blobs_resp['refs'][0] blob_ref = blobs_resp['refs'][0]
assert blob_ref['hash'] == blob2.hash, 'failed to enumate blobs, hash does not match, expected {} got {}'.format( assert blob_ref['hash'] == blob2.hash, 'failed to enumate blobs, hash does not match, expected {} got {}'.format(
Expand Down
14 changes: 0 additions & 14 deletions pkg/blobstore/api/api.go
Expand Up @@ -115,20 +115,6 @@ func (bs *BlobStoreAPI) blobHandler() func(http.ResponseWriter, *http.Request) {
} }
// FIXME(tsileo): clean this case, skip a decoding/encoding round and return the bytes as is from the // FIXME(tsileo): clean this case, skip a decoding/encoding round and return the bytes as is from the
// backend storage // backend storage
if r.Header.Get("Accept-Encoding") == "snappy" {
blob, err := bs.bs.GetEncoded(ctx, vars["hash"])
if err != nil {
if err == blobsfile.ErrBlobNotFound {
httputil.WriteJSONError(w, http.StatusNotFound, http.StatusText(http.StatusNotFound))
} else {
httputil.Error(w, err)
}
return
}
httputil.WriteEncoded(r, w, blob)
return
}

blob, err := bs.bs.Get(ctx, vars["hash"]) blob, err := bs.bs.Get(ctx, vars["hash"])
if err != nil { if err != nil {
if err == blobsfile.ErrBlobNotFound { if err == blobsfile.ErrBlobNotFound {
Expand Down
73 changes: 1 addition & 72 deletions pkg/blobstore/blobstore.go
Expand Up @@ -7,7 +7,6 @@ import (
"fmt" "fmt"
"path/filepath" "path/filepath"


"github.com/golang/snappy"
log "github.com/inconshreveable/log15" log "github.com/inconshreveable/log15"


"a4.io/blobsfile" "a4.io/blobsfile"
Expand Down Expand Up @@ -62,8 +61,7 @@ type BlobStore struct {


func New(logger log.Logger, root bool, dir string, conf2 *config.Config, hub *hub.Hub) (*BlobStore, error) { func New(logger log.Logger, root bool, dir string, conf2 *config.Config, hub *hub.Hub) (*BlobStore, error) {
logger.Debug("init") logger.Debug("init")

back, err := blobsfile.New(&blobsfile.Opts{Compression: blobsfile.Zstandard, Directory: filepath.Join(dir, "blobs")})
back, err := blobsfile.New(&blobsfile.Opts{Directory: filepath.Join(dir, "blobs")})
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to init BlobsFile: %v", err) return nil, fmt.Errorf("failed to init BlobsFile: %v", err)
} }
Expand Down Expand Up @@ -181,75 +179,6 @@ func (bs *BlobStore) Put(ctx context.Context, blob *blob.Blob) error {
return nil return nil
} }


func (bs *BlobStore) GetEncoded(ctx context.Context, hash string) ([]byte, error) {
bs.log.Info("OP Get (encoded)", "hash", hash)
blob, err := bs.back.GetEncoded(hash)
switch err {
case nil:
case blobsfile.ErrBlobNotFound:
if !bs.root || bs.s3back == nil {
return nil, err
}

// The blob may be queued for download
inFlight, blb, berr := bs.s3back.BlobWaitingForDownload(hash)
if berr != nil {
return nil, berr
}
if inFlight {
// The blob is queued for download, force the download
blob = blb.Data
blob = snappy.Encode(nil, blb.Data)
err = nil
break
}

// If there's a data cache, it means the blob must be stored on S3
if bs.dataCache != nil {
cached, err := bs.dataCache.Stat(hash)
if err != nil {
return nil, err
}
if cached {
bs.log.Debug("blob found in the data cache", "hash", hash)
blob, _, err = bs.dataCache.Get(hash)
blob = snappy.Encode(nil, blob)
err = nil
break
}

// If the blob is available on S3, download it and add it to the data cache
indexed, err := bs.s3back.Indexed(hash)
if err != nil {
return nil, err
}

if indexed {
bs.log.Debug("blob found on S3", "hash", hash)
blob, err = bs.s3back.Get(hash)
if err != nil {
return nil, err
}
if cerr := bs.dataCache.Add(hash, blob); cerr != nil {
return nil, cerr
}
blob = snappy.Encode(nil, blob)
break
}
}

// Return the original error
return nil, err
default:
return nil, err
}

readCountVar.Add(1)
readVar.Add(int64(len(blob)))

return blob, nil
}

func (bs *BlobStore) Get(ctx context.Context, hash string) ([]byte, error) { func (bs *BlobStore) Get(ctx context.Context, hash string) ([]byte, error) {
bs.log.Info("OP Get", "hash", hash) bs.log.Info("OP Get", "hash", hash)
blob, err := bs.back.Get(hash) blob, err := bs.back.Get(hash)
Expand Down
2 changes: 1 addition & 1 deletion pkg/filetree/filetreeutil/node/node.go
Expand Up @@ -16,7 +16,7 @@ import (
) )


var ( var (
NodeBlobHeader = []byte("#blob/node\n") NodeBlobHeader = []byte("#blobstash/node\n")
NodeBlobMsgpackEncoding = byte('1') NodeBlobMsgpackEncoding = byte('1')
NodeBlobOverhead = len(NodeBlobHeader) + 1 NodeBlobOverhead = len(NodeBlobHeader) + 1
) )
Expand Down
4 changes: 2 additions & 2 deletions pkg/filetree/writer/dirwriter.go
Expand Up @@ -187,9 +187,9 @@ func (up *Uploader) PutDir(path string) (*rnode.RawNode, error) {
up.DirExplorer(path, n, nodes) up.DirExplorer(path, n, nodes)
defer close(nodes) defer close(nodes)
}() }()
// Upload discovered files (100 file descriptor at the same time max). // Upload discovered files (5 file descriptor at the same time max).
wg.Add(1) wg.Add(1)
l := make(chan struct{}, 25) l := make(chan struct{}, 5)
go func() { go func() {
defer wg.Done() defer wg.Done()
for f := range nodes { for f := range nodes {
Expand Down
2 changes: 1 addition & 1 deletion pkg/gitserver/gitserver.go
Expand Up @@ -566,7 +566,7 @@ func (gs *GitServer) nsHandler(w http.ResponseWriter, r *http.Request) {
} }


type GitRepoRefs struct { type GitRepoRefs struct {
Branches []*RefSummary `json"branches"` Branches []*RefSummary `json:"branches"`
Tags []*RefSummary `json:"tags"` Tags []*RefSummary `json:"tags"`
} }


Expand Down
3 changes: 2 additions & 1 deletion pkg/gitserver/lua/lua.go
Expand Up @@ -197,8 +197,9 @@ func newFileStat(L *lua.LState, name string, additions, deletions int) *lua.LTab
} }


func convertRefSummary(L *lua.LState, refSummary *gitserver.RefSummary) *lua.LTable { func convertRefSummary(L *lua.LState, refSummary *gitserver.RefSummary) *lua.LTable {
tbl := L.CreateTable(0, 6) tbl := L.CreateTable(0, 7)
tbl.RawSetH(lua.LString("commit_time_ago"), lua.LString(timeago.English.Format(mustParse(refSummary.Commit.Committer.Date)))) tbl.RawSetH(lua.LString("commit_time_ago"), lua.LString(timeago.English.Format(mustParse(refSummary.Commit.Committer.Date))))
tbl.RawSetH(lua.LString("commit_short_hash"), lua.LString(refSummary.Commit.Hash[:8]))
tbl.RawSetH(lua.LString("commit_hash"), lua.LString(refSummary.Commit.Hash)) tbl.RawSetH(lua.LString("commit_hash"), lua.LString(refSummary.Commit.Hash))
tbl.RawSetH(lua.LString("commit_message"), lua.LString(refSummary.Commit.Message)) tbl.RawSetH(lua.LString("commit_message"), lua.LString(refSummary.Commit.Message))
tbl.RawSetH(lua.LString("commit_author_name"), lua.LString(refSummary.Commit.Committer.Name)) tbl.RawSetH(lua.LString("commit_author_name"), lua.LString(refSummary.Commit.Committer.Name))
Expand Down
8 changes: 0 additions & 8 deletions pkg/stash/stash.go
Expand Up @@ -340,14 +340,6 @@ func (bs *BlobStore) Get(ctx context.Context, hash string) ([]byte, error) {


} }


func (bs *BlobStore) GetEncoded(ctx context.Context, hash string) ([]byte, error) {
dataContext, err := bs.s.dataContext(ctx)
if err != nil {
return nil, err
}
return dataContext.BlobStoreProxy().GetEncoded(ctx, hash)
}

func (bs *BlobStore) Stat(ctx context.Context, hash string) (bool, error) { func (bs *BlobStore) Stat(ctx context.Context, hash string) (bool, error) {
dataContext, err := bs.s.dataContext(ctx) dataContext, err := bs.s.dataContext(ctx)
if err != nil { if err != nil {
Expand Down
13 changes: 0 additions & 13 deletions pkg/stash/store/store.go
Expand Up @@ -301,7 +301,6 @@ func (p *KvStoreProxy) Keys(ctx context.Context, start, end string, limit int) (
type BlobStore interface { type BlobStore interface {
Put(ctx context.Context, blob *blob.Blob) error Put(ctx context.Context, blob *blob.Blob) error
Get(ctx context.Context, hash string) ([]byte, error) Get(ctx context.Context, hash string) ([]byte, error)
GetEncoded(ctx context.Context, hash string) ([]byte, error)
Stat(ctx context.Context, hash string) (bool, error) Stat(ctx context.Context, hash string) (bool, error)
Enumerate(ctx context.Context, start, end string, limit int) ([]*blob.SizedBlobRef, string, error) Enumerate(ctx context.Context, start, end string, limit int) ([]*blob.SizedBlobRef, string, error)
Close() error Close() error
Expand All @@ -324,18 +323,6 @@ func (p *BlobStoreProxy) Get(ctx context.Context, hash string) ([]byte, error) {
return data, nil return data, nil
} }


func (p *BlobStoreProxy) GetEncoded(ctx context.Context, hash string) ([]byte, error) {
data, err := p.BlobStore.GetEncoded(ctx, hash)
switch err {
case nil:
case blobsfile.ErrBlobNotFound:
return p.ReadSrc.GetEncoded(ctx, hash)
default:
return nil, err
}
return data, nil
}

func (p *BlobStoreProxy) Stat(ctx context.Context, hash string) (bool, error) { func (p *BlobStoreProxy) Stat(ctx context.Context, hash string) (bool, error) {
exists, err := p.BlobStore.Stat(ctx, hash) exists, err := p.BlobStore.Stat(ctx, hash)
if err != nil { if err != nil {
Expand Down
7 changes: 4 additions & 3 deletions vendor/a4.io/blobsfile/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1fa5baf

Please sign in to comment.