diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f061778..ed895f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,23 +31,10 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - name: Dump github context - run: echo "$GITHUB_CONTEXT" - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - - name: Dump runner context - run: echo "$RUNNER_CONTEXT" - env: - RUNNER_CONTEXT: ${{ toJson(runner) }} - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 with: - go-version: "1.16" - - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + cache: true + go-version-file: "go.mod" - name: Lint run: make lint diff --git a/go.mod b/go.mod index 1c1c85f..20bb403 100644 --- a/go.mod +++ b/go.mod @@ -1,23 +1,31 @@ module github.com/v3io/v3io-go -go 1.14 +go 1.19 require ( + github.com/nuclio/errors v0.0.4 + github.com/nuclio/logger v0.0.1 + github.com/nuclio/zap v0.1.2 + github.com/rs/xid v1.4.0 + github.com/stretchr/testify v1.8.1 + github.com/valyala/fasthttp v1.44.0 + golang.org/x/sync v0.1.0 + zombiezen.com/go/capnproto2 v2.17.0+incompatible +) + +require ( + github.com/andybalholm/brotli v1.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/mattn/go-colorable v0.1.1 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/nuclio/errors v0.0.1 - github.com/nuclio/logger v0.0.0-20190303161055-fc1e4b16d127 - github.com/nuclio/zap v0.0.2 - github.com/pavius/zap v1.4.2-0.20180228181622-8d52692529b8 // indirect + github.com/klauspost/compress v1.15.9 // indirect + github.com/liranbg/uberzap v1.20.0-nuclio.1 // indirect + github.com/logrusorgru/aurora/v3 v3.0.0 // indirect github.com/philhofer/fwd v1.0.0 // indirect - github.com/pkg/errors v0.8.1 // indirect - github.com/rs/xid v1.1.0 - github.com/stretchr/testify v1.3.0 + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/tinylib/msgp v1.1.1 // indirect - github.com/valyala/fasthttp v1.2.0 - go.uber.org/atomic v1.3.2 // indirect - go.uber.org/multierr v1.1.0 // indirect - golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a - zombiezen.com/go/capnproto2 v2.17.0+incompatible + github.com/valyala/bytebufferpool v1.0.0 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + golang.org/x/net v0.5.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 67715f9..6c0d874 100644 --- a/go.sum +++ b/go.sum @@ -1,52 +1,105 @@ +github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/klauspost/compress v1.4.0 h1:8nsMz3tWa9SWWPL60G1V6CUsf4lLjWLTNEtibhe8gh8= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e h1:+lIPJOWl+jSiJOc70QXJ07+2eg2Jy2EC7Mi11BWujeM= -github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/nuclio/errors v0.0.1 h1:JoADBDnhRKjW05Npu5CLS27Peo7gx+QZcNrLwINV6UY= -github.com/nuclio/errors v0.0.1/go.mod h1:it2rUqDarIL8PasLYZo0Q1Ebsx4NRPM+OyYYakgNyrQ= -github.com/nuclio/logger v0.0.0-20190303161055-fc1e4b16d127 h1:Xbb9RIEkixjjPNQew893d6GEX12gldJK9EurcPeMURk= -github.com/nuclio/logger v0.0.0-20190303161055-fc1e4b16d127/go.mod h1:ttazNAqTxKjQ7XrGDZxecumGa9KCIuJh88gzFY1mRXo= -github.com/nuclio/zap v0.0.2 h1:rY5PkMOl8CTkqRqIPuxziBiKK6Mq/8oEurfgRnNtqf0= -github.com/nuclio/zap v0.0.2/go.mod h1:SUxPsgePvlyjx6c5MtGdB50pf0IQThtlyLwISLboeuc= -github.com/pavius/zap v1.4.2-0.20180228181622-8d52692529b8 h1:WqLgmr/wj9TO5Sc6oYPQRAJBxuHE0NTeuVeFnT+FZVo= -github.com/pavius/zap v1.4.2-0.20180228181622-8d52692529b8/go.mod h1:6FWOCx06uh50GClv8S2cfk3asqTJs3qq3ZNRtLZE77I= +github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/liranbg/uberzap v1.20.0-nuclio.1 h1:KUh2DHnhhF8q9iuzqZGxbIMg2i/5izyF+a8Cy9C6WsE= +github.com/liranbg/uberzap v1.20.0-nuclio.1/go.mod h1:Tj8cuE+vk7B5p5zywDnPCRk1FZX5UjyVugTtsTTHjxQ= +github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4= +github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/nuclio/errors v0.0.4 h1:Uf/Kfje0VJGYeuNAhuFNaL6bm0O1WCQOg8vEjiY85oQ= +github.com/nuclio/errors v0.0.4/go.mod h1:KV56dHK50bOG4+fSUvCZA9D9Ky4utc5LBGGDCpxa8dY= +github.com/nuclio/logger v0.0.1 h1:e+vT/Ug65RC+u0QX2J+lq3P57ZBwJ1ZA6Q2LCEcViwE= +github.com/nuclio/logger v0.0.1/go.mod h1:ttazNAqTxKjQ7XrGDZxecumGa9KCIuJh88gzFY1mRXo= +github.com/nuclio/zap v0.1.2 h1:0xD5+IHEhbMmxp3T6hN7nRcukuo9+QuB5/zd/XHTqrU= +github.com/nuclio/zap v0.1.2/go.mod h1:n1BZF3JcFiQdap88qHX6IOPBKDjvV/bPcvVe6MFdxUg= github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rs/xid v1.1.0 h1:9Z322kTPrDR5GpxTH+1yl7As6tEHIH9aGsRccl20ELk= -github.com/rs/xid v1.1.0/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= +github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tinylib/msgp v1.1.1 h1:TnCZ3FIuKeaIy+F45+Cnp+caqdXGy4z74HvwXN+570Y= github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.2.0 h1:dzZJf2IuMiclVjdw0kkT+f9u4YdrapbNyGAN47E/qnk= -github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3 h1:czFLhve3vsQetD6JOJ8NZZvGQIXlnN3/yXxbT6/awxI= -golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 h1:DH4skfRX4EBpamg7iV4ZlCpblAHI6s6TDM39bFZumv8= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +github.com/valyala/fasthttp v1.44.0 h1:R+gLUhldIsfg1HokMuQjdQ5bh9nuXHPIfvkYUu9eR5Q= +github.com/valyala/fasthttp v1.44.0/go.mod h1:f6VbjjoI3z1NDOZOv17o6RvtRSWxC77seBFc2uWtgiY= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220906165146-f3363e06e74c/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= zombiezen.com/go/capnproto2 v2.17.0+incompatible h1:sIoKPFGNlM38Qh+PBLa9Wzg1j99oInS/Qlk+5N/CHa4= zombiezen.com/go/capnproto2 v2.17.0+incompatible/go.mod h1:XO5Pr2SbXgqZwn0m0Ru54QBqpOf4K5AYBO+8LAOBQEQ= diff --git a/hack/lint/install.sh b/hack/lint/install.sh index 560aa87..9774752 100755 --- a/hack/lint/install.sh +++ b/hack/lint/install.sh @@ -47,7 +47,7 @@ fi if [[ $FORCE_INSTALL = true || ! -f ${BIN_DIR}/golangci-lint ]] ; then echo "golangci-lint binary does not exist or force install requested. Fetching and installing..." - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${BIN_DIR} v1.49.0 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${BIN_DIR} v1.50.1 echo "golangci-lint installed in: ${BIN_DIR}/golangci-lint" fi diff --git a/hack/test/docker/Dockerfile b/hack/test/docker/Dockerfile index d26ce06..93c9747 100644 --- a/hack/test/docker/Dockerfile +++ b/hack/test/docker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -FROM gcr.io/iguazio/golang:1.14 +FROM gcr.io/iguazio/golang:1.19 ENV GOPATH=/go WORKDIR /v3io-go @@ -26,6 +26,8 @@ RUN apt-get update --allow-releaseinfo-change \ # in case of a change in the dependencies COPY go.mod go.sum ./ +RUN go mod download + # copy everything COPY . . diff --git a/internal/registry/registry.go b/internal/registry/registry.go index 20aefc6..38b4eff 100644 --- a/internal/registry/registry.go +++ b/internal/registry/registry.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package registry diff --git a/internal/registry/registry_test.go b/internal/registry/registry_test.go index 049a781..9fd6503 100644 --- a/internal/registry/registry_test.go +++ b/internal/registry/registry_test.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package registry diff --git a/pkg/common/backoff.go b/pkg/common/backoff.go index 7797221..6be5362 100644 --- a/pkg/common/backoff.go +++ b/pkg/common/backoff.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package common import ( diff --git a/pkg/common/helper.go b/pkg/common/helper.go index fa24fca..6177456 100644 --- a/pkg/common/helper.go +++ b/pkg/common/helper.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package common import ( diff --git a/pkg/controlplane/http/session.go b/pkg/controlplane/http/session.go index 7aa39ce..90427e2 100644 --- a/pkg/controlplane/http/session.go +++ b/pkg/controlplane/http/session.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3iochttp diff --git a/pkg/controlplane/http/types.go b/pkg/controlplane/http/types.go index 7dc0fdf..cc0720f 100644 --- a/pkg/controlplane/http/types.go +++ b/pkg/controlplane/http/types.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3iochttp diff --git a/pkg/controlplane/resources.go b/pkg/controlplane/resources.go index 8130c3d..a2ef6e2 100644 --- a/pkg/controlplane/resources.go +++ b/pkg/controlplane/resources.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3ioc diff --git a/pkg/controlplane/test/controlplane_test.go b/pkg/controlplane/test/controlplane_test.go index 3ebd849..f0c08b3 100644 --- a/pkg/controlplane/test/controlplane_test.go +++ b/pkg/controlplane/test/controlplane_test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package test import ( diff --git a/pkg/controlplane/types.go b/pkg/controlplane/types.go index c95c9a1..a7e2b73 100644 --- a/pkg/controlplane/types.go +++ b/pkg/controlplane/types.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3ioc diff --git a/pkg/dataplane/container.go b/pkg/dataplane/container.go index 214ca02..bc3b433 100644 --- a/pkg/dataplane/container.go +++ b/pkg/dataplane/container.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/dataplane/context.go b/pkg/dataplane/context.go index 5a9455d..d4607ac 100644 --- a/pkg/dataplane/context.go +++ b/pkg/dataplane/context.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/dataplane/http/container.go b/pkg/dataplane/http/container.go index 364f721..f8e79c1 100644 --- a/pkg/dataplane/http/container.go +++ b/pkg/dataplane/http/container.go @@ -17,10 +17,11 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3iohttp import ( - "github.com/v3io/v3io-go/pkg/dataplane" + v3io "github.com/v3io/v3io-go/pkg/dataplane" "github.com/nuclio/logger" ) diff --git a/pkg/dataplane/http/context.go b/pkg/dataplane/http/context.go index 0824e7c..a82768f 100755 --- a/pkg/dataplane/http/context.go +++ b/pkg/dataplane/http/context.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3iohttp import ( @@ -40,7 +41,7 @@ import ( "time" v3io "github.com/v3io/v3io-go/pkg/dataplane" - node_common_capnp "github.com/v3io/v3io-go/pkg/dataplane/schemas/node/common" + nodecommoncapnp "github.com/v3io/v3io-go/pkg/dataplane/schemas/node/common" v3ioerrors "github.com/v3io/v3io-go/pkg/errors" "github.com/nuclio/errors" @@ -239,7 +240,7 @@ func (c *context) GetItem(getItemInput *v3io.GetItemInput, type attributeValuesSection struct { accumulatedPreviousSectionsLength int - data node_common_capnp.VnObjectAttributeValuePtr_List + data nodecommoncapnp.VnObjectAttributeValuePtr_List } // GetItemSync @@ -1446,7 +1447,7 @@ func getSectionAndIndex(values []attributeValuesSection, idx int) (section int, return 0, idx } -func decodeCapnpAttributes(keyValues node_common_capnp.VnObjectItemsGetMappedKeyValuePair_List, values []attributeValuesSection, attributeNames []string) (map[string]interface{}, error) { +func decodeCapnpAttributes(keyValues nodecommoncapnp.VnObjectItemsGetMappedKeyValuePair_List, values []attributeValuesSection, attributeNames []string) (map[string]interface{}, error) { attributes := map[string]interface{}{} for j := 0; j < keyValues.Len(); j++ { attrPtr := keyValues.At(j) @@ -1460,31 +1461,31 @@ func decodeCapnpAttributes(keyValues node_common_capnp.VnObjectItemsGetMappedKey return attributes, errors.Wrapf(err, "values[%d].data.At(%d).Value", sectIdx, valIdx) } switch value.Which() { - case node_common_capnp.ExtAttrValue_Which_qword: + case nodecommoncapnp.ExtAttrValue_Which_qword: attributes[attributeName] = int(value.Qword()) - case node_common_capnp.ExtAttrValue_Which_uqword: + case nodecommoncapnp.ExtAttrValue_Which_uqword: attributes[attributeName] = int(value.Uqword()) - case node_common_capnp.ExtAttrValue_Which_blob: + case nodecommoncapnp.ExtAttrValue_Which_blob: attributes[attributeName], err = value.Blob() if err != nil { return attributes, errors.Wrapf(err, "unable to get value of BLOB attribute '%s'", attributeName) } - case node_common_capnp.ExtAttrValue_Which_str: + case nodecommoncapnp.ExtAttrValue_Which_str: attributes[attributeName], err = value.Str() if err != nil { return attributes, errors.Wrapf(err, "unable to get value of String attribute '%s'", attributeName) } - case node_common_capnp.ExtAttrValue_Which_dfloat: + case nodecommoncapnp.ExtAttrValue_Which_dfloat: attributes[attributeName] = value.Dfloat() - case node_common_capnp.ExtAttrValue_Which_boolean: + case nodecommoncapnp.ExtAttrValue_Which_boolean: attributes[attributeName] = value.Boolean() - case node_common_capnp.ExtAttrValue_Which_time: + case nodecommoncapnp.ExtAttrValue_Which_time: t, err := value.Time() if err != nil { return nil, err } attributes[attributeName] = time.Unix(t.TvSec(), t.TvNsec()) - case node_common_capnp.ExtAttrValue_Which_notExists: + case nodecommoncapnp.ExtAttrValue_Which_notExists: continue // skip default: return attributes, errors.Errorf("getItemsCapnp: %s type for %s attribute is not expected", value.Which().String(), attributeName) @@ -1555,7 +1556,7 @@ func (c *context) getItemsParseCAPNPResponse(response *v3io.Response, withWildca return nil, errors.Errorf("getItemsCapnp: Got only %v capnp sections. Expecting at least 2", len(capnpSections)) } - metadataPayload, err := node_common_capnp.ReadRootVnObjectItemsGetResponseMetadataPayload(capnpSections[len(capnpSections)-1]) + metadataPayload, err := nodecommoncapnp.ReadRootVnObjectItemsGetResponseMetadataPayload(capnpSections[len(capnpSections)-1]) if err != nil { return nil, errors.Wrap(err, "ReadRootVnObjectItemsGetResponseMetadataPayload") } @@ -1592,9 +1593,9 @@ func (c *context) getItemsParseCAPNPResponse(response *v3io.Response, withWildca accLength := 0 //Additional data sections "in between" for capnpSectionIndex := 1; capnpSectionIndex < len(capnpSections)-1; capnpSectionIndex++ { - data, err := node_common_capnp.ReadRootVnObjectItemsGetResponseDataPayload(capnpSections[capnpSectionIndex]) + data, err := nodecommoncapnp.ReadRootVnObjectItemsGetResponseDataPayload(capnpSections[capnpSectionIndex]) if err != nil { - return nil, errors.Wrap(err, "node_common_capnp.ReadRootVnObjectAttributeValueMap") + return nil, errors.Wrap(err, "nodecommoncapnp.ReadRootVnObjectAttributeValueMap") } dvmap, err := data.ValueMap() if err != nil { diff --git a/pkg/dataplane/http/headers.go b/pkg/dataplane/http/headers.go index 2da1e49..5872ba0 100755 --- a/pkg/dataplane/http/headers.go +++ b/pkg/dataplane/http/headers.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3iohttp // function names diff --git a/pkg/dataplane/http/session.go b/pkg/dataplane/http/session.go index 431c7e0..20449aa 100644 --- a/pkg/dataplane/http/session.go +++ b/pkg/dataplane/http/session.go @@ -17,13 +17,14 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3iohttp import ( "encoding/base64" "fmt" - "github.com/v3io/v3io-go/pkg/dataplane" + v3io "github.com/v3io/v3io-go/pkg/dataplane" "github.com/nuclio/logger" ) diff --git a/pkg/dataplane/http/types.go b/pkg/dataplane/http/types.go index f76ccad..c40e014 100644 --- a/pkg/dataplane/http/types.go +++ b/pkg/dataplane/http/types.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3iohttp import "github.com/valyala/fasthttp" diff --git a/pkg/dataplane/item.go b/pkg/dataplane/item.go index 22f8e5d..8d2d4f3 100644 --- a/pkg/dataplane/item.go +++ b/pkg/dataplane/item.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/dataplane/itemscursor.go b/pkg/dataplane/itemscursor.go index 2d57889..6cb79e8 100644 --- a/pkg/dataplane/itemscursor.go +++ b/pkg/dataplane/itemscursor.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3io import ( diff --git a/pkg/dataplane/requestresponse.go b/pkg/dataplane/requestresponse.go index aba012e..95777e8 100755 --- a/pkg/dataplane/requestresponse.go +++ b/pkg/dataplane/requestresponse.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/dataplane/session.go b/pkg/dataplane/session.go index 7d67e43..18bebe0 100644 --- a/pkg/dataplane/session.go +++ b/pkg/dataplane/session.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/dataplane/streamconsumergroup/claim.go b/pkg/dataplane/streamconsumergroup/claim.go index 23f5895..7a3830e 100644 --- a/pkg/dataplane/streamconsumergroup/claim.go +++ b/pkg/dataplane/streamconsumergroup/claim.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( @@ -29,7 +30,7 @@ import ( "time" "github.com/v3io/v3io-go/pkg/common" - "github.com/v3io/v3io-go/pkg/dataplane" + v3io "github.com/v3io/v3io-go/pkg/dataplane" v3ioerrors "github.com/v3io/v3io-go/pkg/errors" "github.com/nuclio/errors" diff --git a/pkg/dataplane/streamconsumergroup/config.go b/pkg/dataplane/streamconsumergroup/config.go index be15315..add7989 100644 --- a/pkg/dataplane/streamconsumergroup/config.go +++ b/pkg/dataplane/streamconsumergroup/config.go @@ -17,13 +17,14 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( "time" "github.com/v3io/v3io-go/pkg/common" - "github.com/v3io/v3io-go/pkg/dataplane" + v3io "github.com/v3io/v3io-go/pkg/dataplane" ) type Config struct { diff --git a/pkg/dataplane/streamconsumergroup/member.go b/pkg/dataplane/streamconsumergroup/member.go index 94350b9..291cd81 100644 --- a/pkg/dataplane/streamconsumergroup/member.go +++ b/pkg/dataplane/streamconsumergroup/member.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/streamconsumergroup/sequencenumberhandler.go b/pkg/dataplane/streamconsumergroup/sequencenumberhandler.go index 75c3299..44b6e6f 100644 --- a/pkg/dataplane/streamconsumergroup/sequencenumberhandler.go +++ b/pkg/dataplane/streamconsumergroup/sequencenumberhandler.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/streamconsumergroup/session.go b/pkg/dataplane/streamconsumergroup/session.go index c288d96..17d6ec5 100644 --- a/pkg/dataplane/streamconsumergroup/session.go +++ b/pkg/dataplane/streamconsumergroup/session.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/streamconsumergroup/state.go b/pkg/dataplane/streamconsumergroup/state.go index 057a578..d302c6e 100644 --- a/pkg/dataplane/streamconsumergroup/state.go +++ b/pkg/dataplane/streamconsumergroup/state.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/streamconsumergroup/statehandler.go b/pkg/dataplane/streamconsumergroup/statehandler.go index 5cda3b6..a711da8 100644 --- a/pkg/dataplane/streamconsumergroup/statehandler.go +++ b/pkg/dataplane/streamconsumergroup/statehandler.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/streamconsumergroup/statehandler_test.go b/pkg/dataplane/streamconsumergroup/statehandler_test.go index 5b068be..f082946 100644 --- a/pkg/dataplane/streamconsumergroup/statehandler_test.go +++ b/pkg/dataplane/streamconsumergroup/statehandler_test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( @@ -112,6 +113,12 @@ func (suite *stateHandlerSuite) TestRetainShards() { expectedShardGroup: []int{2, 3}, expectedError: false, }, + { + name: "getUnAssignedShards", + memberID: "0", + existingShardGroups: [][]int{{0, 1}, {2, 3}}, + expectedShardGroup: []int{4, 5}, + }, { name: "failedRetention", memberID: "2", @@ -119,13 +126,6 @@ func (suite *stateHandlerSuite) TestRetainShards() { expectedShardGroup: []int{0, 1}, expectedError: true, }, - { - name: "unexpectedBehaviour", - memberID: "0", - existingShardGroups: [][]int{{0, 1}, {2, 3}}, - expectedShardGroup: []int{4, 5}, - expectedError: true, - }, } { suite.Run(testCase.name, func() { diff --git a/pkg/dataplane/streamconsumergroup/streamconsumergroup.go b/pkg/dataplane/streamconsumergroup/streamconsumergroup.go index 8f51fcc..59a8abe 100644 --- a/pkg/dataplane/streamconsumergroup/streamconsumergroup.go +++ b/pkg/dataplane/streamconsumergroup/streamconsumergroup.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( @@ -28,7 +29,7 @@ import ( "strconv" "github.com/v3io/v3io-go/pkg/common" - "github.com/v3io/v3io-go/pkg/dataplane" + v3io "github.com/v3io/v3io-go/pkg/dataplane" v3ioerrors "github.com/v3io/v3io-go/pkg/errors" "github.com/nuclio/errors" diff --git a/pkg/dataplane/streamconsumergroup/types.go b/pkg/dataplane/streamconsumergroup/types.go index 13a6be1..935a975 100644 --- a/pkg/dataplane/streamconsumergroup/types.go +++ b/pkg/dataplane/streamconsumergroup/types.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package streamconsumergroup import ( diff --git a/pkg/dataplane/test/async_test.go b/pkg/dataplane/test/async_test.go index bbbf01b..c91ec05 100644 --- a/pkg/dataplane/test/async_test.go +++ b/pkg/dataplane/test/async_test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package test import ( diff --git a/pkg/dataplane/test/streamconsumergroup_test.go b/pkg/dataplane/test/streamconsumergroup_test.go index eaffe14..7fcf8af 100644 --- a/pkg/dataplane/test/streamconsumergroup_test.go +++ b/pkg/dataplane/test/streamconsumergroup_test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package test import ( diff --git a/pkg/dataplane/test/sync_test.go b/pkg/dataplane/test/sync_test.go index 7d78b44..02254ce 100644 --- a/pkg/dataplane/test/sync_test.go +++ b/pkg/dataplane/test/sync_test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package test import ( diff --git a/pkg/dataplane/test/test.go b/pkg/dataplane/test/test.go index ce56106..3bc191e 100644 --- a/pkg/dataplane/test/test.go +++ b/pkg/dataplane/test/test.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package test import ( diff --git a/pkg/dataplane/types.go b/pkg/dataplane/types.go index 5082edd..294e413 100755 --- a/pkg/dataplane/types.go +++ b/pkg/dataplane/types.go @@ -1,17 +1,21 @@ /* -Copyright 2018 The v3io Authors. +Copyright 2019 Iguazio Systems Ltd. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 +Licensed under the Apache License, Version 2.0 (the "License") with +an addition restriction as set forth herein. You may not use this +file except in compliance with the License. You may obtain a copy of +the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied. See the License for the specific language governing +permissions and limitations under the License. + +In addition, you may not use the software for any purposes that are +illegal under applicable law, and the grant of the foregoing license +under the Apache 2.0 license is conditioned upon your compliance with +such restriction. */ package v3io diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go index 30aac5e..48f3339 100644 --- a/pkg/errors/errors.go +++ b/pkg/errors/errors.go @@ -17,6 +17,7 @@ illegal under applicable law, and the grant of the foregoing license under the Apache 2.0 license is conditioned upon your compliance with such restriction. */ + package v3ioerrors import (