aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com> 2017-11-08 08:21:11 -0800
committerGravatar Miek Gieben <miek@miek.nl> 2017-11-08 16:21:11 +0000
commitf6caa48b944f3de2a99a7cb8e88d47b4c6fdb1bc (patch)
tree0cd65ed605c6d1efa1b505e7f8a42af98be97743
parent3527be6c0056acbcd8dc9848ff96be2136c68ed5 (diff)
downloadcoredns-f6caa48b944f3de2a99a7cb8e88d47b4c6fdb1bc.tar.gz
coredns-f6caa48b944f3de2a99a7cb8e88d47b4c6fdb1bc.tar.zst
coredns-f6caa48b944f3de2a99a7cb8e88d47b4c6fdb1bc.zip
Update zipkin to the newer version (#1205)
* Update zipkin to the newer version Also update thrift to use head commit Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update vendor directory. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
-rw-r--r--Gopkg.lock26
-rw-r--r--Gopkg.toml9
-rw-r--r--vendor/github.com/apache/thrift/.gitignore64
-rw-r--r--vendor/github.com/apache/thrift/.rustfmt.toml7
-rw-r--r--vendor/github.com/apache/thrift/.travis.yml317
-rw-r--r--vendor/github.com/apache/thrift/CMakeLists.txt9
-rw-r--r--vendor/github.com/apache/thrift/CONTRIBUTING.md110
-rw-r--r--vendor/github.com/apache/thrift/Dockerfile61
-rw-r--r--vendor/github.com/apache/thrift/LANGUAGES.md305
-rwxr-xr-xvendor/github.com/apache/thrift/Makefile.am6
-rw-r--r--vendor/github.com/apache/thrift/NOTICE4
-rw-r--r--vendor/github.com/apache/thrift/README.md55
-rw-r--r--vendor/github.com/apache/thrift/Thrift.podspec4
-rwxr-xr-xvendor/github.com/apache/thrift/appveyor.yml136
-rwxr-xr-xvendor/github.com/apache/thrift/bootstrap.sh3
-rw-r--r--vendor/github.com/apache/thrift/bower.json1
-rw-r--r--vendor/github.com/apache/thrift/composer.json2
-rwxr-xr-xvendor/github.com/apache/thrift/configure.ac248
-rwxr-xr-xvendor/github.com/apache/thrift/doap.rdf8
-rw-r--r--vendor/github.com/apache/thrift/lib/Makefile.am8
-rw-r--r--vendor/github.com/apache/thrift/lib/go/Makefile.am9
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go46
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go2
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go4
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/client.go78
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/client_go17.go13
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/client_pre_go17.go13
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/common_test_go17.go32
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/common_test_pre_go17.go32
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go48
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go13
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/go17.go26
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/http_client.go74
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go35
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/http_transport_go17.go38
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/http_transport_pre_go17.go40
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go25
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go240
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go6
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go30
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_go17.go53
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_pre_go17.go54
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/pre_go17.go26
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/processor.go8
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/processor_go17.go34
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/protocol.go9
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go3
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go54
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go1
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go6
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go2
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go18
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go10
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go57
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/simple_server_test.go127
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/socket.go3
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go5
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go12
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/transport.go3
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go6
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go24
-rw-r--r--vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go29
-rw-r--r--vendor/github.com/apache/thrift/package.json26
-rwxr-xr-xvendor/github.com/apache/thrift/sonar-project.properties4
-rw-r--r--vendor/github.com/go-openapi/spec/items.go1
-rw-r--r--vendor/github.com/opentracing-contrib/go-observer/.gitignore14
-rw-r--r--vendor/github.com/opentracing-contrib/go-observer/LICENSE201
-rw-r--r--vendor/github.com/opentracing-contrib/go-observer/README.md64
-rw-r--r--vendor/github.com/opentracing-contrib/go-observer/observer.go39
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/.travis.yml2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/Makefile7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/scribe.go431
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/ttypes.go185
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/ttypes.go1272
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/circle.yml10
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http.go12
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http_test.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka_test.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe.go7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe_test.go7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/collector_test.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/logger.go5
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/observer.go52
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/sample_test.go30
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/span.go15
-rwxr-xr-xvendor/github.com/openzipkin/zipkin-go-opentracing/thrift/compile.sh (renamed from vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/compile.sh)2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/GoUnusedProtection__.go7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe-consts.go (renamed from vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/constants.go)8
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe.go550
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/GoUnusedProtection__.go7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore-consts.go (renamed from vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/constants.go)7
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore.go1285
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/scribe.thrift (renamed from vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/scribe.thrift)0
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/zipkinCore.thrift (renamed from vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/zipkinCore.thrift)0
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/tracer.go18
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/wire/gen.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go42
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-endpoint.go2
-rw-r--r--vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go86
-rw-r--r--vendor/golang.org/x/crypto/ssh/cipher.go2
-rw-r--r--vendor/golang.org/x/crypto/ssh/terminal/util.go69
-rw-r--r--vendor/golang.org/x/crypto/ssh/transport.go2
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkerrors.sh1
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_dragonfly.go40
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_netbsd.go41
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_openbsd.go41
-rw-r--r--vendor/golang.org/x/sys/unix/types_dragonfly.go2
-rw-r--r--vendor/golang.org/x/sys/unix/types_netbsd.go2
-rw-r--r--vendor/golang.org/x/sys/unix/types_openbsd.go2
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_386.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go1
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go22
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go22
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go24
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go22
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go10
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go60
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go60
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go14
-rw-r--r--vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go14
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go7
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go7
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows_test.go2
150 files changed, 4870 insertions, 2861 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index fbd35d59a..086711ddc 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -22,8 +22,7 @@
[[projects]]
name = "github.com/apache/thrift"
packages = ["lib/go/thrift"]
- revision = "b2a4d4ae21c789b689dd162deb819665567f481c"
- version = "0.10.0"
+ revision = "4f77ab8e296d64c57e6ea1c6e3f0f152bc7d6a3a"
[[projects]]
name = "github.com/asaskevich/govalidator"
@@ -149,7 +148,7 @@
branch = "master"
name = "github.com/go-openapi/spec"
packages = ["."]
- revision = "84b5bee7bcb76f3d17bcbaf421bac44bd5709ca6"
+ revision = "a4fa9574c7aa73b2fc54e251eb9524d0482bb592"
[[projects]]
branch = "master"
@@ -197,7 +196,7 @@
branch = "master"
name = "github.com/grpc-ecosystem/grpc-opentracing"
packages = ["go/otgrpc"]
- revision = "a570af39704b9f3d4bb530d83192a99ea6337d5a"
+ revision = "01f8541d537215b2867e2745a1eb85c58c7c6b81"
[[projects]]
branch = "master"
@@ -233,7 +232,7 @@
branch = "master"
name = "github.com/mailru/easyjson"
packages = ["buffer","jlexer","jwriter"]
- revision = "4d347d79dea0067c945f374f990601decb08abb5"
+ revision = "5f62e4f3afa2f576dc86531b7df4d966b19ef8f8"
[[projects]]
name = "github.com/matttproud/golang_protobuf_extensions"
@@ -248,6 +247,12 @@
revision = "06020f85339e21b2478f756a78e295255ffa4d6a"
[[projects]]
+ branch = "master"
+ name = "github.com/opentracing-contrib/go-observer"
+ packages = ["."]
+ revision = "a52f2342449246d5bcc273e65cbdcfa5f7d6c63c"
+
+[[projects]]
name = "github.com/opentracing/opentracing-go"
packages = [".","ext","log"]
revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38"
@@ -255,9 +260,8 @@
[[projects]]
name = "github.com/openzipkin/zipkin-go-opentracing"
- packages = [".","_thrift/gen-go/scribe","_thrift/gen-go/zipkincore","flag","types","wire"]
- revision = "d88c90182f3fb514be54a1c7adc11a04d41c7da9"
- version = "v0.2.4"
+ packages = [".","flag","thrift/gen-go/scribe","thrift/gen-go/zipkincore","types","wire"]
+ revision = "45e90b00710a4c34a1a7d8a78d90f9b010b0bd4d"
[[projects]]
name = "github.com/pierrec/lz4"
@@ -316,13 +320,13 @@
branch = "master"
name = "golang.org/x/crypto"
packages = ["ssh/terminal"]
- revision = "bd6f299fb381e4c3393d1c4b1f0b94f5e77650c8"
+ revision = "6a293f2d4b14b8e6d3f0539e383f6d0d30fce3fd"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix","windows"]
- revision = "4fe5d7925040acd225bf9c7cee65e82d07f06bff"
+ revision = "75813c647272dd855bda156405bf844a5414f5bf"
[[projects]]
branch = "master"
@@ -374,6 +378,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "9e6593b26c8f9a3841e988e46627fa440748742be455c2523b66b01501796ca4"
+ inputs-digest = "c7279ef091bb11a42d1421f51e53d761113ea23d9e9b993823605883da0f80ff"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/Gopkg.toml b/Gopkg.toml
index 08bbc9150..3a9d9a644 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -15,7 +15,10 @@ ignored = [
[[constraint]]
name = "github.com/openzipkin/zipkin-go-opentracing"
- version = "v0.2.3"
+ revision = "45e90b00710a4c34a1a7d8a78d90f9b010b0bd4d"
+[[override]]
+ name = "github.com/apache/thrift"
+ revision = "4f77ab8e296d64c57e6ea1c6e3f0f152bc7d6a3a"
[[override]]
name = "github.com/ugorji/go"
@@ -23,8 +26,8 @@ ignored = [
# client-go 4.0.0 uses apimachinery 1fd2e63a9a370677308a42f24fd40c86438afddf (see Godep.json)
[[constraint]]
- name = "k8s.io/client-go"
- version = "v4.0.0"
+ name = "k8s.io/client-go"
+ version = "v4.0.0"
[[override]]
name = "k8s.io/apimachinery"
revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"
diff --git a/vendor/github.com/apache/thrift/.gitignore b/vendor/github.com/apache/thrift/.gitignore
index 140c93b00..8f1879e63 100644
--- a/vendor/github.com/apache/thrift/.gitignore
+++ b/vendor/github.com/apache/thrift/.gitignore
@@ -21,6 +21,7 @@
*.swp
*.hi
*~
+tags
.*project
junit*.properties
@@ -36,6 +37,8 @@ node_modules
compile
test-driver
erl_crash.dump
+package-lock.json
+project.lock.json
.sonar
.DS_Store
@@ -101,6 +104,7 @@ erl_crash.dump
/lib/cpp/src/thrift/stamp-h2
/lib/cpp/test/Benchmark
/lib/cpp/test/AllProtocolsTest
+/lib/cpp/test/AnnotationTest
/lib/cpp/test/DebugProtoTest
/lib/cpp/test/DenseProtoTest
/lib/cpp/test/EnumTest
@@ -114,6 +118,7 @@ erl_crash.dump
/lib/cpp/test/TFileTransportTest
/lib/cpp/test/TInterruptTest
/lib/cpp/test/TNonblockingServerTest
+/lib/cpp/test/TNonblockingSSLServerTest
/lib/cpp/test/TPipedTransportTest
/lib/cpp/test/TServerIntegrationTest
/lib/cpp/test/TSocketInterruptTest
@@ -149,6 +154,7 @@ erl_crash.dump
/lib/c_glib/test/testframedtransport
/lib/c_glib/test/testmemorybuffer
/lib/c_glib/test/testoptionalrequired
+/lib/c_glib/test/testtransportsslsocket
/lib/c_glib/test/testsimpleserver
/lib/c_glib/test/teststruct
/lib/c_glib/test/testthrifttest
@@ -204,17 +210,26 @@ erl_crash.dump
/lib/delphi/test/typeregistry/*.identcache
/lib/delphi/test/typeregistry/*.local
/lib/delphi/test/typeregistry/*.dcu
-/lib/erl/.generated
/lib/erl/.eunit
-/lib/erl/ebin
+/lib/erl/.generated
+/lib/erl/.rebar/
/lib/erl/deps/
+/lib/erl/ebin
/lib/erl/src/thrift.app.src
-/lib/erl/test/*.hrl
/lib/erl/test/*.beam
+/lib/erl/test/*.hrl
+/lib/erl/test/Thrift_omit_without.thrift
/lib/haxe/test/bin
/lib/hs/dist
/lib/java/build
+/lib/js/dist
+/lib/js/doc
+/lib/js/package-lock.json
/lib/js/test/build
+/lib/netcore/**/.vs
+/lib/netcore/**/bin
+/lib/netcore/**/obj
+/lib/netcore/**/gen-*
/lib/nodejs/coverage
/lib/nodejs/node_modules/
/lib/perl/MANIFEST
@@ -254,8 +269,22 @@ erl_crash.dump
/lib/php/test/packages/
/lib/py/dist/
/lib/erl/logs/
+/lib/go/pkg
+/lib/go/src
/lib/go/test/gopath/
/lib/go/test/ThriftTest.thrift
+/lib/rs/target/
+/lib/rs/Cargo.lock
+/lib/rs/test/Cargo.lock
+/lib/rs/test/target/
+/lib/rs/test/bin/
+/lib/rs/test/src/base_one.rs
+/lib/rs/test/src/base_two.rs
+/lib/rs/test/src/midlayer.rs
+/lib/rs/test/src/recursive.rs
+/lib/rs/test/src/ultimate.rs
+/lib/rs/*.iml
+/lib/rs/**/*.iml
/libtool
/ltmain.sh
/missing
@@ -276,20 +305,36 @@ erl_crash.dump
/test/log/
/test/test.log
/test/erl/.generated
+/test/erl/.rebar
/test/erl/ebin
/test/go/bin/
/test/go/ThriftTest.thrift
/test/go/gopath
/test/go/pkg/
/test/go/src/code.google.com/
+/test/go/src/common/mock_handler.go
/test/go/src/github.com/golang/
+/test/go/src/golang.org/
/test/go/src/gen/
/test/go/src/thrift
/test/haxe/bin
/test/hs/TestClient
/test/hs/TestServer
+/test/php/php_ext_dir/
/test/py.twisted/_trial_temp/
/test/rb/Gemfile.lock
+/test/netcore/**/.vs
+/test/netcore/**/bin
+/test/netcore/**/obj
+/test/netcore/**/gen-*
+/test/netcore/Thrift
+/test/php/php_ext_dir/
+/test/rs/Cargo.lock
+/test/rs/src/thrift_test.rs
+/test/rs/bin/
+/test/rs/target/
+/test/rs/*.iml
+/test/rs/**/*.iml
/tutorial/cpp/TutorialClient
/tutorial/cpp/TutorialServer
/tutorial/c_glib/tutorial_client
@@ -314,13 +359,26 @@ erl_crash.dump
/tutorial/delphi/DelphiClient/*.identcache
/tutorial/delphi/DelphiServer/*.identcache
/tutorial/delphi/DelphiServer/*.local
+/tutorial/go/gopath
/tutorial/go/go-tutorial
/tutorial/go/calculator-remote
/tutorial/go/src/shared
/tutorial/go/src/tutorial
/tutorial/go/src/git.apache.org
+/tutorial/go/src/golang.org
/tutorial/haxe/bin
/tutorial/hs/dist/
/tutorial/java/build/
/tutorial/js/build/
+/tutorial/netcore/**/.vs
+/tutorial/netcore/**/bin
+/tutorial/netcore/**/obj
+/tutorial/netcore/**/gen-*
+/tutorial/netcore/Thrift
+/tutorial/rs/*.iml
+/tutorial/rs/src/shared.rs
+/tutorial/rs/src/tutorial.rs
+/tutorial/rs/bin
+/tutorial/rs/target
+/tutorial/rs/Cargo.lock
/ylwrap
diff --git a/vendor/github.com/apache/thrift/.rustfmt.toml b/vendor/github.com/apache/thrift/.rustfmt.toml
new file mode 100644
index 000000000..2962d47aa
--- /dev/null
+++ b/vendor/github.com/apache/thrift/.rustfmt.toml
@@ -0,0 +1,7 @@
+max_width = 100
+fn_args_layout = "Block"
+array_layout = "Block"
+where_style = "Rfc"
+generics_indent = "Block"
+fn_call_style = "Block"
+reorder_imported_names = true
diff --git a/vendor/github.com/apache/thrift/.travis.yml b/vendor/github.com/apache/thrift/.travis.yml
index 81a88c3ce..9a94e3649 100644
--- a/vendor/github.com/apache/thrift/.travis.yml
+++ b/vendor/github.com/apache/thrift/.travis.yml
@@ -19,181 +19,178 @@
# build Apache Thrift on Travis CI - https://travis-ci.org/
+#
+# Docker Integration
+# see: build/docker/README.md
+#
+
sudo: required
dist: trusty
+language: cpp
services:
- docker
install:
- - (travis_wait ./build/docker/check_unmodified.sh $DISTRO && touch .unmodified) || true
- - if [ ! -f .unmodified ]; then travis_retry travis_wait docker build -q -t thrift-build:$DISTRO build/docker/$DISTRO; fi
+ - if [[ `uname` == "Linux" ]]; then build/docker/refresh.sh; fi
-script:
- - docker run --net=host -e BUILD_LIBS="$BUILD_LIBS" $BUILD_ENV -v $(pwd):/thrift/src -it thrift-build:$DISTRO build/docker/scripts/$SCRIPT $BUILD_ARG
+stages:
+# - osx # up front for now (for testing)
+ - docker # docker images
+ - thrift # thrift build jobs
env:
global:
- - TEST_NAME=""
- SCRIPT="cmake.sh"
- BUILD_ARG=""
- BUILD_ENV="-e CC=clang -e CXX=clang++"
- - DISTRO=ubuntu
+ - DISTRO=ubuntu-xenial
- BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds
+ - TRAVIS_BUILD_STAGE=test
+ # DOCKER_REPO (this works for all builds as a source for docker images - you can override for fork builds in your Travis settings)
+ - DOCKER_REPO="thrift/thrift-build"
+ # DOCKER_USER (provide in your Travis settings if you want to build and update docker images once, instead of on every job)
+ # DOCKER_PASS (same)
- matrix:
- - TEST_NAME="Cross Language Tests (Binary and Header Protocols)"
- SCRIPT="cross-test.sh"
- BUILD_ARG="-'(binary|header)'"
- BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
-
- - TEST_NAME="Cross Language Tests (Debian) (Binary and Header Protocols)"
- SCRIPT="cross-test.sh"
- BUILD_ARG="-'(binary|header)'"
- BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
- DISTRO=debian
-
- - TEST_NAME="Cross Language Tests (Compact and JSON Protocols)"
- SCRIPT="cross-test.sh"
- BUILD_ARG="-'(compact|json)'"
- BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
-
- - TEST_NAME="Cross Language Tests (Debian) (Compact and JSON Protocols)"
- SCRIPT="cross-test.sh"
- BUILD_ARG="-'(compact|json)'"
- BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
- DISTRO=debian
-
- # TODO: Remove them once migrated to CMake
- # Autotools builds
- - TEST_NAME="C C++ C# D Erlang Haxe Go (automake)"
- SCRIPT="autotools.sh"
- BUILD_ARG="--without-dart --without-haskell --without-java --without-lua --without-nodejs --without-perl --without-php --without-php_extension --without-python --without-ruby"
-
- - TEST_NAME="C C++ - GCC (automake)"
- SCRIPT="autotools.sh"
- BUILD_ARG="--without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-dart --without-ruby --without-haskell --without-go --without-haxe --without-d"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="Java Lua PHP Ruby Dart (automake)"
- SCRIPT="autotools.sh"
- BUILD_ARG="--without-cpp --without-haskell --without-c_glib --without-csharp --without-d --without-erlang --without-go --without-haxe --without-nodejs --without-python --without-perl"
-
- # These are flaky (due to cabal and npm network/server failures) and also have lengthy output
- - TEST_NAME="Haskell Node.js Python Perl (automake)"
- SCRIPT="autotools.sh"
- BUILD_ARG="--without-cpp --without-c_glib --without-csharp --without-d --without-dart --without-erlang --without-go --without-haxe --without-java --without-lua --without-php --without-php_extension --without-ruby"
-
- # CMake build
- - TEST_NAME="All"
-
- - TEST_NAME="All (Debian)"
- DISTRO=debian
-
- - TEST_NAME="C C++ - GCC"
- BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS"
- BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="C++ (Boost Thread)"
- BUILD_LIBS="CPP TESTING TUTORIALS"
- BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
-
- - TEST_NAME="C++ (Boost Thread - GCC)"
- BUILD_LIBS="CPP TESTING TUTORIALS"
- BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="C++ (Std Thread)"
- BUILD_LIBS="CPP TESTING TUTORIALS"
- BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
-
- - TEST_NAME="C++ (Std Thread - GCC)"
- BUILD_LIBS="CPP TESTING TUTORIALS"
- BUILD_ARG="-DWITH_STDTHREADS=ON -DCMAKE_CXX_FLAGS='-std=c++11' -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="Compiler (mingw)"
- BUILD_LIBS=""
- BUILD_ARG="-DCMAKE_TOOLCHAIN_FILE=../build/cmake/mingw32-toolchain.cmake -DBUILD_COMPILER=ON -DBUILD_LIBRARIES=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF"
- BUILD_ENV=""
-
- - TEST_NAME="All - GCC (CentOS)"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
- DISTRO=centos
-
- - TEST_NAME="C C++ - Clang (CentOS)"
- BUILD_LIBS="CPP C_GLIB TESTING TUTORIALS"
- BUILD_ARG="-DWITH_PYTHON=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- DISTRO=centos
-
- - TEST_NAME="Python 2.6 (CentOS 6)"
- BUILD_LIBS="PYTHON TESTING TUTORIALS"
- BUILD_ARG="-DWITH_PYTHON=ON -DWITH_CPP=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
- DISTRO=centos6
-
- # Distribution
- - TEST_NAME="make dist"
- SCRIPT="make-dist.sh"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="Debian Packages"
- SCRIPT="dpkg.sh"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
-
- - TEST_NAME="make dist (Debian)"
- SCRIPT="make-dist.sh"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
- DISTRO=debian
-
- - TEST_NAME="Debian Packages (Debian)"
- SCRIPT="dpkg.sh"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
- DISTRO=debian
-
-matrix:
+jobs:
include:
+ # ------------------------- phase: osx --------------------------
+ # - stage: osx
+ # os: osx
+ # osx_image: xcode9
+ # script: build/docker/scripts/autotools.sh
+
+ # ========================= stage: docker =========================
+ - stage: docker
+ script: true
+ env:
+ - JOB="Docker Build ubuntu-trusty 14.04"
+ - DISTRO=ubuntu-trusty
+ - TRAVIS_BUILD_STAGE=docker
+ - script: true
+ env:
+ - JOB="Docker Build ubuntu-xenial 16.04"
+ - DISTRO=ubuntu-xenial
+ - TRAVIS_BUILD_STAGE=docker
+ - script: true
+ env:
+ - JOB="Docker Build ubuntu-artful 17.10"
+ - DISTRO=ubuntu-artful
+ - TRAVIS_BUILD_STAGE=docker
+
+ # ========================= stage: thrift =======================
+ # ------------------------- phase: cross ------------------------
+ # apache/thrift official PR builds can exceed 50 minutes per job so combine all cross tests
+ - stage: thrift
+ script: build/docker/run.sh
+ if: repo = apache/thrift
+ env:
+ - JOB="Cross Language Tests"
+ - SCRIPT="cross-test.sh"
+ - BUILD_ARG=""
+ - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
+
+ # fork based PR builds cannot exceed 50 minutes per job
+ - stage: thrift
+ script: build/docker/run.sh
+ if: repo != apache/thrift
+ env:
+ - JOB="Cross Language Tests (Binary Protocol)"
+ - SCRIPT="cross-test.sh"
+ - BUILD_ARG="-'(binary)'"
+ - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
+
+ - stage: thrift
+ script: build/docker/run.sh
+ if: repo != apache/thrift
+ env:
+ - JOB="Cross Language Tests (Header, JSON Protocols)"
+ - SCRIPT="cross-test.sh"
+ - BUILD_ARG="-'(header|json)'"
+ - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
+
+ - stage: thrift
+ script: build/docker/run.sh
+ if: repo != apache/thrift
+ env:
+ - JOB="Cross Language Tests (Compact and Multiplexed Protocols)"
+ - SCRIPT="cross-test.sh"
+ - BUILD_ARG="-'(compact|multiplexed)'"
+ - BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
+
+ # ------------------------- phase: sca --------------------------
# QA jobs for code analytics and metrics
- #
- # C/C++ static code analysis with cppcheck
- # add --error-exitcode=1 to --enable=all as soon as everything is fixed
- #
- # Python code style check with flake8
- #
- # search for TODO etc within source tree
- # some statistics about the code base
- # some info about the build machine
- - env: TEST_NAME="cppcheck, flake8, TODO FIXME HACK, LoC and system info"
- install:
- - travis_retry sudo apt-get update
- - travis_retry sudo apt-get install -ym cppcheck sloccount python-flake8
- script:
- # Compiler cppcheck (All)
- - cppcheck --force --quiet --inline-suppr --enable=all -j2 compiler/cpp/src
- # C++ cppcheck (All)
- - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
- # C Glib cppcheck (All)
- - cppcheck --force --quiet --inline-suppr --enable=all -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
- # Silent error checks
- - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 compiler/cpp/src
- - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/cpp/test test/cpp tutorial/cpp
- - cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
- # Python code style
- - flake8 --ignore=E501 lib/py
- - flake8 tutorial/py
- - flake8 --ignore=E501 test/py
- - flake8 test/py.twisted
- - flake8 test/py.tornado
- - flake8 --ignore=E501 test/test.py
- - flake8 --ignore=E501 test/crossrunner
- - flake8 test/features
- # TODO etc
- - grep -r TODO *
- - grep -r FIXME *
- - grep -r HACK *
- # LoC
- - sloccount .
- # System Info
- - dpkg -l
- - uname -a
+ - stage: thrift
+ script: build/docker/run.sh
+ env:
+ - JOB="Static Code Analysis"
+ - SCRIPT="sca.sh"
+ - DISTRO=ubuntu-artful
+
+ # C and C++ undefined behavior.
+ # A binary crashes if undefined behavior occurs and produces a stack trace.
+ # python is disabled, see: THRIFT-4360
+ - script: build/docker/run.sh
+ env:
+ - JOB="UBSan"
+ - SCRIPT="ubsan.sh"
+ - DISTRO=ubuntu-artful
+ - BUILD_ARG="--without-python --without-py3"
+
+ # ------------------------- phase: cmake ------------------------
+ - script: build/docker/run.sh
+ env:
+ - JOB="CMake (Ubuntu Xenial)"
+
+ # C++ specific options: compiler plug-in, threading model
+ - script: build/docker/run.sh
+ env:
+ - JOB="C++98 (Boost Thread)"
+ - SCRIPT="cmake.sh"
+ - BUILD_LIBS="CPP TESTING TUTORIALS"
+ - BUILD_ARG="-DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_STANDARD_REQUIRED=ON -DCMAKE_CXX_EXTENSIONS=OFF --DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
+ - BUILD_ENV=""
+
+ - script: build/docker/run.sh
+ env:
+ - JOB="C++ (Std Thread) and Plugin"
+ - SCRIPT="cmake.sh"
+ - BUILD_LIBS="CPP TESTING TUTORIALS"
+ - BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
+ - BUILD_ENV="-e CC=clang -e CXX=clang++"
+
+ # ------------------------- phase: autotools --------------------
+ # TODO: Remove them once migrated to CMake
+ - script: build/docker/run.sh
+ env:
+ - JOB="Autotools (Ubuntu Artful)"
+ - DISTRO=ubuntu-artful
+ - SCRIPT="autotools.sh"
+ - BUILD_ENV="-e CC=gcc -e CXX=g++"
+
+ - script: build/docker/run.sh
+ env:
+ - JOB="Autotools (Ubuntu Xenial)"
+ - DISTRO=ubuntu-xenial
+ - SCRIPT="autotools.sh"
+ - BUILD_ENV="-e CC=gcc -e CXX=g++"
+
+ - script: build/docker/run.sh
+ env:
+ - JOB="Autotools (Ubuntu Trusty)"
+ - DISTRO=ubuntu-trusty
+ - SCRIPT="autotools.sh"
+ - BUILD_ENV="-e CC=gcc -e CXX=g++"
+
+ # ------------------------- phase: dist -------------------------
+ - script: build/docker/run.sh
+ env:
+ - JOB="make dist"
+ - SCRIPT="make-dist.sh"
+ - BUILD_ENV="-e CC=gcc -e CXX=g++"
+
+ - script: build/docker/run.sh
+ env:
+ - JOB="Debian Packages"
+ - SCRIPT="dpkg.sh"
+ - BUILD_ENV="-e CC=gcc -e CXX=g++"
diff --git a/vendor/github.com/apache/thrift/CMakeLists.txt b/vendor/github.com/apache/thrift/CMakeLists.txt
index 93ed8d2ac..9f57a66c4 100644
--- a/vendor/github.com/apache/thrift/CMakeLists.txt
+++ b/vendor/github.com/apache/thrift/CMakeLists.txt
@@ -17,7 +17,14 @@
# under the License.
#
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.1)
+
+# CMake 3.1 supports C++ standards selection with CMAKE_CXX_STANDARD
+# If you need CMake 3.1+ for Ubuntu 14.04, try
+# https://launchpad.net/~george-edison55/+archive/ubuntu/cmake-3.x
+# If you need CMake 3.1+ for debian "jessie", get it from jessie-backports
+# Otherwise
+# http://cmake.org
project("Apache Thrift")
diff --git a/vendor/github.com/apache/thrift/CONTRIBUTING.md b/vendor/github.com/apache/thrift/CONTRIBUTING.md
index 316da9a00..6268dcf0d 100644
--- a/vendor/github.com/apache/thrift/CONTRIBUTING.md
+++ b/vendor/github.com/apache/thrift/CONTRIBUTING.md
@@ -1,49 +1,91 @@
-## How to contribute
- 1. Help to review and verify existing patches
- 1. Make sure your issue is not all ready in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
- 1. If not, create a ticket describing the change you're proposing in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT)
- 1. Contribute your patch using one of the two methods below
+# How to Contribute #
-### Contributing via a patch
+Thank you for your interest in contributing to the Apache Thrift project! Information on why and how to contribute is available on the Apache Software Foundation (ASF) web site. In particular, we recommend the following to become acquainted with Apache Contributions:
-1. Check out the latest version of the source code
+ * [Contributors Tech Guide](http://www.apache.org/dev/contributors)
+ * [Get involved!](http://www.apache.org/foundation/getinvolved.html)
+ * [Legal aspects on Submission of Contributions (Patches)](http://www.apache.org/licenses/LICENSE-2.0.html#contributions)
- * git clone https://git-wip-us.apache.org/repos/asf/thrift.git thrift
+## If you want to review open issues... ##
-1. Modify the source to include the improvement/bugfix
+ 1. Review the [GitHub Pull Request Backlog](https://github.com/apache/thrift/pulls). Code reviews are open to all.
+ 2. Review the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT). You can search for tickets relating to languages you are interested in or currently using with thrift, for example a Jira search (Issues -> Search For Issues) query of ``project = THRIFT AND component in ("Erlang - Library") and status not in (resolved, closed)`` will locate all the open Erlang Library issues.
- * Remember to provide *tests* for all submited changes
- * When bugfixing: add test that will isolate bug *before* applying change that fixes it
- * Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
+## If you discovered a defect... ##
-1. Create a patch from project root directory (e.g. you@dev:~/thrift $ ):
+ 1. Check to see if the issue is already in the [Jira issue tracker](http://issues.apache.org/jira/browse/THRIFT).
+ 1. If not, create a ticket describing the change you're proposing in the Jira issue tracker.
+ 1. Contribute your code changes using the GitHub pull request method:
- * git diff > ../thrift-XXX-my-new-feature.patch
+## Contributing via GitHub pull requests ##
-1. Attach the newly generated patch to the issue
-1. Wait for other contributors or committers to review your new addition
-1. Wait for a committer to commit your patch
+This is the preferred method of submitting changes. When you submit a pull request through github, it activates the continuous integration (CI) build systems at Appveyor and Travis to build your changes on a variety of Windows and Linux configurations and run all the test suites.
-### Contributing via GitHub pull requests
+ 1. Create a fork in your GitHub account of http://github.com/apache/thrift
+ 1. Clone the fork to your development system.
+ 1. Create a branch for your changes (best practice is issue as branch name, e.g. THRIFT-9999).
+ 1. Modify the source to include the improvement/bugfix, and:
-1. Create a fork for http://github.com/apache/thrift
-1. Create a branch for your changes(best practice is issue as branch name, e.g. THRIFT-9999)
-1. Modify the source to include the improvement/bugfix
+ * Remember to provide *tests* for all submitted changes!
+ * Use test-driven development (TDD): add a test that will isolate the bug *before* applying a change that fixes it.
+ * Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages).
+ * [*optional*] Verify that your change works on other platforms by adding a GitHub service hook to [Travis CI](http://docs.travis-ci.com/user/getting-started/#Step-one%3A-Sign-in) and [AppVeyor](http://www.appveyor.com/docs). You can use this technique to run the Thrift CI jobs in your account to check your changes before they are made public. Every GitHub pull request into Thrift will run the full CI build and test suite on your changes.
- * Remember to provide *tests* for all submited changes
- * When bugfixing: add test that will isolate bug *before* applying change that fixes it
- * Verify that you follow [Thrift Coding Standards](/docs/coding_standards) (you can run 'make style', which ensures proper format for some languages)
- * Verify that your change works on other platforms by adding a GitHub service hook to [Travis CI](http://docs.travis-ci.com/user/getting-started/#Step-one%3A-Sign-in) and [AppVeyor](http://www.appveyor.com/docs)
+ 1. Squash your changes to a single commit. This is very important as it makes the process of applying your commit upstream much easier.
+ 1. Commit and push changes to your branch (please use issue name and description as commit title, e.g. "THRIFT-9999: make it perfect").
+ 1. Use GitHub to create a pull request going from your branch to apache:master. Ensure that the Jira ticket number is at the beginning of the title of your pull request, same as the commit title.
+ 1. Wait for other contributors or committers to review your new addition, and for a CI build to complete.
+ 1. Wait for a committer to commit your patch. You can nudge the committers if necessary by sending a message to the [Apache Thrift mailing list](https://thrift.apache.org/mailing).
-1. Commit and push changes to your branch (please use issue name and description as commit title, e.g. THRIFT-9999 make it perfect)
-1. Issue a pull request with the jira ticket number you are working on in it's name
-1. Wait for other contributors or committers to review your new addition
-1. Wait for a committer to commit your patch
+## Contributing via Patch ##
-### More info
+Some changes do not require a build, for example in documentation. For changes that are not code or build related, you can submit a patch on Jira for review. To create a patch from changes in your local directory:
- Plenty of information on why and how to contribute is available on the Apache Software Foundation (ASF) web site. In particular, we recommend the following:
+ git diff > ../THRIFT-NNNN.patch
- * [Contributors Tech Guide](http://www.apache.org/dev/contributors)
- * [Get involved!](http://www.apache.org/foundation/getinvolved.html)
- * [Legal aspects on Submission of Contributions (Patches)](http://www.apache.org/licenses/LICENSE-2.0.html#contributions)
+then wait for contributors or committers to review your changes, and then for a committer to apply your patch.
+
+## GitHub recipes for Pull Requests ##
+
+Sometimes commmitters may ask you to take actions in your pull requests. Here are some recipes that will help you accomplish those requests. These examples assume you are working on Jira issue THRIFT-9999. You should also be familiar with the [upstream](https://help.github.com/articles/syncing-a-fork/) repository concept.
+
+### Squash your changes ###
+
+If you have not submitted a pull request yet, or if you have not yet rebased your existing pull request, you can squash all your commits down to a single commit. This makes life easier for the committers. If your pull request on GitHub has more than one commit, you should do this.
+
+1. Use the command ``git log`` to identify how many commits you made since you began.
+2. Use the command ``git rebase -i HEAD~N`` where N is the number of commits.
+3. Leave "pull" in the first line.
+4. Change all other lines from "pull" to "fixup".
+5. All your changes are now in a single commit.
+
+If you already have a pull request outstanding, you will need to do a "force push" to overwrite it since you changed your commit history:
+
+ git push -u origin THRIFT-9999 --force
+
+A more detailed walkthrough of a squash can be found at [Git Ready](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).
+
+### Rebase your pull request ###
+
+If your pull request has a conflict with master, it needs to be rebased:
+
+ git checkout THRIFT-9999
+ git rebase upstream master
+ (resolve any conflicts, make sure it builds)
+ git push -u origin THRIFT-9999 --force
+
+### Fix a bad merge ###
+
+If your pull request contains commits that are not yours, then you should use the following technique to fix the bad merge in your branch:
+
+ git checkout master
+ git pull upstream master
+ git checkout -b THRIFT-9999-take-2
+ git cherry-pick ...
+ (pick only your commits from your original pull request in ascending chronological order)
+ squash your changes to a single commit if there is more than one (see above)
+ git push -u origin THRIFT-9999-take-2:THRIFT-9999
+
+This procedure will apply only your commits in order to the current master, then you will squash them to a single commit, and then you force push your local THRIFT-9999-take-2 into remote THRIFT-9999 which represents your pull request, replacing all the commits with the new one.
+
+
diff --git a/vendor/github.com/apache/thrift/Dockerfile b/vendor/github.com/apache/thrift/Dockerfile
deleted file mode 100644
index 0d7ad2175..000000000
--- a/vendor/github.com/apache/thrift/Dockerfile
+++ /dev/null
@@ -1,61 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you 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
-#
-# 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.
-#
-
-# Goal: provide a thrift-compiler Docker image
-#
-# Usage:
-# docker run -v "${PWD}:/data" thrift/thrift-compiler -gen cpp -o /data/ /data/test/ThriftTest.thrift
-#
-# further details on docker for thrift is here build/docker/
-#
-# TODO: push to apache/thrift-compiler instead of thrift/thrift-compiler
-
-FROM debian:jessie
-MAINTAINER Apache Thrift <dev@thrift.apache.org>
-
-ENV DEBIAN_FRONTEND noninteractive
-
-ADD . /thrift
-
-RUN buildDeps=" \
- flex \
- bison \
- g++ \
- make \
- cmake \
- curl \
- "; \
- apt-get update && apt-get install -y --no-install-recommends $buildDeps \
- && mkdir /tmp/cmake-build && cd /tmp/cmake-build \
- && cmake \
- -DBUILD_COMPILER=ON \
- -DBUILD_LIBRARIES=OFF \
- -DBUILD_TESTING=OFF \
- -DBUILD_EXAMPLES=OFF \
- /thrift \
- && cmake --build . --config Release \
- && make install \
- && curl -k -sSL "https://storage.googleapis.com/golang/go1.5.2.linux-amd64.tar.gz" -o /tmp/go.tar.gz \
- && tar xzf /tmp/go.tar.gz -C /tmp \
- && cp /tmp/go/bin/gofmt /usr/bin/gofmt \
- && apt-get purge -y --auto-remove $buildDeps \
- && apt-get clean \
- && rm -rf /tmp/* \
- && rm -rf /var/lib/apt/lists/*
-
-ENTRYPOINT ["thrift"]
diff --git a/vendor/github.com/apache/thrift/LANGUAGES.md b/vendor/github.com/apache/thrift/LANGUAGES.md
new file mode 100644
index 000000000..d1a21e242
--- /dev/null
+++ b/vendor/github.com/apache/thrift/LANGUAGES.md
@@ -0,0 +1,305 @@
+# Apache Thrift Language Support #
+
+Last Modified: 2017-10-05<br>
+Version: 0.10.0+
+
+Thrift supports many programming languages and has an impressive test suite that exercises most of the languages, protocols, and transports that represents a matrix of thousands of possible combinations. Each language typically has a minimum required version as well as support libraries - some mandatory and some optional. All of this information is provided below to help you assess whether you can use Apache Thrift with your project. Obviously this is a complex matrix to maintain and may not be correct in all cases - if you spot an error please inform the developers using the mailing list.
+
+Apache Thrift has a choice of two build systems. The `autoconf` build system is the most complete build and is used to build all supported languages. The `cmake` build system has been designated by the project to replace `autoconf` however this transition will take quite some time to complete.
+
+The Language/Library Levels indicate the minimum and maximum versions that are used in the [continuous integration environments](build/docker/README.md) (Appveyor, Travis) for Apache Thrift. Note that while a language may contain support for protocols, transports, and servers, the extent to which each is tested as part of the overall build process varies. The definitive integration test for the project is called the "cross" test which executes a test matrix with clients and servers communicating across languages.
+
+<table style="font-size: 65%; padding: 1px;">
+<thead>
+<tr>
+<th rowspan=2>Language</th>
+<th colspan=2 align=center>Build Systems</th>
+<th colspan=2 align=center>Lang/Lib Levels</th>
+<th colspan=6 align=center>Low-Level Transports</th>
+<th colspan=3 align=center>Transport Wrappers</th>
+<th colspan=4 align=center>Protocols</th>
+<th colspan=5 align=center>Servers</th>
+<th rowspan=2>Open Issues</th>
+</tr>
+<tr>
+<!-- Build Systems ---------><th>autoconf</th><th>cmake</th>
+<!-- Lang/Lib Levels -------><th>Min</th><th>Max</th>
+<!-- Low-Level Transports --><th><a href="https://en.wikipedia.org/wiki/Unix_domain_socket">Domain</a></th><th>&nbsp;File&nbsp;</th><th>Memory</th><th>&nbsp;Pipe&nbsp;</th><th>Socket</th><th>&nbsp;TLS&nbsp;</th>
+<!-- Transport Wrappers ----><th>Framed</th><th>&nbsp;http&nbsp;</th><th>&nbsp;zlib&nbsp;</th>
+<!-- Protocols -------------><th><a href="doc/specs/thrift-binary-protocol.md">Binary</a></th><th><a href="doc/specs/thrift-compact-protocol.md">Compact</a></th><th>&nbsp;JSON&nbsp;</th><th>Multiplex</th>
+<!-- Servers ---------------><th>Forking</th><th>Nonblocking</th><th>Simple</th><th>Threaded</th><th>ThreadPool</th>
+</tr>
+</thead>
+<tbody>
+<tr align=center>
+<td align=left><a href="lib/as3/README.md">ActionScript</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>ActionScript 3</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313722">ActionScript</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/c_glib/README.md">C (glib)</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Language Levels -------><td>2.40.2</td><td>2.54.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313854">C (glib)</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/cpp/README.md">C++</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Language Levels -------><td colspan=2>C++98, gcc </td>
+<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312313">C++</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/csharp/README.md">C#</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>.NET&nbsp;3.5 / mono&nbsp;3.2.8.0</td><td>.NET&nbsp;4.6.1 / mono&nbsp;4.6.2.7</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312362">C# (.NET)</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/cocoa/README.md">Cocoa</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>unknown</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312398">Cocoa</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/d/README.md">D</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>2.070.2</td><td>2.076.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12317904">D</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/dart/README.md">Dart</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>1.20.1</td><td>1.24.2</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12328006">Dart</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/delphi/README.md">Delphi</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>2010</td><td>unknown</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12316601">Delphi</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/netcore/README.md">.NET Core</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>2.0.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12331176">.NET Core</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/erl/README.md">Erlang</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>R16B03</td><td>20.0.4</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312390">Erlang</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/go/README.md">Go</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>1.2.1</td><td>1.8.3</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12314307">Go</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/hs/README.md">Haskell</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Language Levels -------><td>7.6.3</td><td>8.0.2</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312704">Haskell</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/haxe/README.md">Haxe</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>3.2.1</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12324347">Haxe</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/java/README.md">Java (SE)</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Language Levels -------><td>1.7.0_151</td><td>1.8.0_144</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312314">Java SE</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/javame/README.md">Java (ME)</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>unknown</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313759">Java ME</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/js/README.md">Javascript</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>unknown</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313418">Javascript</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/lua/README.md">Lua</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>5.1.5</td><td>5.3.3</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12322659">Lua</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/nodejs/README.md">node.js</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>4.2.6</td><td>8.8.1</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12314320">node.js</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/ocaml/README.md">OCaml</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>4.02.3</td><td>4.04.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313660">OCaml</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/perl/README.md">Perl</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>5.18.2</td><td>5.26.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312312">Perl</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/php/README.md">PHP</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>5.5.9</td><td>7.1.8</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312431">PHP</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/py/README.md">Python</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Language Levels -------><td>2.7.6, 3.4.3</td><td>2.7.14, 3.6.3</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312315">Python</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/rb/README.md">Ruby</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>1.9.3p484</td><td>2.3.3p222</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12312316">Ruby</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/rs/README.md">Rust</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td>1.15.1</td><td>1.18.0</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12331420">Rust</a></td>
+</tr>
+<tr align=center>
+<td align=left><a href="lib/st/README.md">Smalltalk</a></td>
+<!-- Build Systems ---------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Language Levels -------><td colspan=2>unknown</td>
+<!-- Low-Level Transports --><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Transport Wrappers ----><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Protocols -------------><td><img src="doc/images/cgrn.png" alt="Yes"/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<!-- Servers ---------------><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td><td><img src="doc/images/cred.png" alt=""/></td>
+<td align=left><a href="https://issues.apache.org/jira/browse/THRIFT/component/12313861">Smalltalk</a></td>
+</tr>
+</tbody>
+<tfoot>
+<tr>
+<th rowspan=2>Language</th>
+<!-- Build Systems ---------><th>autoconf</th><th>cmake</th>
+<!-- Lang/Lib Levels -------><th>Min</th><th>Max</th>
+<!-- Low-Level Transports --><th><a href="https://en.wikipedia.org/wiki/Unix_domain_socket">Domain</a></th></th><th>&nbsp;File&nbsp;</th><th>Memory</th><th>&nbsp;Pipe&nbsp;</th><th>Socket</th><th>&nbsp;TLS&nbsp;</th>
+<!-- Transport Wrappers ----><th>Framed</th><th>&nbsp;http&nbsp;</th><th>&nbsp;zlib&nbsp;</th>
+<!-- Protocols -------------><th><a href="doc/specs/thrift-binary-protocol.md">Binary</a></th><th><a href="doc/specs/thrift-compact-protocol.md">Compact</a></th><th>&nbsp;JSON&nbsp;</th><th>Multiplex</th>
+<!-- Servers ---------------><th>Forking</th><th>Nonblocking</th><th>Simple</th><th>Threaded</th><th>ThreadPool</th>
+<th rowspan=2>Open Issues</th>
+</tr>
+<tr>
+<th colspan=2 align=center>Build Systems</th>
+<th colspan=2 align=center>Lang/Lib Levels</th>
+<th colspan=6 align=center>Low-Level Transports</th>
+<th colspan=3 align=center>Transport Wrappers</th>
+<th colspan=4 align=center>Protocols</th>
+<th colspan=5 align=center>Servers</th>
+</tr>
+</tfoot>
+</table>
diff --git a/vendor/github.com/apache/thrift/Makefile.am b/vendor/github.com/apache/thrift/Makefile.am
index ed58265ac..4b3157c90 100755
--- a/vendor/github.com/apache/thrift/Makefile.am
+++ b/vendor/github.com/apache/thrift/Makefile.am
@@ -43,7 +43,7 @@ dist-hook:
find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
print-version:
- @echo $(VERSION)
+ @echo $(PACKAGE_VERSION)
.PHONY: precross cross
precross-%: all
@@ -54,7 +54,7 @@ empty :=
space := $(empty) $(empty)
comma := ,
-CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@
+CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_DOTNETCORE@
CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
if WITH_PY3
@@ -123,7 +123,7 @@ EXTRA_DIST = \
doap.rdf \
package.json \
sonar-project.properties \
- Dockerfile \
+ LANGUAGES.md \
LICENSE \
CHANGES \
NOTICE \
diff --git a/vendor/github.com/apache/thrift/NOTICE b/vendor/github.com/apache/thrift/NOTICE
index c23995a23..902dc8d31 100644
--- a/vendor/github.com/apache/thrift/NOTICE
+++ b/vendor/github.com/apache/thrift/NOTICE
@@ -1,5 +1,5 @@
Apache Thrift
-Copyright 2006-2010 The Apache Software Foundation.
+Copyright 2006-2017 The Apache Software Foundation.
This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/vendor/github.com/apache/thrift/README.md b/vendor/github.com/apache/thrift/README.md
index 07cd32f09..423068150 100644
--- a/vendor/github.com/apache/thrift/README.md
+++ b/vendor/github.com/apache/thrift/README.md
@@ -1,9 +1,27 @@
Apache Thrift
=============
-+[![Build Status](https://travis-ci.org/apache/thrift.svg?branch=master)](https://travis-ci.org/apache/thrift)
-- +[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/e2qks7enyp9gw7ma?svg=true)](https://ci.appveyor.com/project/apache/thrift)
+Last Modified: 2014-03-16
+License
+=======
+
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you 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
+
+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.
Introduction
============
@@ -15,15 +33,22 @@ level processing. The code generation system takes a simple definition
language as its input and generates code across programming languages that
uses the abstracted stack to build interoperable RPC clients and servers.
+![Apache Thrift Layered Architecture](doc/images/thrift-layers.png)
+
+Thrift makes it easy for programs written in different programming
+languages to share data and call remote procedures. With support
+for [over 20 programming languages](LANGUAGES.md), chances are Thrift
+supports the ones that you currently use.
+
Thrift is specifically designed to support non-atomic version changes
across client and server code.
For more details on Thrift's design and implementation, take a gander at
-the Thrift whitepaper included in this distribution or at the README.md files
+the Thrift whitepaper included in this distribution or at the README.md file
in your particular subdirectory of interest.
-Hierarchy
-=========
+Project Hierarchy
+=================
thrift/
@@ -42,6 +67,7 @@ thrift/
php/
py/
rb/
+ ...
test/
@@ -145,22 +171,3 @@ To run the cross-language test suite, please run:
This will run a set of tests that use different language clients and
servers.
-License
-=======
-
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you 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
-
-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.
diff --git a/vendor/github.com/apache/thrift/Thrift.podspec b/vendor/github.com/apache/thrift/Thrift.podspec
index 2ead0e93d..39d378053 100644
--- a/vendor/github.com/apache/thrift/Thrift.podspec
+++ b/vendor/github.com/apache/thrift/Thrift.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Thrift"
- s.version = "0.10.0"
+ s.version = "1.0.0"
s.summary = "Apache Thrift is a lightweight, language-independent software stack with an associated code generation mechanism for RPC."
s.description = <<-DESC
The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
@@ -13,6 +13,6 @@ The Apache Thrift software framework, for scalable cross-language services devel
s.osx.deployment_target = '10.8'
s.ios.framework = 'CFNetwork'
s.osx.framework = 'CoreServices'
- s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-0.10.0" }
+ s.source = { :git => "https://github.com/apache/thrift.git", :tag => "thrift-1.0.0" }
s.source_files = 'lib/cocoa/src/**/*.{h,m,swift}'
end \ No newline at end of file
diff --git a/vendor/github.com/apache/thrift/appveyor.yml b/vendor/github.com/apache/thrift/appveyor.yml
index 03ee29543..4c2e36496 100755
--- a/vendor/github.com/apache/thrift/appveyor.yml
+++ b/vendor/github.com/apache/thrift/appveyor.yml
@@ -1,3 +1,4 @@
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -18,76 +19,83 @@
# build Apache Thrift on AppVeyor - https://ci.appveyor.com
+version: '1.0.0-dev.{build}'
+
shallow_clone: true
-clone_depth: 10
-version: '{build}'
os:
-# - Windows Server 2012 R2
-- Visual Studio 2015
+ - Visual Studio 2015
+
+cache:
+ - C:\projects\thrift\buildcache -> build\appveyor\MSVC-appveyor-install.bat
+ - C:\ProgramData\chocolatey\lib -> build\appveyor\MSVC-appveyor-install.bat
+ - C:\msys64\var\cache\pacman -> build\appveyor\MSYS-appveyor-install.bat
environment:
- BOOST_ROOT: C:\Libraries\boost_1_59_0
- BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
- # Unfurtunately, this version needs manual update because old versions are quickly deleted.
- ANT_VERSION: 1.9.7
+ matrix:
+ - PROFILE: MSVC2010
+ PLATFORM: x86
+ CONFIGURATION: Debug
+ BOOST_VERSION: 1.54.0
+ LIBEVENT_VERSION: 2.0.22
+ QT_VERSION: 5.6
+ ZLIB_VERSION: 1.2.8
+ DISABLED_TESTS: StressTestNonBlocking
-install:
-- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64'
-- cd \
- # Zlib
-- appveyor DownloadFile https://github.com/madler/zlib/archive/v1.2.8.tar.gz
-- 7z x v1.2.8.tar.gz -so | 7z x -si -ttar > nul
-- cd zlib-1.2.8
-- cmake -G "Visual Studio 14 2015 Win64" .
-- cmake --build . --config release
-- cd ..
- # OpenSSL
-- C:\Python35-x64\python %APPVEYOR_BUILD_FOLDER%\build\appveyor\download_openssl.py
-- ps: Start-Process "Win64OpenSSL.exe" -ArgumentList "/silent /verysilent /sp- /suppressmsgboxes" -Wait
- # Libevent
-- appveyor DownloadFile https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
-- 7z x libevent-2.0.22-stable.tar.gz -so | 7z x -si -ttar > nul
-- cd libevent-2.0.22-stable
-- nmake -f Makefile.nmake
-- mkdir lib
-- move *.lib lib\
-- move WIN32-Code\event2\* include\event2\
-- move *.h include\
-- cd ..
-- appveyor-retry cinst -y winflexbison
-- appveyor DownloadFile http://www.us.apache.org/dist/ant/binaries/apache-ant-%ANT_VERSION%-bin.zip
-- 7z x apache-ant-%ANT_VERSION%-bin.zip > nul
-- cd %APPVEYOR_BUILD_FOLDER%
-# TODO: Enable Haskell build
-# - cinst HaskellPlatform -version 2014.2.0.0
+ - PROFILE: MSVC2015
+ PLATFORM: x64
+ CONFIGURATION: Release
+ BOOST_VERSION: 1.64.0
+ LIBEVENT_VERSION: 2.0.22
+ PYTHON_VERSION: 3.6
+ QT_VERSION: 5.8
+ ZLIB_VERSION: 1.2.11
+ DISABLED_TESTS: StressTestNonBlocking
+
+ - PROFILE: MINGW
+ PLATFORM: x64
+ CONFIGURATION: Release
+matrix:
+ fast_finish: true
+
+install:
+ - cd %APPVEYOR_BUILD_FOLDER%
+ - call build\appveyor\%PROFILE:~0,4%-appveyor-install.bat
+ - refreshenv
build_script:
-- set PATH=C:\ProgramData\chocolatey\bin;C:\apache-ant-%ANT_VERSION%\bin;%PATH%
-- set JAVA_HOME=C:\Program Files\Java\jdk1.7.0
-- set PATH=%JAVA_HOME%\bin;%PATH%
-# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\bin
-# - set PATH=%PATH%;C:\Program Files (x86)\Haskell Platform\2014.2.0.0\lib\extralibs\bin
-- set PATH=C:\Python27-x64\scripts;C:\Python27-x64;%PATH%
-- pip install ipaddress backports.ssl_match_hostname tornado twisted
-- mkdir cmake-build
-- cd cmake-build
-- cmake -G "Visual Studio 14 2015 Win64" -DWITH_SHARED_LIB=OFF -DLIBEVENT_ROOT=C:\libevent-2.0.22-stable -DZLIB_INCLUDE_DIR=C:\zlib-1.2.8 -DZLIB_LIBRARY=C:\zlib-1.2.8\release\zlibstatic.lib -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ..
-- findstr /b /e BUILD_COMPILER:BOOL=ON CMakeCache.txt
-- findstr /b /e BUILD_CPP:BOOL=ON CMakeCache.txt
-- findstr /b /e BUILD_JAVA:BOOL=ON CMakeCache.txt
-- findstr /b /e BUILD_PYTHON:BOOL=ON CMakeCache.txt
-# - findstr /b /e BUILD_C_GLIB:BOOL=ON CMakeCache.txt
-# - findstr /b /e BUILD_HASKELL:BOOL=ON CMakeCache.txt
-- findstr /b /e BUILD_TESTING:BOOL=ON CMakeCache.txt
-# - cmake --build .
-- cmake --build . --config Release
-# TODO: Fix cpack
-# - cpack
-# TODO: Run more tests
-# CTest fails to invoke ant seemingly due to "ant.bat" v.s. "ant" (shell script) conflict.
-# Currently, everything that involves OpenSSL seems to hang forever on our Appveyor setup.
-# Also a few C++ tests hang (on Appveyor or on Windows in general).
-- ctest -C Release --timeout 600 -VV -E "(StressTestNonBlocking|PythonTestSSLSocket|python_test$|^Java)"
-# TODO make it perfect ;-r
+ - cd %APPVEYOR_BUILD_FOLDER%
+ - call build\appveyor\%PROFILE:~0,4%-appveyor-build.bat
+
+test_script:
+ - cd %APPVEYOR_BUILD_FOLDER%
+ - call build\appveyor\%PROFILE:~0,4%-appveyor-test.bat
+
+
+# artifact capture disabled as it might increase service cost for little gain:
+#
+# artifacts:
+# - path: local-thrift-inst
+# name: cmake installed content
+# type: zip
+#
+# - path: local-thrift-build\Testing
+# name: ctest output
+# type: zip
+
+# RDP support: use one or the other...
+#
+# enables RDP for each build job so you can inspect the environment at the beginning of the job:
+# init:
+# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+#
+# enables RDP at the end of the build job so you can login and re-run
+# commands to see why something failed...
+#on_finish:
+# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+#
+# also need:
+# environment:
+# APPVEYOR_RDP_PASSWORD: thr1FT2345$xyzZ
+
diff --git a/vendor/github.com/apache/thrift/bootstrap.sh b/vendor/github.com/apache/thrift/bootstrap.sh
index 52ecda47b..c7e000c49 100755
--- a/vendor/github.com/apache/thrift/bootstrap.sh
+++ b/vendor/github.com/apache/thrift/bootstrap.sh
@@ -46,9 +46,12 @@ if [ "$AUTOMAKE_VERSION" \< "1.13" ]; then
exit 1
fi
+set -e
autoscan
$LIBTOOLIZE --copy --automake
aclocal -I ./aclocal
autoheader
+sed '/undef VERSION/d' config.hin > config.hin2
+mv config.hin2 config.hin
autoconf
automake --copy --add-missing --foreign
diff --git a/vendor/github.com/apache/thrift/bower.json b/vendor/github.com/apache/thrift/bower.json
index 9ec59fcb5..1092c650e 100644
--- a/vendor/github.com/apache/thrift/bower.json
+++ b/vendor/github.com/apache/thrift/bower.json
@@ -1,6 +1,5 @@
{
"name": "thrift",
- "version": "0.10.0",
"homepage": "https://git-wip-us.apache.org/repos/asf/thrift.git",
"authors": [
"Apache Thrift <dev@thrift.apache.org>"
diff --git a/vendor/github.com/apache/thrift/composer.json b/vendor/github.com/apache/thrift/composer.json
index d937bc7ac..0f22b76ea 100644
--- a/vendor/github.com/apache/thrift/composer.json
+++ b/vendor/github.com/apache/thrift/composer.json
@@ -24,7 +24,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
- "dev-master": "0.10.0"
+ "dev-master": "1.0.x-dev"
}
}
}
diff --git a/vendor/github.com/apache/thrift/configure.ac b/vendor/github.com/apache/thrift/configure.ac
index 0972abfc9..073ad8dc5 100755
--- a/vendor/github.com/apache/thrift/configure.ac
+++ b/vendor/github.com/apache/thrift/configure.ac
@@ -20,7 +20,7 @@
AC_PREREQ(2.65)
AC_CONFIG_MACRO_DIR([./aclocal])
-AC_INIT([thrift], [0.10.0])
+AC_INIT([thrift], [1.0.0-dev])
AC_CONFIG_AUX_DIR([.])
@@ -83,6 +83,9 @@ AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"])
AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).])
AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).])
+AC_ARG_VAR([THRIFT], [Path to the thrift tool (needed for cross-compilation).])
+AS_IF([test "x$THRIFT" = x], [THRIFT=`pwd`/compiler/cpp/thrift])
+
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
@@ -100,6 +103,9 @@ AC_PROG_RANLIB
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11([noext], [optional])
+if test "$ac_success" = "no"; then
+ CXXFLAGS="$CXXFLAGS -Wno-variadic-macros -Wno-long-long -Wno-c++11-long-long"
+fi
AM_EXTRA_RECURSIVE_TARGETS([style])
AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or -iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec clang-format -i {} \;')
@@ -116,9 +122,11 @@ if test "$enable_libs" = "no"; then
with_java="no"
with_csharp="no"
with_python="no"
+ with_py3="no"
with_ruby="no"
with_haskell="no"
with_haxe="no"
+ with_dotnetcore="no"
with_perl="no"
with_php="no"
with_php_extension="no"
@@ -128,9 +136,9 @@ if test "$enable_libs" = "no"; then
with_d="no"
with_nodejs="no"
with_lua="no"
+ with_rs="no"
fi
-
AX_THRIFT_LIB(cpp, [C++], yes)
have_cpp=no
if test "$with_cpp" = "yes"; then
@@ -145,8 +153,6 @@ if test "$with_cpp" = "yes"; then
have_cpp="yes"
fi
- AX_CHECK_OPENSSL()
-
AX_LIB_EVENT([1.0])
have_libevent=$success
@@ -197,6 +203,12 @@ if test "$with_c_glib" = "yes"; then
fi
AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"])
+echo "OpenSSL check"
+if test "$have_cpp" = "yes" -o "$have_c_glib" = "yes"; then
+ echo "Have cpp or c so we check for OpenSSL"
+ AX_CHECK_OPENSSL()
+fi
+
AX_THRIFT_LIB(csharp, [C#], yes)
if test "$with_csharp" = "yes"; then
PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
@@ -294,6 +306,7 @@ AM_CONDITIONAL(WITH_TWISTED_TEST, [test "$have_trial" = "yes"])
# Find "python3" executable.
# It's distro specific and far from ideal but needed to cross test py2-3 at once.
# TODO: find "python2" if it's 3.x
+have_py3="no"
if python --version 2>&1 | grep -q "Python 2"; then
AC_PATH_PROGS([PYTHON3], [python3 python3.5 python35 python3.4 python34])
if test -n "$PYTHON3"; then
@@ -389,6 +402,7 @@ if test "$with_go" = "yes"; then
if [[ -x "$GO" ]] ; then
AS_IF([test -n "$GO"],[
ax_go_version="1.4"
+ ax_go17_version="1.7"
AC_MSG_CHECKING([for Go version])
golang_version=`$GO version 2>&1 | $SED -e 's/\(go \)\(version \)\(go\)\(@<:@0-9@:>@.@<:@0-9@:>@.@<:@0-9@:>@\)\(@<:@\*@:>@*\).*/\4/'`
@@ -401,6 +415,13 @@ if test "$with_go" = "yes"; then
:
have_go="no"
])
+ AX_COMPARE_VERSION([$golang_version],[lt],[$ax_go17_version],[
+ :
+ go_version_lt_17="yes"
+ ],[
+ :
+ go_version_lt_17="no"
+ ])
],[
AC_MSG_WARN([could not find Go ])
have_go="no"
@@ -408,7 +429,31 @@ if test "$with_go" = "yes"; then
fi
fi
AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])
-
+AM_CONDITIONAL([GOVERSION_LT_17], [test "$go_version_lt_17" = "yes"])
+
+AX_THRIFT_LIB(rs, [Rust], yes)
+have_rs="no"
+if test "$with_rs" = "yes"; then
+ AC_PATH_PROG([CARGO], [cargo])
+ AC_PATH_PROG([RUSTC], [rustc])
+ if [[ -x "$CARGO" ]] && [[ -x "$RUSTC" ]]; then
+ min_rustc_version="1.13"
+
+ AC_MSG_CHECKING([for rustc version])
+ rustc_version=`$RUSTC --version 2>&1 | $SED -e 's/\(rustc \)\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2.\3/'`
+ AC_MSG_RESULT($rustc_version)
+ AC_SUBST([rustc_version],[$rustc_version])
+
+ AX_COMPARE_VERSION([$min_rustc_version],[le],[$rustc_version],[
+ :
+ have_rs="yes"
+ ],[
+ :
+ have_rs="no"
+ ])
+ fi
+fi
+AM_CONDITIONAL(WITH_RS, [test "$have_rs" = "yes"])
AX_THRIFT_LIB(haxe, [Haxe], yes)
if test "$with_haxe" = "yes"; then
@@ -420,6 +465,16 @@ fi
AM_CONDITIONAL(WITH_HAXE, [test "$have_haxe" = "yes"])
+AX_THRIFT_LIB(dotnetcore, [.NET Core], yes)
+if test "$with_dotnetcore" = "yes"; then
+ AC_PATH_PROG([DOTNETCORE], [dotnet])
+ if [[ -x "$DOTNETCORE" ]] ; then
+ AX_PROG_DOTNETCORE_VERSION( [2.0.0], have_dotnetcore="yes", have_dotnetcore="no")
+ fi
+fi
+AM_CONDITIONAL(WITH_DOTNETCORE, [test "$have_dotnetcore" = "yes"])
+
+
AX_THRIFT_LIB(d, [D], yes)
if test "$with_d" = "yes"; then
AX_DMD
@@ -517,8 +572,8 @@ fi
AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"])
AC_ARG_ENABLE([plugin],
- AS_HELP_STRING([--enable-plugin], [build compiler plugin support [default=yes]]),
- [], enable_plugin=yes
+ AS_HELP_STRING([--enable-plugin], [build compiler plugin support [default=no]]),
+ [], enable_plugin=no
)
have_plugin=yes
if test "$have_cpp" = "no" ; then
@@ -527,9 +582,7 @@ fi
if test "$enable_plugin" = "no"; then
have_plugin="no"
fi
-if test "$have_plugin" = "yes" ; then
- AC_CONFIG_LINKS([compiler/cpp/test/plugin/t_cpp_generator.cc:compiler/cpp/src/thrift/generate/t_cpp_generator.cc])
-fi
+AC_CONFIG_LINKS([compiler/cpp/test/plugin/t_cpp_generator.cc:compiler/cpp/src/thrift/generate/t_cpp_generator.cc])
AM_CONDITIONAL(WITH_PLUGIN, [test "$have_plugin" = "yes"])
AC_ARG_ENABLE([tutorial],
@@ -608,7 +661,7 @@ AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
-AC_CHECK_TYPES([ptrdiff_t], [], [exit 1])
+AC_CHECK_TYPES([ptrdiff_t], [], [echo "ptrdiff_t not found or g++ not installed - cannot continue" && exit 1])
AC_STRUCT_TM
@@ -757,6 +810,7 @@ AC_CONFIG_FILES([
lib/js/test/Makefile
lib/json/Makefile
lib/json/test/Makefile
+ lib/netcore/Makefile
lib/nodejs/Makefile
lib/perl/Makefile
lib/perl/test/Makefile
@@ -765,6 +819,8 @@ AC_CONFIG_FILES([
lib/dart/Makefile
lib/py/Makefile
lib/rb/Makefile
+ lib/rs/Makefile
+ lib/rs/test/Makefile
lib/lua/Makefile
lib/xml/Makefile
lib/xml/test/Makefile
@@ -778,6 +834,7 @@ AC_CONFIG_FILES([
test/haxe/Makefile
test/hs/Makefile
test/lua/Makefile
+ test/netcore/Makefile
test/php/Makefile
test/dart/Makefile
test/perl/Makefile
@@ -785,6 +842,7 @@ AC_CONFIG_FILES([
test/py.twisted/Makefile
test/py.tornado/Makefile
test/rb/Makefile
+ test/rs/Makefile
tutorial/Makefile
tutorial/c_glib/Makefile
tutorial/cpp/Makefile
@@ -794,12 +852,14 @@ AC_CONFIG_FILES([
tutorial/hs/Makefile
tutorial/java/Makefile
tutorial/js/Makefile
+ tutorial/netcore/Makefile
tutorial/nodejs/Makefile
tutorial/dart/Makefile
tutorial/py/Makefile
tutorial/py.twisted/Makefile
tutorial/py.tornado/Makefile
tutorial/rb/Makefile
+ tutorial/rs/Makefile
])
if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi
@@ -834,6 +894,10 @@ if test "$have_erlang" = "yes" ; then MAYBE_ERLANG="erl" ; else MAYBE_ERLANG=""
AC_SUBST([MAYBE_ERLANG])
if test "$have_lua" = "yes" ; then MAYBE_LUA="lua" ; else MAYBE_LUA="" ; fi
AC_SUBST([MAYBE_LUA])
+if test "$have_rs" = "yes" ; then MAYBE_RS="rs" ; else MAYBE_RS="" ; fi
+AC_SUBST([MAYBE_RS])
+if test "$have_dotnetcore" = "yes" ; then MAYBE_DOTNETCORE="netcore" ; else MAYBE_DOTNETCORE="" ; fi
+AC_SUBST([MAYBE_DOTNETCORE])
AC_OUTPUT
@@ -841,76 +905,83 @@ AC_OUTPUT
echo
echo "$PACKAGE $VERSION"
echo
-echo "Building Plugin Support ...... : $have_plugin"
-echo "Building C++ Library ......... : $have_cpp"
echo "Building C (GLib) Library .... : $have_c_glib"
-echo "Building Java Library ........ : $have_java"
-echo "Building C# Library .......... : $have_csharp"
-echo "Building Python Library ...... : $have_python"
-echo "Building Ruby Library ........ : $have_ruby"
-echo "Building Haxe Library ........ : $have_haxe"
-echo "Building Haskell Library ..... : $have_haskell"
-echo "Building Perl Library ........ : $have_perl"
-echo "Building PHP Library ......... : $have_php"
+echo "Building C# (Mono) Library ... : $have_csharp"
+echo "Building C++ Library ......... : $have_cpp"
+echo "Building D Library ........... : $have_d"
echo "Building Dart Library ........ : $have_dart"
+echo "Building dotnetcore Library .. : $have_dotnetcore"
echo "Building Erlang Library ...... : $have_erlang"
echo "Building Go Library .......... : $have_go"
-echo "Building D Library ........... : $have_d"
-echo "Building NodeJS Library ...... : $have_nodejs"
+echo "Building Haskell Library ..... : $have_haskell"
+echo "Building Haxe Library ........ : $have_haxe"
+echo "Building Java Library ........ : $have_java"
echo "Building Lua Library ......... : $have_lua"
+echo "Building NodeJS Library ...... : $have_nodejs"
+echo "Building Perl Library ........ : $have_perl"
+echo "Building PHP Library ......... : $have_php"
+echo "Building Plugin Support ...... : $have_plugin"
+echo "Building Python Library ...... : $have_python"
+echo "Building Py3 Library ......... : $have_py3"
+echo "Building Ruby Library ........ : $have_ruby"
+echo "Building Rust Library ........ : $have_rs"
-if test "$have_cpp" = "yes" ; then
- echo
- echo "C++ Library:"
- echo " Build TZlibTransport ...... : $have_zlib"
- echo " Build TNonblockingServer .. : $have_libevent"
- echo " Build TQTcpServer (Qt4) .... : $have_qt"
- echo " Build TQTcpServer (Qt5) .... : $have_qt5"
-fi
-if test "$have_java" = "yes" ; then
- echo
- echo "Java Library:"
- echo " Using javac ............... : $JAVAC"
- echo " Using java ................ : $JAVA"
- echo " Using ant ................. : $ANT"
-fi
if test "$have_csharp" = "yes" ; then
echo
echo "C# Library:"
echo " Using .NET 3.5 ............ : $net_3_5"
+ echo " Using mono version ........ : $($MCS --version | head -1)"
fi
-if test "$have_python" = "yes" ; then
+if test "$have_cpp" = "yes" ; then
echo
- echo "Python Library:"
- echo " Using Python .............. : $PYTHON"
- if test "$have_py3" = "yes" ; then
- echo " Using Python3 ............. : $PYTHON3"
- fi
- if test "$have_trial" = "yes"; then
- echo " Using trial ............... : $TRIAL"
- fi
+ echo "C++ Library:"
+ echo " C++ compiler .............. : $CXX"
+ echo " Build TZlibTransport ...... : $have_zlib"
+ echo " Build TNonblockingServer .. : $have_libevent"
+ echo " Build TQTcpServer (Qt4) ... : $have_qt"
+ echo " Build TQTcpServer (Qt5) ... : $have_qt5"
+ echo " C++ compiler version ...... : $($CXX --version | head -1)"
fi
-if test "$have_php" = "yes" ; then
+if test "$have_d" = "yes" ; then
echo
- echo "PHP Library:"
- echo " Using php-config .......... : $PHP_CONFIG"
+ echo "D Library:"
+ echo " Using D Compiler .......... : $DMD"
+ echo " Building D libevent tests . : $with_d_event_tests"
+ echo " Building D SSL tests ...... : $with_d_ssl_tests"
+ echo " Using D version ........... : $($DMD --version | head -1)"
fi
if test "$have_dart" = "yes" ; then
echo
echo "Dart Library:"
echo " Using Dart ................ : $DART"
echo " Using Pub ................. : $DARTPUB"
+ echo " Using Dart version ........ : $($DART --version 2>&1)"
fi
-if test "$have_ruby" = "yes" ; then
+if test "$have_dotnetcore" = "yes" ; then
echo
- echo "Ruby Library:"
- echo " Using Ruby ................ : $RUBY"
+ echo ".NET Core Library:"
+ echo " Using .NET Core ........... : $DOTNETCORE"
+ echo " Using .NET Core version ... : $DOTNETCORE_VERSION"
+fi
+if test "$have_erlang" = "yes" ; then
+ echo
+ echo "Erlang Library:"
+ echo " Using erlc ................ : $ERLC"
+ echo " Using rebar ............... : $REBAR"
+ echo " Using erlc version ........ : $($ERL -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tr -d '\"')"
+fi
+if test "$have_go" = "yes" ; then
+ echo
+ echo "Go Library:"
+ echo " Using Go................... : $GO"
+ echo " Using Go version........... : $($GO version)"
fi
if test "$have_haskell" = "yes" ; then
echo
echo "Haskell Library:"
- echo " Using Haskell ............. : $RUNHASKELL"
echo " Using Cabal ............... : $CABAL"
+ echo " Using Haskell ............. : $RUNHASKELL"
+ echo " Using Haskell version ..... : $($RUNHASKELL --version)"
fi
if test "$have_haxe" = "yes" ; then
echo
@@ -918,42 +989,67 @@ if test "$have_haxe" = "yes" ; then
echo " Using Haxe ................ : $HAXE"
echo " Using Haxe version ........ : $HAXE_VERSION"
fi
+if test "$have_java" = "yes" ; then
+ echo
+ echo "Java Library:"
+ echo " Using ant ................. : $ANT"
+ echo " Using java ................ : $JAVA"
+ echo " Using javac ............... : $JAVAC"
+ echo " Using ant version ......... : $($ANT -version 2>&1)"
+ echo " Using java version ........ : $($JAVA -version 2>&1 | grep 'version ')"
+fi
+if test "$have_lua" = "yes" ; then
+ echo
+ echo "Lua Library:"
+ echo " Using Lua ................. : $LUA"
+ echo " Using Lua version.......... : $($LUA -v)"
+fi
+if test "$have_nodejs" = "yes" ; then
+ echo
+ echo "NodeJS Library:"
+ echo " Using NodeJS .............. : $NODEJS"
+ echo " Using NodeJS version....... : $($NODEJS --version)"
+fi
if test "$have_perl" = "yes" ; then
echo
echo "Perl Library:"
echo " Using Perl ................ : $PERL"
+ echo " Using Perl version ........ : $($PERL -v | grep 'version ')"
fi
-if test "$have_erlang" = "yes" ; then
- echo
- echo "Erlang Library:"
- echo " Using erlc ................ : $ERLC"
- echo " Using rebar ............... : $REBAR"
-fi
-if test "$have_go" = "yes" ; then
+if test "$have_php" = "yes" ; then
echo
- echo "Go Library:"
- echo " Using Go................... : $GO"
- echo " Using Go version........... : $($GO version)"
+ echo "PHP Library:"
+ echo " Using php-config .......... : $PHP_CONFIG"
+ echo " Using php version ......... : $($PHP --version | head -1)"
fi
-if test "$have_d" = "yes" ; then
+if test "$have_python" = "yes" ; then
echo
- echo "D Library:"
- echo " Using D Compiler .......... : $DMD"
- echo " Building D libevent tests . : $with_d_event_tests"
- echo " Building D SSL tests ...... : $with_d_ssl_tests"
+ echo "Python Library:"
+ echo " Using Python .............. : $PYTHON"
+ echo " Using Python version ...... : $($PYTHON --version 2>&1)"
+ if test "$have_py3" = "yes" ; then
+ echo " Using Python3 ............. : $PYTHON3"
+ echo " Using Python3 version ..... : $($PYTHON3 --version)"
+ fi
+ if test "$have_trial" = "yes"; then
+ echo " Using trial ............... : $TRIAL"
+ fi
fi
-if test "$have_nodejs" = "yes" ; then
+if test "$have_ruby" = "yes" ; then
echo
- echo "NodeJS Library:"
- echo " Using NodeJS .............. : $NODEJS"
- echo " Using NodeJS version....... : $($NODEJS --version)"
+ echo "Ruby Library:"
+ echo " Using Ruby ................ : $RUBY"
+ echo " Using Ruby version ........ : $($RUBY --version)"
fi
-if test "$have_lua" = "yes" ; then
+if test "$have_rs" = "yes" ; then
echo
- echo "Lua Library:"
- echo " Using Lua .............. : $LUA"
+ echo "Rust Library:"
+ echo " Using Cargo................ : $CARGO"
+ echo " Using rustc................ : $RUSTC"
+ echo " Using Rust version......... : $($RUSTC --version)"
fi
echo
echo "If something is missing that you think should be present,"
echo "please skim the output of configure to find the missing"
echo "component. Details are present in config.log."
+echo
diff --git a/vendor/github.com/apache/thrift/doap.rdf b/vendor/github.com/apache/thrift/doap.rdf
index 14a8d6638..ac8d7854d 100755
--- a/vendor/github.com/apache/thrift/doap.rdf
+++ b/vendor/github.com/apache/thrift/doap.rdf
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl"?>
<rdf:RDF xml:lang="en"
- xmlns="http://usefulinc.com/ns/doap#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns="http://usefulinc.com/ns/doap#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:asfext="http://projects.apache.org/ns/asfext#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<!--
@@ -12,9 +12,9 @@
The ASF licenses this file to You 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
-
+
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.
diff --git a/vendor/github.com/apache/thrift/lib/Makefile.am b/vendor/github.com/apache/thrift/lib/Makefile.am
index 5f17fca88..636f42cfc 100644
--- a/vendor/github.com/apache/thrift/lib/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/Makefile.am
@@ -71,6 +71,10 @@ if WITH_DART
SUBDIRS += dart
endif
+if WITH_DOTNETCORE
+SUBDIRS += netcore
+endif
+
if WITH_GO
SUBDIRS += go
endif
@@ -89,6 +93,10 @@ if WITH_LUA
SUBDIRS += lua
endif
+if WITH_RS
+SUBDIRS += rs
+endif
+
# All of the libs that don't use Automake need to go in here
# so they will end up in our release tarballs.
EXTRA_DIST = \
diff --git a/vendor/github.com/apache/thrift/lib/go/Makefile.am b/vendor/github.com/apache/thrift/lib/go/Makefile.am
index ff946ea8d..0d5971014 100644
--- a/vendor/github.com/apache/thrift/lib/go/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/go/Makefile.am
@@ -31,10 +31,15 @@ install:
@echo '##############################################################'
check-local:
- $(GO) test ./thrift
+ GOPATH=`pwd` $(GO) get golang.org/x/net/context
+ GOPATH=`pwd` $(GO) test -race ./thrift
+
+clean-local:
+ $(RM) -rf pkg
all-local:
- $(GO) build ./thrift
+ GOPATH=`pwd` $(GO) get golang.org/x/net/context
+ GOPATH=`pwd` $(GO) build ./thrift
EXTRA_DIST = \
thrift \
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
index 6655cc5a9..b9d7eedcd 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
@@ -30,11 +30,22 @@ const (
PROTOCOL_ERROR = 7
)
+var defaultApplicationExceptionMessage = map[int32]string{
+ UNKNOWN_APPLICATION_EXCEPTION: "unknown application exception",
+ UNKNOWN_METHOD: "unknown method",
+ INVALID_MESSAGE_TYPE_EXCEPTION: "invalid message type",
+ WRONG_METHOD_NAME: "wrong method name",
+ BAD_SEQUENCE_ID: "bad sequence ID",
+ MISSING_RESULT: "missing result",
+ INTERNAL_ERROR: "unknown internal error",
+ PROTOCOL_ERROR: "unknown protocol error",
+}
+
// Application level Thrift exception
type TApplicationException interface {
TException
TypeId() int32
- Read(iprot TProtocol) (TApplicationException, error)
+ Read(iprot TProtocol) error
Write(oprot TProtocol) error
}
@@ -44,7 +55,10 @@ type tApplicationException struct {
}
func (e tApplicationException) Error() string {
- return e.message
+ if e.message != "" {
+ return e.message
+ }
+ return defaultApplicationExceptionMessage[e.type_]
}
func NewTApplicationException(type_ int32, message string) TApplicationException {
@@ -55,10 +69,11 @@ func (p *tApplicationException) TypeId() int32 {
return p.type_
}
-func (p *tApplicationException) Read(iprot TProtocol) (TApplicationException, error) {
+func (p *tApplicationException) Read(iprot TProtocol) error {
+ // TODO: this should really be generated by the compiler
_, err := iprot.ReadStructBegin()
if err != nil {
- return nil, err
+ return err
}
message := ""
@@ -67,7 +82,7 @@ func (p *tApplicationException) Read(iprot TProtocol) (TApplicationException, er
for {
_, ttype, id, err := iprot.ReadFieldBegin()
if err != nil {
- return nil, err
+ return err
}
if ttype == STOP {
break
@@ -76,33 +91,40 @@ func (p *tApplicationException) Read(iprot TProtocol) (TApplicationException, er
case 1:
if ttype == STRING {
if message, err = iprot.ReadString(); err != nil {
- return nil, err
+ return err
}
} else {
if err = SkipDefaultDepth(iprot, ttype); err != nil {
- return nil, err
+ return err
}
}
case 2:
if ttype == I32 {
if type_, err = iprot.ReadI32(); err != nil {
- return nil, err
+ return err
}
} else {
if err = SkipDefaultDepth(iprot, ttype); err != nil {
- return nil, err
+ return err
}
}
default:
if err = SkipDefaultDepth(iprot, ttype); err != nil {
- return nil, err
+ return err
}
}
if err = iprot.ReadFieldEnd(); err != nil {
- return nil, err
+ return err
}
}
- return NewTApplicationException(type_, message), iprot.ReadStructEnd()
+ if err := iprot.ReadStructEnd(); err != nil {
+ return err
+ }
+
+ p.message = message
+ p.type_ = type_
+
+ return nil
}
func (p *tApplicationException) Write(oprot TProtocol) (err error) {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
index 7010f868f..b2687a6c8 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
@@ -25,7 +25,7 @@ import (
func TestTApplicationException(t *testing.T) {
exc := NewTApplicationException(UNKNOWN_APPLICATION_EXCEPTION, "")
- if exc.Error() != "" {
+ if exc.Error() != defaultApplicationExceptionMessage[UNKNOWN_APPLICATION_EXCEPTION] {
t.Fatalf("Expected empty string for exception but found '%s'", exc.Error())
}
if exc.TypeId() != UNKNOWN_APPLICATION_EXCEPTION {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go
index f73a98b6c..b754f925d 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/buffered_transport.go
@@ -32,8 +32,8 @@ type TBufferedTransport struct {
tp TTransport
}
-func (p *TBufferedTransportFactory) GetTransport(trans TTransport) TTransport {
- return NewTBufferedTransport(trans, p.size)
+func (p *TBufferedTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
+ return NewTBufferedTransport(trans, p.size), nil
}
func NewTBufferedTransportFactory(bufferSize int) *TBufferedTransportFactory {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/client.go b/vendor/github.com/apache/thrift/lib/go/thrift/client.go
new file mode 100644
index 000000000..8bdb53d8d
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/client.go
@@ -0,0 +1,78 @@
+package thrift
+
+import "fmt"
+
+type TStandardClient struct {
+ seqId int32
+ iprot, oprot TProtocol
+}
+
+// TStandardClient implements TClient, and uses the standard message format for Thrift.
+// It is not safe for concurrent use.
+func NewTStandardClient(inputProtocol, outputProtocol TProtocol) *TStandardClient {
+ return &TStandardClient{
+ iprot: inputProtocol,
+ oprot: outputProtocol,
+ }
+}
+
+func (p *TStandardClient) Send(oprot TProtocol, seqId int32, method string, args TStruct) error {
+ if err := oprot.WriteMessageBegin(method, CALL, seqId); err != nil {
+ return err
+ }
+ if err := args.Write(oprot); err != nil {
+ return err
+ }
+ if err := oprot.WriteMessageEnd(); err != nil {
+ return err
+ }
+ return oprot.Flush()
+}
+
+func (p *TStandardClient) Recv(iprot TProtocol, seqId int32, method string, result TStruct) error {
+ rMethod, rTypeId, rSeqId, err := iprot.ReadMessageBegin()
+ if err != nil {
+ return err
+ }
+
+ if method != rMethod {
+ return NewTApplicationException(WRONG_METHOD_NAME, fmt.Sprintf("%s: wrong method name", method))
+ } else if seqId != rSeqId {
+ return NewTApplicationException(BAD_SEQUENCE_ID, fmt.Sprintf("%s: out of order sequence response", method))
+ } else if rTypeId == EXCEPTION {
+ var exception tApplicationException
+ if err := exception.Read(iprot); err != nil {
+ return err
+ }
+
+ if err := iprot.ReadMessageEnd(); err != nil {
+ return err
+ }
+
+ return &exception
+ } else if rTypeId != REPLY {
+ return NewTApplicationException(INVALID_MESSAGE_TYPE_EXCEPTION, fmt.Sprintf("%s: invalid message type", method))
+ }
+
+ if err := result.Read(iprot); err != nil {
+ return err
+ }
+
+ return iprot.ReadMessageEnd()
+}
+
+func (p *TStandardClient) call(method string, args, result TStruct) error {
+ p.seqId++
+ seqId := p.seqId
+
+ if err := p.Send(p.oprot, seqId, method, args); err != nil {
+ return err
+ }
+
+ // method is oneway
+ if result == nil {
+ return nil
+ }
+
+ return p.Recv(p.iprot, seqId, method, result)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/client_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/client_go17.go
new file mode 100644
index 000000000..15c1c52ca
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/client_go17.go
@@ -0,0 +1,13 @@
+// +build go1.7
+
+package thrift
+
+import "context"
+
+type TClient interface {
+ Call(ctx context.Context, method string, args, result TStruct) error
+}
+
+func (p *TStandardClient) Call(ctx context.Context, method string, args, result TStruct) error {
+ return p.call(method, args, result)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/client_pre_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/client_pre_go17.go
new file mode 100644
index 000000000..d2e99ef2a
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/client_pre_go17.go
@@ -0,0 +1,13 @@
+// +build !go1.7
+
+package thrift
+
+import "golang.org/x/net/context"
+
+type TClient interface {
+ Call(ctx context.Context, method string, args, result TStruct) error
+}
+
+func (p *TStandardClient) Call(ctx context.Context, method string, args, result TStruct) error {
+ return p.call(method, args, result)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/common_test_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/common_test_go17.go
new file mode 100644
index 000000000..2c729a226
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/common_test_go17.go
@@ -0,0 +1,32 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import "context"
+
+type mockProcessor struct {
+ ProcessFunc func(in, out TProtocol) (bool, TException)
+}
+
+func (m *mockProcessor) Process(ctx context.Context, in, out TProtocol) (bool, TException) {
+ return m.ProcessFunc(in, out)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/common_test_pre_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/common_test_pre_go17.go
new file mode 100644
index 000000000..e6d0c4d9a
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/common_test_pre_go17.go
@@ -0,0 +1,32 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import "golang.org/x/net/context"
+
+type mockProcessor struct {
+ ProcessFunc func(in, out TProtocol) (bool, TException)
+}
+
+func (m *mockProcessor) Process(ctx context.Context, in, out TProtocol) (bool, TException) {
+ return m.ProcessFunc(in, out)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go
index 72812f9cb..f940b4e15 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/compact_protocol_test.go
@@ -26,28 +26,28 @@ import (
func TestReadWriteCompactProtocol(t *testing.T) {
ReadWriteProtocolTest(t, NewTCompactProtocolFactory())
- transports := []TTransport{
- NewTMemoryBuffer(),
- NewStreamTransportRW(bytes.NewBuffer(make([]byte, 0, 16384))),
- NewTFramedTransport(NewTMemoryBuffer()),
- }
- for _, trans := range transports {
- p := NewTCompactProtocol(trans);
- ReadWriteBool(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteByte(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteI16(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteI32(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteI64(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteDouble(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteString(t, p, trans);
- p = NewTCompactProtocol(trans);
- ReadWriteBinary(t, p, trans);
- trans.Close();
- }
+ transports := []TTransport{
+ NewTMemoryBuffer(),
+ NewStreamTransportRW(bytes.NewBuffer(make([]byte, 0, 16384))),
+ NewTFramedTransport(NewTMemoryBuffer()),
+ }
+ for _, trans := range transports {
+ p := NewTCompactProtocol(trans)
+ ReadWriteBool(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteByte(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteI16(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteI32(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteI64(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteDouble(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteString(t, p, trans)
+ p = NewTCompactProtocol(trans)
+ ReadWriteBinary(t, p, trans)
+ trans.Close()
+ }
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go
index d0bae21bc..60b124991 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/framed_transport.go
@@ -48,11 +48,15 @@ func NewTFramedTransportFactory(factory TTransportFactory) TTransportFactory {
}
func NewTFramedTransportFactoryMaxLength(factory TTransportFactory, maxLength uint32) TTransportFactory {
- return &tFramedTransportFactory{factory: factory, maxLength: maxLength}
+ return &tFramedTransportFactory{factory: factory, maxLength: maxLength}
}
-func (p *tFramedTransportFactory) GetTransport(base TTransport) TTransport {
- return NewTFramedTransportMaxLength(p.factory.GetTransport(base), p.maxLength)
+func (p *tFramedTransportFactory) GetTransport(base TTransport) (TTransport, error) {
+ tt, err := p.factory.GetTransport(base)
+ if err != nil {
+ return nil, err
+ }
+ return NewTFramedTransportMaxLength(tt, p.maxLength), nil
}
func NewTFramedTransport(transport TTransport) *TFramedTransport {
@@ -137,11 +141,13 @@ func (p *TFramedTransport) Flush() error {
binary.BigEndian.PutUint32(buf, uint32(size))
_, err := p.transport.Write(buf)
if err != nil {
+ p.buf.Truncate(0)
return NewTTransportExceptionFromError(err)
}
if size > 0 {
if n, err := p.buf.WriteTo(p.transport); err != nil {
print("Error while flushing write buffer of size ", size, " to transport, only wrote ", n, " bytes: ", err.Error(), "\n")
+ p.buf.Truncate(0)
return NewTTransportExceptionFromError(err)
}
}
@@ -164,4 +170,3 @@ func (p *TFramedTransport) readFrameHeader() (uint32, error) {
func (p *TFramedTransport) RemainingBytes() (num_bytes uint64) {
return uint64(p.frameSize)
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/go17.go
new file mode 100644
index 000000000..e3b21c4b7
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/go17.go
@@ -0,0 +1,26 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import "context"
+
+var defaultCtx = context.Background()
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/http_client.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_client.go
index 88eb2c128..33f2aa4b5 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/http_client.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/http_client.go
@@ -46,27 +46,16 @@ type THttpClient struct {
type THttpClientTransportFactory struct {
options THttpClientOptions
url string
- isPost bool
}
-func (p *THttpClientTransportFactory) GetTransport(trans TTransport) TTransport {
+func (p *THttpClientTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
if trans != nil {
t, ok := trans.(*THttpClient)
if ok && t.url != nil {
- if t.requestBuffer != nil {
- t2, _ := NewTHttpPostClientWithOptions(t.url.String(), p.options)
- return t2
- }
- t2, _ := NewTHttpClientWithOptions(t.url.String(), p.options)
- return t2
+ return NewTHttpClientWithOptions(t.url.String(), p.options)
}
}
- if p.isPost {
- s, _ := NewTHttpPostClientWithOptions(p.url, p.options)
- return s
- }
- s, _ := NewTHttpClientWithOptions(p.url, p.options)
- return s
+ return NewTHttpClientWithOptions(p.url, p.options)
}
type THttpClientOptions struct {
@@ -79,15 +68,7 @@ func NewTHttpClientTransportFactory(url string) *THttpClientTransportFactory {
}
func NewTHttpClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory {
- return &THttpClientTransportFactory{url: url, isPost: false, options: options}
-}
-
-func NewTHttpPostClientTransportFactory(url string) *THttpClientTransportFactory {
- return NewTHttpPostClientTransportFactoryWithOptions(url, THttpClientOptions{})
-}
-
-func NewTHttpPostClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory {
- return &THttpClientTransportFactory{url: url, isPost: true, options: options}
+ return &THttpClientTransportFactory{url: url, options: options}
}
func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error) {
@@ -95,38 +76,17 @@ func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTran
if err != nil {
return nil, err
}
- response, err := http.Get(urlstr)
- if err != nil {
- return nil, err
- }
- client := options.Client
- if client == nil {
- client = DefaultHttpClient
- }
- httpHeader := map[string][]string{"Content-Type": []string{"application/x-thrift"}}
- return &THttpClient{client: client, response: response, url: parsedURL, header: httpHeader}, nil
-}
-
-func NewTHttpClient(urlstr string) (TTransport, error) {
- return NewTHttpClientWithOptions(urlstr, THttpClientOptions{})
-}
-
-func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error) {
- parsedURL, err := url.Parse(urlstr)
- if err != nil {
- return nil, err
- }
buf := make([]byte, 0, 1024)
client := options.Client
if client == nil {
client = DefaultHttpClient
}
- httpHeader := map[string][]string{"Content-Type": []string{"application/x-thrift"}}
+ httpHeader := map[string][]string{"Content-Type": {"application/x-thrift"}}
return &THttpClient{client: client, url: parsedURL, requestBuffer: bytes.NewBuffer(buf), header: httpHeader}, nil
}
-func NewTHttpPostClient(urlstr string) (TTransport, error) {
- return NewTHttpPostClientWithOptions(urlstr, THttpClientOptions{})
+func NewTHttpClient(urlstr string) (TTransport, error) {
+ return NewTHttpClientWithOptions(urlstr, THttpClientOptions{})
}
// Set the HTTP Header for this specific Thrift Transport
@@ -256,3 +216,23 @@ func (p *THttpClient) RemainingBytes() (num_bytes uint64) {
const maxSize = ^uint64(0)
return maxSize // the thruth is, we just don't know unless framed is used
}
+
+// Deprecated: Use NewTHttpClientTransportFactory instead.
+func NewTHttpPostClientTransportFactory(url string) *THttpClientTransportFactory {
+ return NewTHttpClientTransportFactoryWithOptions(url, THttpClientOptions{})
+}
+
+// Deprecated: Use NewTHttpClientTransportFactoryWithOptions instead.
+func NewTHttpPostClientTransportFactoryWithOptions(url string, options THttpClientOptions) *THttpClientTransportFactory {
+ return NewTHttpClientTransportFactoryWithOptions(url, options)
+}
+
+// Deprecated: Use NewTHttpClientWithOptions instead.
+func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (TTransport, error) {
+ return NewTHttpClientWithOptions(urlstr, options)
+}
+
+// Deprecated: Use NewTHttpClient instead.
+func NewTHttpPostClient(urlstr string) (TTransport, error) {
+ return NewTHttpClientWithOptions(urlstr, THttpClientOptions{})
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go
index f6d7458db..601855b92 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport.go
@@ -19,16 +19,33 @@
package thrift
-import "net/http"
-
-// NewThriftHandlerFunc is a function that create a ready to use Apache Thrift Handler function
-func NewThriftHandlerFunc(processor TProcessor,
- inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request) {
+import (
+ "compress/gzip"
+ "io"
+ "net/http"
+ "strings"
+)
+// gz transparently compresses the HTTP response if the client supports it.
+func gz(handler http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
- w.Header().Add("Content-Type", "application/x-thrift")
-
- transport := NewStreamTransport(r.Body, w)
- processor.Process(inPfactory.GetProtocol(transport), outPfactory.GetProtocol(transport))
+ if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
+ handler(w, r)
+ return
+ }
+ w.Header().Set("Content-Encoding", "gzip")
+ gz := gzip.NewWriter(w)
+ defer gz.Close()
+ gzw := gzipResponseWriter{Writer: gz, ResponseWriter: w}
+ handler(gzw, r)
}
}
+
+type gzipResponseWriter struct {
+ io.Writer
+ http.ResponseWriter
+}
+
+func (w gzipResponseWriter) Write(b []byte) (int, error) {
+ return w.Writer.Write(b)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_go17.go
new file mode 100644
index 000000000..1313ac225
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_go17.go
@@ -0,0 +1,38 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import (
+ "net/http"
+)
+
+// NewThriftHandlerFunc is a function that create a ready to use Apache Thrift Handler function
+func NewThriftHandlerFunc(processor TProcessor,
+ inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request) {
+
+ return gz(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Add("Content-Type", "application/x-thrift")
+
+ transport := NewStreamTransport(r.Body, w)
+ processor.Process(r.Context(), inPfactory.GetProtocol(transport), outPfactory.GetProtocol(transport))
+ })
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_pre_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_pre_go17.go
new file mode 100644
index 000000000..13aa1c11d
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/http_transport_pre_go17.go
@@ -0,0 +1,40 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import (
+ "net/http"
+
+ "golang.org/x/net/context"
+)
+
+// NewThriftHandlerFunc is a function that create a ready to use Apache Thrift Handler function
+func NewThriftHandlerFunc(processor TProcessor,
+ inPfactory, outPfactory TProtocolFactory) func(w http.ResponseWriter, r *http.Request) {
+
+ return gz(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Add("Content-Type", "application/x-thrift")
+
+ transport := NewStreamTransport(r.Body, w)
+ processor.Process(context.Background(), inPfactory.GetProtocol(transport), outPfactory.GetProtocol(transport))
+ })
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go
index 794872ff1..b18be81c4 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/iostream_transport.go
@@ -38,38 +38,38 @@ type StreamTransportFactory struct {
isReadWriter bool
}
-func (p *StreamTransportFactory) GetTransport(trans TTransport) TTransport {
+func (p *StreamTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
if trans != nil {
t, ok := trans.(*StreamTransport)
if ok {
if t.isReadWriter {
- return NewStreamTransportRW(t.Reader.(io.ReadWriter))
+ return NewStreamTransportRW(t.Reader.(io.ReadWriter)), nil
}
if t.Reader != nil && t.Writer != nil {
- return NewStreamTransport(t.Reader, t.Writer)
+ return NewStreamTransport(t.Reader, t.Writer), nil
}
if t.Reader != nil && t.Writer == nil {
- return NewStreamTransportR(t.Reader)
+ return NewStreamTransportR(t.Reader), nil
}
if t.Reader == nil && t.Writer != nil {
- return NewStreamTransportW(t.Writer)
+ return NewStreamTransportW(t.Writer), nil
}
- return &StreamTransport{}
+ return &StreamTransport{}, nil
}
}
if p.isReadWriter {
- return NewStreamTransportRW(p.Reader.(io.ReadWriter))
+ return NewStreamTransportRW(p.Reader.(io.ReadWriter)), nil
}
if p.Reader != nil && p.Writer != nil {
- return NewStreamTransport(p.Reader, p.Writer)
+ return NewStreamTransport(p.Reader, p.Writer), nil
}
if p.Reader != nil && p.Writer == nil {
- return NewStreamTransportR(p.Reader)
+ return NewStreamTransportR(p.Reader), nil
}
if p.Reader == nil && p.Writer != nil {
- return NewStreamTransportW(p.Writer)
+ return NewStreamTransportW(p.Writer), nil
}
- return &StreamTransport{}
+ return &StreamTransport{}, nil
}
func NewStreamTransportFactory(reader io.Reader, writer io.Writer, isReadWriter bool) *StreamTransportFactory {
@@ -209,6 +209,5 @@ func (p *StreamTransport) WriteString(s string) (n int, err error) {
func (p *StreamTransport) RemainingBytes() (num_bytes uint64) {
const maxSize = ^uint64(0)
- return maxSize // the thruth is, we just don't know unless framed is used
+ return maxSize // the thruth is, we just don't know unless framed is used
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go
index a5094ae97..e1736557b 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/lowlevel_benchmarks_test.go
@@ -36,7 +36,10 @@ var tfv = []TTransportFactory{
}
func BenchmarkBinaryBool_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -44,7 +47,10 @@ func BenchmarkBinaryBool_0(b *testing.B) {
}
func BenchmarkBinaryByte_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -52,7 +58,10 @@ func BenchmarkBinaryByte_0(b *testing.B) {
}
func BenchmarkBinaryI16_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -60,35 +69,50 @@ func BenchmarkBinaryI16_0(b *testing.B) {
}
func BenchmarkBinaryI32_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkBinaryI64_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkBinaryDouble_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkBinaryString_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkBinaryBinary_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
@@ -96,7 +120,10 @@ func BenchmarkBinaryBinary_0(b *testing.B) {
}
func BenchmarkBinaryBool_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -104,7 +131,10 @@ func BenchmarkBinaryBool_1(b *testing.B) {
}
func BenchmarkBinaryByte_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -112,7 +142,10 @@ func BenchmarkBinaryByte_1(b *testing.B) {
}
func BenchmarkBinaryI16_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -120,35 +153,50 @@ func BenchmarkBinaryI16_1(b *testing.B) {
}
func BenchmarkBinaryI32_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkBinaryI64_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkBinaryDouble_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkBinaryString_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkBinaryBinary_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
@@ -156,7 +204,10 @@ func BenchmarkBinaryBinary_1(b *testing.B) {
}
func BenchmarkBinaryBool_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -164,7 +215,10 @@ func BenchmarkBinaryBool_2(b *testing.B) {
}
func BenchmarkBinaryByte_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -172,7 +226,10 @@ func BenchmarkBinaryByte_2(b *testing.B) {
}
func BenchmarkBinaryI16_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -180,35 +237,50 @@ func BenchmarkBinaryI16_2(b *testing.B) {
}
func BenchmarkBinaryI32_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkBinaryI64_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkBinaryDouble_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkBinaryString_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkBinaryBinary_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := binaryProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
@@ -216,7 +288,10 @@ func BenchmarkBinaryBinary_2(b *testing.B) {
}
func BenchmarkCompactBool_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -224,7 +299,10 @@ func BenchmarkCompactBool_0(b *testing.B) {
}
func BenchmarkCompactByte_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -232,7 +310,10 @@ func BenchmarkCompactByte_0(b *testing.B) {
}
func BenchmarkCompactI16_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -240,35 +321,50 @@ func BenchmarkCompactI16_0(b *testing.B) {
}
func BenchmarkCompactI32_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkCompactI64_0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkCompactDouble0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkCompactString0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkCompactBinary0(b *testing.B) {
- trans := tfv[0].GetTransport(nil)
+ trans, err := tfv[0].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
@@ -276,7 +372,10 @@ func BenchmarkCompactBinary0(b *testing.B) {
}
func BenchmarkCompactBool_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -284,7 +383,10 @@ func BenchmarkCompactBool_1(b *testing.B) {
}
func BenchmarkCompactByte_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -292,7 +394,10 @@ func BenchmarkCompactByte_1(b *testing.B) {
}
func BenchmarkCompactI16_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -300,35 +405,50 @@ func BenchmarkCompactI16_1(b *testing.B) {
}
func BenchmarkCompactI32_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkCompactI64_1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkCompactDouble1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkCompactString1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkCompactBinary1(b *testing.B) {
- trans := tfv[1].GetTransport(nil)
+ trans, err := tfv[1].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
@@ -336,7 +456,10 @@ func BenchmarkCompactBinary1(b *testing.B) {
}
func BenchmarkCompactBool_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBool(b, p, trans)
@@ -344,7 +467,10 @@ func BenchmarkCompactBool_2(b *testing.B) {
}
func BenchmarkCompactByte_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteByte(b, p, trans)
@@ -352,7 +478,10 @@ func BenchmarkCompactByte_2(b *testing.B) {
}
func BenchmarkCompactI16_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI16(b, p, trans)
@@ -360,35 +489,50 @@ func BenchmarkCompactI16_2(b *testing.B) {
}
func BenchmarkCompactI32_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI32(b, p, trans)
}
}
func BenchmarkCompactI64_2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteI64(b, p, trans)
}
}
func BenchmarkCompactDouble2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteDouble(b, p, trans)
}
}
func BenchmarkCompactString2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteString(b, p, trans)
}
}
func BenchmarkCompactBinary2(b *testing.B) {
- trans := tfv[2].GetTransport(nil)
+ trans, err := tfv[2].GetTransport(nil)
+ if err != nil {
+ b.Fatal(err)
+ }
p := compactProtoF.GetProtocol(trans)
for i := 0; i < b.N; i++ {
ReadWriteBinary(b, p, trans)
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go b/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go
index b62fd56f0..97a4edfa5 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/memory_buffer.go
@@ -33,14 +33,14 @@ type TMemoryBufferTransportFactory struct {
size int
}
-func (p *TMemoryBufferTransportFactory) GetTransport(trans TTransport) TTransport {
+func (p *TMemoryBufferTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
if trans != nil {
t, ok := trans.(*TMemoryBuffer)
if ok && t.size > 0 {
- return NewTMemoryBufferLen(t.size)
+ return NewTMemoryBufferLen(t.size), nil
}
}
- return NewTMemoryBufferLen(p.size)
+ return NewTMemoryBufferLen(p.size), nil
}
func NewTMemoryBufferTransportFactory(size int) *TMemoryBufferTransportFactory {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go
index 3157e0d5d..b7f4f8a1c 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol.go
@@ -19,11 +19,6 @@
package thrift
-import (
- "fmt"
- "strings"
-)
-
/*
TMultiplexedProtocol is a protocol-independent concrete decorator
that allows a Thrift client to communicate with a multiplexing Thrift server,
@@ -127,31 +122,6 @@ func (t *TMultiplexedProcessor) RegisterProcessor(name string, processor TProces
t.serviceProcessorMap[name] = processor
}
-func (t *TMultiplexedProcessor) Process(in, out TProtocol) (bool, TException) {
- name, typeId, seqid, err := in.ReadMessageBegin()
- if err != nil {
- return false, err
- }
- if typeId != CALL && typeId != ONEWAY {
- return false, fmt.Errorf("Unexpected message type %v", typeId)
- }
- //extract the service name
- v := strings.SplitN(name, MULTIPLEXED_SEPARATOR, 2)
- if len(v) != 2 {
- if t.DefaultProcessor != nil {
- smb := NewStoredMessageProtocol(in, name, typeId, seqid)
- return t.DefaultProcessor.Process(smb, out)
- }
- return false, fmt.Errorf("Service name not found in message name: %s. Did you forget to use a TMultiplexProtocol in your client?", name)
- }
- actualProcessor, ok := t.serviceProcessorMap[v[0]]
- if !ok {
- return false, fmt.Errorf("Service name not found: %s. Did you forget to call registerProcessor()?", v[0])
- }
- smb := NewStoredMessageProtocol(in, v[1], typeId, seqid)
- return actualProcessor.Process(smb, out)
-}
-
//Protocol that use stored message for ReadMessageBegin
type storedMessageProtocol struct {
TProtocol
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_go17.go
new file mode 100644
index 000000000..c71035e68
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_go17.go
@@ -0,0 +1,53 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import (
+ "context"
+ "fmt"
+ "strings"
+)
+
+func (t *TMultiplexedProcessor) Process(ctx context.Context, in, out TProtocol) (bool, TException) {
+ name, typeId, seqid, err := in.ReadMessageBegin()
+ if err != nil {
+ return false, err
+ }
+ if typeId != CALL && typeId != ONEWAY {
+ return false, fmt.Errorf("Unexpected message type %v", typeId)
+ }
+ //extract the service name
+ v := strings.SplitN(name, MULTIPLEXED_SEPARATOR, 2)
+ if len(v) != 2 {
+ if t.DefaultProcessor != nil {
+ smb := NewStoredMessageProtocol(in, name, typeId, seqid)
+ return t.DefaultProcessor.Process(ctx, smb, out)
+ }
+ return false, fmt.Errorf("Service name not found in message name: %s. Did you forget to use a TMultiplexProtocol in your client?", name)
+ }
+ actualProcessor, ok := t.serviceProcessorMap[v[0]]
+ if !ok {
+ return false, fmt.Errorf("Service name not found: %s. Did you forget to call registerProcessor()?", v[0])
+ }
+ smb := NewStoredMessageProtocol(in, v[1], typeId, seqid)
+ return actualProcessor.Process(ctx, smb, out)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_pre_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_pre_go17.go
new file mode 100644
index 000000000..5c27b3875
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/multiplexed_protocol_pre_go17.go
@@ -0,0 +1,54 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import (
+ "fmt"
+ "strings"
+
+ "golang.org/x/net/context"
+)
+
+func (t *TMultiplexedProcessor) Process(ctx context.Context, in, out TProtocol) (bool, TException) {
+ name, typeId, seqid, err := in.ReadMessageBegin()
+ if err != nil {
+ return false, err
+ }
+ if typeId != CALL && typeId != ONEWAY {
+ return false, fmt.Errorf("Unexpected message type %v", typeId)
+ }
+ //extract the service name
+ v := strings.SplitN(name, MULTIPLEXED_SEPARATOR, 2)
+ if len(v) != 2 {
+ if t.DefaultProcessor != nil {
+ smb := NewStoredMessageProtocol(in, name, typeId, seqid)
+ return t.DefaultProcessor.Process(ctx, smb, out)
+ }
+ return false, fmt.Errorf("Service name not found in message name: %s. Did you forget to use a TMultiplexProtocol in your client?", name)
+ }
+ actualProcessor, ok := t.serviceProcessorMap[v[0]]
+ if !ok {
+ return false, fmt.Errorf("Service name not found: %s. Did you forget to call registerProcessor()?", v[0])
+ }
+ smb := NewStoredMessageProtocol(in, v[1], typeId, seqid)
+ return actualProcessor.Process(ctx, smb, out)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/pre_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/pre_go17.go
new file mode 100644
index 000000000..cb564b8db
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/pre_go17.go
@@ -0,0 +1,26 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import "golang.org/x/net/context"
+
+var defaultCtx = context.Background()
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/processor.go b/vendor/github.com/apache/thrift/lib/go/thrift/processor.go
index ca0d3faf2..566aaaf71 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/processor.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/processor.go
@@ -1,3 +1,5 @@
+// +build !go1.7
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -19,12 +21,14 @@
package thrift
+import "golang.org/x/net/context"
+
// A processor is a generic object which operates upon an input stream and
// writes to some output stream.
type TProcessor interface {
- Process(in, out TProtocol) (bool, TException)
+ Process(ctx context.Context, in, out TProtocol) (bool, TException)
}
type TProcessorFunction interface {
- Process(seqId int32, in, out TProtocol) (bool, TException)
+ Process(ctx context.Context, seqId int32, in, out TProtocol) (bool, TException)
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/processor_go17.go b/vendor/github.com/apache/thrift/lib/go/thrift/processor_go17.go
new file mode 100644
index 000000000..fb0b165dc
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/processor_go17.go
@@ -0,0 +1,34 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import "context"
+
+// A processor is a generic object which operates upon an input stream and
+// writes to some output stream.
+type TProcessor interface {
+ Process(ctx context.Context, in, out TProtocol) (bool, TException)
+}
+
+type TProcessorFunction interface {
+ Process(ctx context.Context, seqId int32, in, out TProtocol) (bool, TException)
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go
index 45fa202e7..25e6d24b9 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/protocol.go
@@ -21,6 +21,7 @@ package thrift
import (
"errors"
+ "fmt"
)
const (
@@ -88,9 +89,9 @@ func SkipDefaultDepth(prot TProtocol, typeId TType) (err error) {
// Skips over the next data element from the provided input TProtocol object.
func Skip(self TProtocol, fieldType TType, maxDepth int) (err error) {
-
- if maxDepth <= 0 {
- return NewTProtocolExceptionWithType( DEPTH_LIMIT, errors.New("Depth limit exceeded"))
+
+ if maxDepth <= 0 {
+ return NewTProtocolExceptionWithType(DEPTH_LIMIT, errors.New("Depth limit exceeded"))
}
switch fieldType {
@@ -170,6 +171,8 @@ func Skip(self TProtocol, fieldType TType, maxDepth int) (err error) {
}
}
return self.ReadListEnd()
+ default:
+ return NewTProtocolExceptionWithType(INVALID_DATA, errors.New(fmt.Sprintf("Unknown data type %d", fieldType)))
}
return nil
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go
index 6e357ee89..29ab75d92 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_exception.go
@@ -60,7 +60,7 @@ func NewTProtocolException(err error) TProtocolException {
if err == nil {
return nil
}
- if e,ok := err.(TProtocolException); ok {
+ if e, ok := err.(TProtocolException); ok {
return e
}
if _, ok := err.(base64.CorruptInputError); ok {
@@ -75,4 +75,3 @@ func NewTProtocolExceptionWithType(errType int, err error) TProtocolException {
}
return &tProtocolException{errType, err.Error()}
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go
index 613eae6bc..2573312d1 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/protocol_test.go
@@ -123,55 +123,91 @@ func ReadWriteProtocolTest(t *testing.T, protocolFactory TProtocolFactory) {
NewTHttpPostClientTransportFactory("http://" + addr.String()),
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteBool(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteByte(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteI16(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteI32(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteI64(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteDouble(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteString(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteBinary(t, p, trans)
trans.Close()
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
p := protocolFactory.GetProtocol(trans)
ReadWriteI64(t, p, trans)
ReadWriteDouble(t, p, trans)
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go
index 8e296a99b..4025bebea 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport.go
@@ -66,4 +66,3 @@ func writeByte(w io.Writer, c byte) error {
_, err := w.Write(v[0:1])
return err
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go
index 41513f812..25c3fd5aa 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/rich_transport_test.go
@@ -37,7 +37,11 @@ func TestEnsureTransportsAreRich(t *testing.T) {
NewTHttpPostClientTransportFactory("http://127.0.0.1"),
}
for _, tf := range transports {
- trans := tf.GetTransport(nil)
+ trans, err := tf.GetTransport(nil)
+ if err != nil {
+ t.Error(err)
+ continue
+ }
_, ok := trans.(TRichTransport)
if !ok {
t.Errorf("Transport %s does not implement TRichTransport interface", reflect.ValueOf(trans))
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go
index 38ab8d6d6..c8e3b3be4 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/serializer_types_test.go
@@ -598,7 +598,7 @@ func (p *MyTestStruct) writeField11(oprot TProtocol) (err error) {
if err := oprot.WriteSetBegin(STRING, len(p.StringSet)); err != nil {
return PrependError("error writing set begin: ", err)
}
- for v, _ := range p.StringSet {
+ for v := range p.StringSet {
if err := oprot.WriteString(string(v)); err != nil {
return PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go
index d6e9495d2..80313c4be 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket.go
@@ -47,7 +47,14 @@ func NewTServerSocketTimeout(listenAddr string, clientTimeout time.Duration) (*T
return &TServerSocket{addr: addr, clientTimeout: clientTimeout}, nil
}
+// Creates a TServerSocket from a net.Addr
+func NewTServerSocketFromAddrTimeout(addr net.Addr, clientTimeout time.Duration) *TServerSocket {
+ return &TServerSocket{addr: addr, clientTimeout: clientTimeout}
+}
+
func (p *TServerSocket) Listen() error {
+ p.mu.Lock()
+ defer p.mu.Unlock()
if p.IsListening() {
return nil
}
@@ -67,10 +74,13 @@ func (p *TServerSocket) Accept() (TTransport, error) {
if interrupted {
return nil, errTransportInterrupted
}
- if p.listener == nil {
+
+ listener := p.listener
+ if listener == nil {
return nil, NewTTransportException(NOT_OPEN, "No underlying server socket")
}
- conn, err := p.listener.Accept()
+
+ conn, err := listener.Accept()
if err != nil {
return nil, NewTTransportExceptionFromError(err)
}
@@ -84,6 +94,8 @@ func (p *TServerSocket) IsListening() bool {
// Connects the socket, creating a new socket object if necessary.
func (p *TServerSocket) Open() error {
+ p.mu.Lock()
+ defer p.mu.Unlock()
if p.IsListening() {
return NewTTransportException(ALREADY_OPEN, "Server socket already open")
}
@@ -114,9 +126,9 @@ func (p *TServerSocket) Close() error {
func (p *TServerSocket) Interrupt() error {
p.mu.Lock()
+ defer p.mu.Unlock()
p.interrupted = true
p.Close()
- p.mu.Unlock()
return nil
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go
index f08e8e900..f1e1983a9 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/server_socket_test.go
@@ -41,6 +41,16 @@ func TestSocketIsntListeningAfterInterrupt(t *testing.T) {
}
}
+func TestSocketConcurrency(t *testing.T) {
+ host := "127.0.0.1"
+ port := 9090
+ addr := fmt.Sprintf("%s:%d", host, port)
+
+ socket := CreateServerSocket(t, addr)
+ go func() { socket.Listen() }()
+ go func() { socket.Interrupt() }()
+}
+
func CreateServerSocket(t *testing.T, addr string) *TServerSocket {
socket, err := NewTServerSocket(addr)
if err != nil {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go
index 4097c4aea..37081bd83 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/simple_server.go
@@ -23,11 +23,18 @@ import (
"log"
"runtime/debug"
"sync"
+ "sync/atomic"
)
-// Simple, non-concurrent server for testing.
+/*
+ * This is not a typical TSimpleServer as it is not blocked after accept a socket.
+ * It is more like a TThreadedServer that can handle different connections in different goroutines.
+ * This will work if golang user implements a conn-pool like thing in client side.
+ */
type TSimpleServer struct {
- quit chan struct{}
+ closed int32
+ wg sync.WaitGroup
+ mu sync.Mutex
processorFactory TProcessorFactory
serverTransport TServerTransport
@@ -87,7 +94,6 @@ func NewTSimpleServerFactory6(processorFactory TProcessorFactory, serverTranspor
outputTransportFactory: outputTransportFactory,
inputProtocolFactory: inputProtocolFactory,
outputProtocolFactory: outputProtocolFactory,
- quit: make(chan struct{}, 1),
}
}
@@ -122,21 +128,23 @@ func (p *TSimpleServer) Listen() error {
func (p *TSimpleServer) AcceptLoop() error {
for {
client, err := p.serverTransport.Accept()
+ p.mu.Lock()
+ if atomic.LoadInt32(&p.closed) != 0 {
+ return nil
+ }
if err != nil {
- select {
- case <-p.quit:
- return nil
- default:
- }
return err
}
if client != nil {
+ p.wg.Add(1)
go func() {
+ defer p.wg.Done()
if err := p.processRequests(client); err != nil {
log.Println("error processing request:", err)
}
}()
}
+ p.mu.Unlock()
}
}
@@ -149,21 +157,28 @@ func (p *TSimpleServer) Serve() error {
return nil
}
-var once sync.Once
-
func (p *TSimpleServer) Stop() error {
- q := func() {
- p.quit <- struct{}{}
- p.serverTransport.Interrupt()
+ p.mu.Lock()
+ defer p.mu.Unlock()
+ if atomic.LoadInt32(&p.closed) != 0 {
+ return nil
}
- once.Do(q)
+ atomic.StoreInt32(&p.closed, 1)
+ p.serverTransport.Interrupt()
+ p.wg.Wait()
return nil
}
func (p *TSimpleServer) processRequests(client TTransport) error {
processor := p.processorFactory.GetProcessor(client)
- inputTransport := p.inputTransportFactory.GetTransport(client)
- outputTransport := p.outputTransportFactory.GetTransport(client)
+ inputTransport, err := p.inputTransportFactory.GetTransport(client)
+ if err != nil {
+ return err
+ }
+ outputTransport, err := p.outputTransportFactory.GetTransport(client)
+ if err != nil {
+ return err
+ }
inputProtocol := p.inputProtocolFactory.GetProtocol(inputTransport)
outputProtocol := p.outputProtocolFactory.GetProtocol(outputTransport)
defer func() {
@@ -171,6 +186,7 @@ func (p *TSimpleServer) processRequests(client TTransport) error {
log.Printf("panic in processor: %s: %s", e, debug.Stack())
}
}()
+
if inputTransport != nil {
defer inputTransport.Close()
}
@@ -178,17 +194,20 @@ func (p *TSimpleServer) processRequests(client TTransport) error {
defer outputTransport.Close()
}
for {
- ok, err := processor.Process(inputProtocol, outputProtocol)
+ if atomic.LoadInt32(&p.closed) != 0 {
+ return nil
+ }
+
+ ok, err := processor.Process(defaultCtx, inputProtocol, outputProtocol)
if err, ok := err.(TTransportException); ok && err.TypeId() == END_OF_FILE {
return nil
} else if err != nil {
- log.Printf("error processing request: %s", err)
return err
}
if err, ok := err.(TApplicationException); ok && err.TypeId() == UNKNOWN_METHOD {
continue
}
- if !ok {
+ if !ok {
break
}
}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/simple_server_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/simple_server_test.go
new file mode 100644
index 000000000..25702e4ac
--- /dev/null
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/simple_server_test.go
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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.
+ */
+
+package thrift
+
+import (
+ "testing"
+ "time"
+)
+
+type mockServerTransport struct {
+ ListenFunc func() error
+ AcceptFunc func() (TTransport, error)
+ CloseFunc func() error
+ InterruptFunc func() error
+}
+
+func (m *mockServerTransport) Listen() error {
+ return m.ListenFunc()
+}
+
+func (m *mockServerTransport) Accept() (TTransport, error) {
+ return m.AcceptFunc()
+}
+
+func (m *mockServerTransport) Close() error {
+ return m.CloseFunc()
+}
+
+func (m *mockServerTransport) Interrupt() error {
+ return m.InterruptFunc()
+}
+
+type mockTTransport struct {
+ TTransport
+}
+
+func (m *mockTTransport) Close() error {
+ return nil
+}
+
+func TestMultipleStop(t *testing.T) {
+ proc := &mockProcessor{
+ ProcessFunc: func(in, out TProtocol) (bool, TException) {
+ return false, nil
+ },
+ }
+
+ var interruptCalled bool
+ c := make(chan struct{})
+ trans := &mockServerTransport{
+ ListenFunc: func() error {
+ return nil
+ },
+ AcceptFunc: func() (TTransport, error) {
+ <-c
+ return nil, nil
+ },
+ CloseFunc: func() error {
+ c <- struct{}{}
+ return nil
+ },
+ InterruptFunc: func() error {
+ interruptCalled = true
+ return nil
+ },
+ }
+
+ serv := NewTSimpleServer2(proc, trans)
+ go serv.Serve()
+ serv.Stop()
+ if !interruptCalled {
+ t.Error("first server transport should have been interrupted")
+ }
+
+ serv = NewTSimpleServer2(proc, trans)
+ interruptCalled = false
+ go serv.Serve()
+ serv.Stop()
+ if !interruptCalled {
+ t.Error("second server transport should have been interrupted")
+ }
+}
+
+func TestWaitRace(t *testing.T) {
+ proc := &mockProcessor{
+ ProcessFunc: func(in, out TProtocol) (bool, TException) {
+ return false, nil
+ },
+ }
+
+ trans := &mockServerTransport{
+ ListenFunc: func() error {
+ return nil
+ },
+ AcceptFunc: func() (TTransport, error) {
+ return &mockTTransport{}, nil
+ },
+ CloseFunc: func() error {
+ return nil
+ },
+ InterruptFunc: func() error {
+ return nil
+ },
+ }
+
+ serv := NewTSimpleServer2(proc, trans)
+ go serv.Serve()
+ time.Sleep(1)
+ serv.Stop()
+}
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/socket.go
index 82e28b4b1..383b1fe3e 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/socket.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/socket.go
@@ -161,6 +161,5 @@ func (p *TSocket) Interrupt() error {
func (p *TSocket) RemainingBytes() (num_bytes uint64) {
const maxSize = ^uint64(0)
- return maxSize // the thruth is, we just don't know unless framed is used
+ return maxSize // the thruth is, we just don't know unless framed is used
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go
index 58f859b0e..907afca32 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_server_socket.go
@@ -20,9 +20,9 @@
package thrift
import (
+ "crypto/tls"
"net"
"time"
- "crypto/tls"
)
type TSSLServerSocket struct {
@@ -38,6 +38,9 @@ func NewTSSLServerSocket(listenAddr string, cfg *tls.Config) (*TSSLServerSocket,
}
func NewTSSLServerSocketTimeout(listenAddr string, cfg *tls.Config, clientTimeout time.Duration) (*TSSLServerSocket, error) {
+ if cfg.MinVersion == 0 {
+ cfg.MinVersion = tls.VersionTLS10
+ }
addr, err := net.ResolveTCPAddr("tcp", listenAddr)
if err != nil {
return nil, err
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
index 04d385085..c3bd72cc4 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
@@ -48,6 +48,9 @@ func NewTSSLSocket(hostPort string, cfg *tls.Config) (*TSSLSocket, error) {
// NewTSSLSocketTimeout creates a net.Conn-backed TTransport, given a host and port
// it also accepts a tls Configuration and a timeout as a time.Duration
func NewTSSLSocketTimeout(hostPort string, cfg *tls.Config, timeout time.Duration) (*TSSLSocket, error) {
+ if cfg.MinVersion == 0 {
+ cfg.MinVersion = tls.VersionTLS10
+ }
return &TSSLSocket{hostPort: hostPort, timeout: timeout, cfg: cfg}, nil
}
@@ -87,7 +90,8 @@ func (p *TSSLSocket) Open() error {
// If we have a hostname, we need to pass the hostname to tls.Dial for
// certificate hostname checks.
if p.hostPort != "" {
- if p.conn, err = tls.Dial("tcp", p.hostPort, p.cfg); err != nil {
+ if p.conn, err = tls.DialWithDialer(&net.Dialer{
+ Timeout: p.timeout}, "tcp", p.hostPort, p.cfg); err != nil {
return NewTTransportException(NOT_OPEN, err.Error())
}
} else {
@@ -103,7 +107,8 @@ func (p *TSSLSocket) Open() error {
if len(p.addr.String()) == 0 {
return NewTTransportException(NOT_OPEN, "Cannot open bad address.")
}
- if p.conn, err = tls.Dial(p.addr.Network(), p.addr.String(), p.cfg); err != nil {
+ if p.conn, err = tls.DialWithDialer(&net.Dialer{
+ Timeout: p.timeout}, p.addr.Network(), p.addr.String(), p.cfg); err != nil {
return NewTTransportException(NOT_OPEN, err.Error())
}
}
@@ -166,6 +171,5 @@ func (p *TSSLSocket) Interrupt() error {
func (p *TSSLSocket) RemainingBytes() (num_bytes uint64) {
const maxSize = ^uint64(0)
- return maxSize // the thruth is, we just don't know unless framed is used
+ return maxSize // the thruth is, we just don't know unless framed is used
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport.go
index 453899651..70a85a848 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/transport.go
@@ -34,7 +34,6 @@ type ReadSizeProvider interface {
RemainingBytes() (num_bytes uint64)
}
-
// Encapsulates the I/O layer
type TTransport interface {
io.ReadWriteCloser
@@ -52,7 +51,6 @@ type stringWriter interface {
WriteString(s string) (n int, err error)
}
-
// This is "enchanced" transport with extra capabilities. You need to use one of these
// to construct protocol.
// Notably, TSocket does not implement this interface, and it is always a mistake to use
@@ -65,4 +63,3 @@ type TRichTransport interface {
Flusher
ReadSizeProvider
}
-
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go b/vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go
index 533d1b437..c80580794 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/transport_factory.go
@@ -24,14 +24,14 @@ package thrift
// a ServerTransport and then may want to mutate them (i.e. create
// a BufferedTransport from the underlying base transport)
type TTransportFactory interface {
- GetTransport(trans TTransport) TTransport
+ GetTransport(trans TTransport) (TTransport, error)
}
type tTransportFactory struct{}
// Return a wrapped instance of the base Transport.
-func (p *tTransportFactory) GetTransport(trans TTransport) TTransport {
- return trans
+func (p *tTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
+ return trans, nil
}
func NewTTransportFactory() TTransportFactory {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go
index e47455fe1..f2f073222 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport.go
@@ -27,7 +27,8 @@ import (
// TZlibTransportFactory is a factory for TZlibTransport instances
type TZlibTransportFactory struct {
- level int
+ level int
+ factory TTransportFactory
}
// TZlibTransport is a TTransport implementation that makes use of zlib compression.
@@ -38,14 +39,27 @@ type TZlibTransport struct {
}
// GetTransport constructs a new instance of NewTZlibTransport
-func (p *TZlibTransportFactory) GetTransport(trans TTransport) TTransport {
- t, _ := NewTZlibTransport(trans, p.level)
- return t
+func (p *TZlibTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
+ if p.factory != nil {
+ // wrap other factory
+ var err error
+ trans, err = p.factory.GetTransport(trans)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return NewTZlibTransport(trans, p.level)
}
// NewTZlibTransportFactory constructs a new instance of NewTZlibTransportFactory
func NewTZlibTransportFactory(level int) *TZlibTransportFactory {
- return &TZlibTransportFactory{level: level}
+ return &TZlibTransportFactory{level: level, factory: nil}
+}
+
+// NewTZlibTransportFactory constructs a new instance of TZlibTransportFactory
+// as a wrapper over existing transport factory
+func NewTZlibTransportFactoryWithFactory(level int, factory TTransportFactory) *TZlibTransportFactory {
+ return &TZlibTransportFactory{level: level, factory: factory}
}
// NewTZlibTransport constructs a new instance of TZlibTransport
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go
index f57610cbd..3c6f11eb5 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/zlib_transport_test.go
@@ -31,3 +31,32 @@ func TestZlibTransport(t *testing.T) {
}
TransportTest(t, trans, trans)
}
+
+type DummyTransportFactory struct{}
+
+func (p *DummyTransportFactory) GetTransport(trans TTransport) (TTransport, error) {
+ return NewTMemoryBuffer(), nil
+}
+
+func TestZlibFactoryTransportWithFactory(t *testing.T) {
+ factory := NewTZlibTransportFactoryWithFactory(
+ zlib.BestCompression,
+ &DummyTransportFactory{},
+ )
+ buffer := NewTMemoryBuffer()
+ trans, err := factory.GetTransport(buffer)
+ if err != nil {
+ t.Fatal(err)
+ }
+ TransportTest(t, trans, trans)
+}
+
+func TestZlibFactoryTransportWithoutFactory(t *testing.T) {
+ factory := NewTZlibTransportFactoryWithFactory(zlib.BestCompression, nil)
+ buffer := NewTMemoryBuffer()
+ trans, err := factory.GetTransport(buffer)
+ if err != nil {
+ t.Fatal(err)
+ }
+ TransportTest(t, trans, trans)
+}
diff --git a/vendor/github.com/apache/thrift/package.json b/vendor/github.com/apache/thrift/package.json
index edfc3553e..cd6c7106c 100644
--- a/vendor/github.com/apache/thrift/package.json
+++ b/vendor/github.com/apache/thrift/package.json
@@ -6,7 +6,7 @@
"type": "git",
"url": "https://git-wip-us.apache.org/repos/asf/thrift.git"
},
- "version": "0.10.0",
+ "version": "1.0.0-dev",
"author": {
"name": "Apache Thrift Developers",
"email": "dev@thrift.apache.org",
@@ -32,20 +32,24 @@
},
"main": "./lib/nodejs/lib/thrift",
"engines": {
- "node": ">= 0.2.4"
+ "node": ">= 4.1.0"
},
"dependencies": {
- "node-int64": "~0.3.0",
- "q": "1.0.x",
- "ws": "~0.4.32"
+ "node-int64": "^0.4.0",
+ "q": "^1.5.0",
+ "ws": ">= 2.2.3"
},
"devDependencies": {
- "buffer-equals": "^1.0.3",
- "commander": "2.1.x",
- "connect": "2.7.x",
- "istanbul": "^0.3.5",
- "run-browser": "^2.0.1",
- "tape": "~3.5.0"
+ "buffer-equals": "^1.0.4",
+ "commander": "^2.11.0",
+ "connect": "^3.6.4",
+ "istanbul": "^0.4.5",
+ "jsdoc": ">=3.5.5",
+ "minimatch": "^3.0.4",
+ "phantomjs-prebuilt": "^2.1.7",
+ "run-browser": "^2.0.2",
+ "tape": "^4.8.0",
+ "utf-8-validate": "^3.0.0"
},
"scripts": {
"cover": "lib/nodejs/test/testAll.sh COVER",
diff --git a/vendor/github.com/apache/thrift/sonar-project.properties b/vendor/github.com/apache/thrift/sonar-project.properties
index 6e6c5db90..b465fd12e 100755
--- a/vendor/github.com/apache/thrift/sonar-project.properties
+++ b/vendor/github.com/apache/thrift/sonar-project.properties
@@ -16,7 +16,7 @@ development, combines a software stack with a code generation engine to build
services that work efficiently and seamlessly between all major languages.
# Apache Thrift Version
-sonar.projectVersion=0.10.0
+sonar.projectVersion=1.0.0-dev
# use this to set another version string
# $ sonar-runner -D sonar.projectVersion=`git rev-parse HEAD`
# set projectDate in combination with projectVersion for imports of old releases
@@ -54,7 +54,7 @@ module1.sonar.projectName=Apache Thrift - Java Library
module1.sonar.projectBaseDir=lib/java
module1.sonar.sources=src
module1.sonar.tests=test
-module1.sonar.binaries=build/libthrift-0.10.0.jar
+module1.sonar.binaries=build/libthrift-1.0.0.jar
module1.sonar.libraries=build/lib/*.jar
module1.sonar.language=java
diff --git a/vendor/github.com/go-openapi/spec/items.go b/vendor/github.com/go-openapi/spec/items.go
index 07ac88e66..492423ef7 100644
--- a/vendor/github.com/go-openapi/spec/items.go
+++ b/vendor/github.com/go-openapi/spec/items.go
@@ -28,6 +28,7 @@ type SimpleSchema struct {
Items *Items `json:"items,omitempty"`
CollectionFormat string `json:"collectionFormat,omitempty"`
Default interface{} `json:"default,omitempty"`
+ Example interface{} `json:"example,omitempty"`
}
func (s *SimpleSchema) TypeName() string {
diff --git a/vendor/github.com/opentracing-contrib/go-observer/.gitignore b/vendor/github.com/opentracing-contrib/go-observer/.gitignore
new file mode 100644
index 000000000..a1338d685
--- /dev/null
+++ b/vendor/github.com/opentracing-contrib/go-observer/.gitignore
@@ -0,0 +1,14 @@
+# Binaries for programs and plugins
+*.exe
+*.dll
+*.so
+*.dylib
+
+# Test binary, build with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
+.glide/
diff --git a/vendor/github.com/opentracing-contrib/go-observer/LICENSE b/vendor/github.com/opentracing-contrib/go-observer/LICENSE
new file mode 100644
index 000000000..044f3dfd4
--- /dev/null
+++ b/vendor/github.com/opentracing-contrib/go-observer/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright (c) 2017 opentracing-contrib
+
+ 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
+
+ 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.
diff --git a/vendor/github.com/opentracing-contrib/go-observer/README.md b/vendor/github.com/opentracing-contrib/go-observer/README.md
new file mode 100644
index 000000000..334a9aa6b
--- /dev/null
+++ b/vendor/github.com/opentracing-contrib/go-observer/README.md
@@ -0,0 +1,64 @@
+# An Observer API for OpenTracing-go Tracers
+
+OTObserver can be used to watch the span events like StartSpan(),
+SetOperationName(), SetTag() and Finish(). A need for observers
+arose when information (metrics) more than just the latency information was
+required for the spans, in the distributed tracers. But, there can be a lot
+of metrics in different domains and adding such metrics to any one (client)
+tracer breaks cross-platform compatibility. There are various ways to
+avoid such issues, however, an observer pattern is cleaner and provides loose
+coupling between the packages exporting metrics (on span events) and the
+tracer.
+
+This information can be in the form of hardware metrics, RPC metrics,
+useful metrics exported out of the kernel or other metrics, profiled for a
+span. These additional metrics can help us in getting better Root-cause
+analysis. With that being said, its not just for calculation of metrics,
+it can be used for anything which needs watching the span events.
+
+## Installation and Usage
+
+The `otobserver` package provides an API to watch span's events and define
+callbacks for these events. This API would be a functional option to a
+tracer constructor that passes an Observer. 3rd party packages (who want to
+watch the span events) should actually implement this observer API.
+To do that, first fetch the package using go get :
+
+```
+ go get -v github.com/opentracing-contrib/go-observer
+```
+
+and say :
+
+```go
+ import "github.com/opentracing-contrib/go-observer"
+```
+
+and then, define the required span event callbacks. These registered
+callbacks would then be called on span events if an observer is created.
+Tracer may allow registering multiple observers. Have a look at the [jaeger's observer](https://github.com/uber/jaeger-client-go/blob/master/observer.go).
+
+With the required setup implemented in the backend tracers, packages
+watching the span events need to implement the observer api defining what
+they need to do for the observed span events.
+
+## Span events
+
+An observer registered with this api, can observe for the following four
+span events :
+
+```go
+ StartSpan()
+ SetOperationName()
+ SetTag()
+ Finish()
+```
+
+### Tradeoffs
+
+As noble as our thoughts might be in fetching additional metrics (other than
+latency) for a span using an observer, there are some overhead costs. Not all
+observers need to observe all the span events, in which case, we may have
+to keep some callback functions empty. In effect, we will still call these
+functions, and that will incur unnecessary overhead. To know more about this
+and other tradeoffs, see this [discussion](https://github.com/opentracing/opentracing-go/pull/135#discussion_r105497329).
diff --git a/vendor/github.com/opentracing-contrib/go-observer/observer.go b/vendor/github.com/opentracing-contrib/go-observer/observer.go
new file mode 100644
index 000000000..c8cbf61bd
--- /dev/null
+++ b/vendor/github.com/opentracing-contrib/go-observer/observer.go
@@ -0,0 +1,39 @@
+// This project is licensed under the Apache License 2.0, see LICENSE.
+
+package otobserver
+
+import opentracing "github.com/opentracing/opentracing-go"
+
+// Observer can be registered with a Tracer to recieve notifications
+// about new Spans. Tracers are not required to support the Observer API.
+// The actual registration depends on the implementation, which might look
+// like the below e.g :
+// observer := myobserver.NewObserver()
+// tracer := client.NewTracer(..., client.WithObserver(observer))
+//
+type Observer interface {
+ // Create and return a span observer. Called when a span starts.
+ // If the Observer is not interested in the given span, it must return (nil, false).
+ // E.g :
+ // func StartSpan(opName string, opts ...opentracing.StartSpanOption) {
+ // var sp opentracing.Span
+ // sso := opentracing.StartSpanOptions{}
+ // spanObserver, ok := observer.OnStartSpan(span, opName, sso);
+ // if ok {
+ // // we have a valid SpanObserver
+ // }
+ // ...
+ // }
+ OnStartSpan(sp opentracing.Span, operationName string, options opentracing.StartSpanOptions) (SpanObserver, bool)
+}
+
+// SpanObserver is created by the Observer and receives notifications about
+// other Span events.
+type SpanObserver interface {
+ // Callback called from opentracing.Span.SetOperationName()
+ OnSetOperationName(operationName string)
+ // Callback called from opentracing.Span.SetTag()
+ OnSetTag(key string, value interface{})
+ // Callback called from opentracing.Span.Finish()
+ OnFinish(options opentracing.FinishOptions)
+}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/.travis.yml b/vendor/github.com/openzipkin/zipkin-go-opentracing/.travis.yml
index 9ab365850..8a05cdc0b 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/.travis.yml
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/.travis.yml
@@ -1,8 +1,8 @@
language: go
go:
- - 1.7
- 1.8
+ - 1.9
- tip
install:
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/Makefile b/vendor/github.com/openzipkin/zipkin-go-opentracing/Makefile
index 3ca004223..d0951ed45 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/Makefile
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/Makefile
@@ -12,12 +12,15 @@ bench:
.PHONY: lint
lint:
# Ignore grep's exit code since no match returns 1.
- -golint ./... | grep --invert-match -E '^.*\.pb\.go'
+ -golint ./... | grep --invert-match -E '^.*\.pb\.go|^thrift'
@
- @! (golint ./... |grep --invert-match -E '^.*\.pb\.go' | read dummy)
+ @! (golint ./... | grep --invert-match -E '^.*\.pb\.go|^thrift' | read dummy)
.PHONY: vet
vet:
go vet ./...
+.PHONY: all
+all: vet lint test bench
+
.PHONY: example
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/scribe.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/scribe.go
deleted file mode 100644
index c0de88e43..000000000
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/scribe.go
+++ /dev/null
@@ -1,431 +0,0 @@
-// Autogenerated by Thrift Compiler (0.9.3)
-// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-
-package scribe
-
-import (
- "bytes"
- "fmt"
- "github.com/apache/thrift/lib/go/thrift"
-)
-
-// (needed to ensure safety because of naive import list construction.)
-var _ = thrift.ZERO
-var _ = fmt.Printf
-var _ = bytes.Equal
-
-type Scribe interface {
- // Parameters:
- // - Messages
- Log(messages []*LogEntry) (r ResultCode, err error)
-}
-
-type ScribeClient struct {
- Transport thrift.TTransport
- ProtocolFactory thrift.TProtocolFactory
- InputProtocol thrift.TProtocol
- OutputProtocol thrift.TProtocol
- SeqId int32
-}
-
-func NewScribeClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ScribeClient {
- return &ScribeClient{Transport: t,
- ProtocolFactory: f,
- InputProtocol: f.GetProtocol(t),
- OutputProtocol: f.GetProtocol(t),
- SeqId: 0,
- }
-}
-
-func NewScribeClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ScribeClient {
- return &ScribeClient{Transport: t,
- ProtocolFactory: nil,
- InputProtocol: iprot,
- OutputProtocol: oprot,
- SeqId: 0,
- }
-}
-
-// Parameters:
-// - Messages
-func (p *ScribeClient) Log(messages []*LogEntry) (r ResultCode, err error) {
- if err = p.sendLog(messages); err != nil {
- return
- }
- return p.recvLog()
-}
-
-func (p *ScribeClient) sendLog(messages []*LogEntry) (err error) {
- oprot := p.OutputProtocol
- if oprot == nil {
- oprot = p.ProtocolFactory.GetProtocol(p.Transport)
- p.OutputProtocol = oprot
- }
- p.SeqId++
- if err = oprot.WriteMessageBegin("Log", thrift.CALL, p.SeqId); err != nil {
- return
- }
- args := ScribeLogArgs{
- Messages: messages,
- }
- if err = args.Write(oprot); err != nil {
- return
- }
- if err = oprot.WriteMessageEnd(); err != nil {
- return
- }
- return oprot.Flush()
-}
-
-func (p *ScribeClient) recvLog() (value ResultCode, err error) {
- iprot := p.InputProtocol
- if iprot == nil {
- iprot = p.ProtocolFactory.GetProtocol(p.Transport)
- p.InputProtocol = iprot
- }
- method, mTypeId, seqId, err := iprot.ReadMessageBegin()
- if err != nil {
- return
- }
- if method != "Log" {
- err = thrift.NewTApplicationException(thrift.WRONG_METHOD_NAME, "Log failed: wrong method name")
- return
- }
- if p.SeqId != seqId {
- err = thrift.NewTApplicationException(thrift.BAD_SEQUENCE_ID, "Log failed: out of sequence response")
- return
- }
- if mTypeId == thrift.EXCEPTION {
- error0 := thrift.NewTApplicationException(thrift.UNKNOWN_APPLICATION_EXCEPTION, "Unknown Exception")
- var error1 error
- error1, err = error0.Read(iprot)
- if err != nil {
- return
- }
- if err = iprot.ReadMessageEnd(); err != nil {
- return
- }
- err = error1
- return
- }
- if mTypeId != thrift.REPLY {
- err = thrift.NewTApplicationException(thrift.INVALID_MESSAGE_TYPE_EXCEPTION, "Log failed: invalid message type")
- return
- }
- result := ScribeLogResult{}
- if err = result.Read(iprot); err != nil {
- return
- }
- if err = iprot.ReadMessageEnd(); err != nil {
- return
- }
- value = result.GetSuccess()
- return
-}
-
-type ScribeProcessor struct {
- processorMap map[string]thrift.TProcessorFunction
- handler Scribe
-}
-
-func (p *ScribeProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
- p.processorMap[key] = processor
-}
-
-func (p *ScribeProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
- processor, ok = p.processorMap[key]
- return processor, ok
-}
-
-func (p *ScribeProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
- return p.processorMap
-}
-
-func NewScribeProcessor(handler Scribe) *ScribeProcessor {
-
- self2 := &ScribeProcessor{handler: handler, processorMap: make(map[string]thrift.TProcessorFunction)}
- self2.processorMap["Log"] = &scribeProcessorLog{handler: handler}
- return self2
-}
-
-func (p *ScribeProcessor) Process(iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
- name, _, seqId, err := iprot.ReadMessageBegin()
- if err != nil {
- return false, err
- }
- if processor, ok := p.GetProcessorFunction(name); ok {
- return processor.Process(seqId, iprot, oprot)
- }
- iprot.Skip(thrift.STRUCT)
- iprot.ReadMessageEnd()
- x3 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function "+name)
- oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
- x3.Write(oprot)
- oprot.WriteMessageEnd()
- oprot.Flush()
- return false, x3
-
-}
-
-type scribeProcessorLog struct {
- handler Scribe
-}
-
-func (p *scribeProcessorLog) Process(seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
- args := ScribeLogArgs{}
- if err = args.Read(iprot); err != nil {
- iprot.ReadMessageEnd()
- x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
- oprot.WriteMessageBegin("Log", thrift.EXCEPTION, seqId)
- x.Write(oprot)
- oprot.WriteMessageEnd()
- oprot.Flush()
- return false, err
- }
-
- iprot.ReadMessageEnd()
- result := ScribeLogResult{}
- var retval ResultCode
- var err2 error
- if retval, err2 = p.handler.Log(args.Messages); err2 != nil {
- x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Log: "+err2.Error())
- oprot.WriteMessageBegin("Log", thrift.EXCEPTION, seqId)
- x.Write(oprot)
- oprot.WriteMessageEnd()
- oprot.Flush()
- return true, err2
- } else {
- result.Success = &retval
- }
- if err2 = oprot.WriteMessageBegin("Log", thrift.REPLY, seqId); err2 != nil {
- err = err2
- }
- if err2 = result.Write(oprot); err == nil && err2 != nil {
- err = err2
- }
- if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
- err = err2
- }
- if err2 = oprot.Flush(); err == nil && err2 != nil {
- err = err2
- }
- if err != nil {
- return
- }
- return true, err
-}
-
-// HELPER FUNCTIONS AND STRUCTURES
-
-// Attributes:
-// - Messages
-type ScribeLogArgs struct {
- Messages []*LogEntry `thrift:"messages,1" json:"messages"`
-}
-
-func NewScribeLogArgs() *ScribeLogArgs {
- return &ScribeLogArgs{}
-}
-
-func (p *ScribeLogArgs) GetMessages() []*LogEntry {
- return p.Messages
-}
-func (p *ScribeLogArgs) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *ScribeLogArgs) readField1(iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin()
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]*LogEntry, 0, size)
- p.Messages = tSlice
- for i := 0; i < size; i++ {
- _elem4 := &LogEntry{}
- if err := _elem4.Read(iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem4), err)
- }
- p.Messages = append(p.Messages, _elem4)
- }
- if err := iprot.ReadListEnd(); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *ScribeLogArgs) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("Log_args"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *ScribeLogArgs) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("messages", thrift.LIST, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:messages: ", p), err)
- }
- if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Messages)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Messages {
- if err := v.Write(oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
- }
- }
- if err := oprot.WriteListEnd(); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:messages: ", p), err)
- }
- return err
-}
-
-func (p *ScribeLogArgs) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("ScribeLogArgs(%+v)", *p)
-}
-
-// Attributes:
-// - Success
-type ScribeLogResult struct {
- Success *ResultCode `thrift:"success,0" json:"success,omitempty"`
-}
-
-func NewScribeLogResult() *ScribeLogResult {
- return &ScribeLogResult{}
-}
-
-var ScribeLogResult_Success_DEFAULT ResultCode
-
-func (p *ScribeLogResult) GetSuccess() ResultCode {
- if !p.IsSetSuccess() {
- return ScribeLogResult_Success_DEFAULT
- }
- return *p.Success
-}
-func (p *ScribeLogResult) IsSetSuccess() bool {
- return p.Success != nil
-}
-
-func (p *ScribeLogResult) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 0:
- if err := p.readField0(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *ScribeLogResult) readField0(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(); err != nil {
- return thrift.PrependError("error reading field 0: ", err)
- } else {
- temp := ResultCode(v)
- p.Success = &temp
- }
- return nil
-}
-
-func (p *ScribeLogResult) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("Log_result"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField0(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *ScribeLogResult) writeField0(oprot thrift.TProtocol) (err error) {
- if p.IsSetSuccess() {
- if err := oprot.WriteFieldBegin("success", thrift.I32, 0); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
- }
- if err := oprot.WriteI32(int32(*p.Success)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
- }
- }
- return err
-}
-
-func (p *ScribeLogResult) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("ScribeLogResult(%+v)", *p)
-}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/ttypes.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/ttypes.go
deleted file mode 100644
index 1e8bed6d3..000000000
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/ttypes.go
+++ /dev/null
@@ -1,185 +0,0 @@
-// Autogenerated by Thrift Compiler (0.9.3)
-// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-
-package scribe
-
-import (
- "bytes"
- "fmt"
- "github.com/apache/thrift/lib/go/thrift"
-)
-
-// (needed to ensure safety because of naive import list construction.)
-var _ = thrift.ZERO
-var _ = fmt.Printf
-var _ = bytes.Equal
-
-var GoUnusedProtection__ int
-
-type ResultCode int64
-
-const (
- ResultCode_OK ResultCode = 0
- ResultCode_TRY_LATER ResultCode = 1
-)
-
-func (p ResultCode) String() string {
- switch p {
- case ResultCode_OK:
- return "OK"
- case ResultCode_TRY_LATER:
- return "TRY_LATER"
- }
- return "<UNSET>"
-}
-
-func ResultCodeFromString(s string) (ResultCode, error) {
- switch s {
- case "OK":
- return ResultCode_OK, nil
- case "TRY_LATER":
- return ResultCode_TRY_LATER, nil
- }
- return ResultCode(0), fmt.Errorf("not a valid ResultCode string")
-}
-
-func ResultCodePtr(v ResultCode) *ResultCode { return &v }
-
-func (p ResultCode) MarshalText() ([]byte, error) {
- return []byte(p.String()), nil
-}
-
-func (p *ResultCode) UnmarshalText(text []byte) error {
- q, err := ResultCodeFromString(string(text))
- if err != nil {
- return err
- }
- *p = q
- return nil
-}
-
-// Attributes:
-// - Category
-// - Message
-type LogEntry struct {
- Category string `thrift:"category,1" json:"category"`
- Message string `thrift:"message,2" json:"message"`
-}
-
-func NewLogEntry() *LogEntry {
- return &LogEntry{}
-}
-
-func (p *LogEntry) GetCategory() string {
- return p.Category
-}
-
-func (p *LogEntry) GetMessage() string {
- return p.Message
-}
-func (p *LogEntry) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- case 2:
- if err := p.readField2(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *LogEntry) readField1(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
- } else {
- p.Category = v
- }
- return nil
-}
-
-func (p *LogEntry) readField2(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
- } else {
- p.Message = v
- }
- return nil
-}
-
-func (p *LogEntry) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("LogEntry"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := p.writeField2(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *LogEntry) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("category", thrift.STRING, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:category: ", p), err)
- }
- if err := oprot.WriteString(string(p.Category)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.category (1) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:category: ", p), err)
- }
- return err
-}
-
-func (p *LogEntry) writeField2(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("message", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:message: ", p), err)
- }
- if err := oprot.WriteString(string(p.Message)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.message (2) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:message: ", p), err)
- }
- return err
-}
-
-func (p *LogEntry) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("LogEntry(%+v)", *p)
-}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/ttypes.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/ttypes.go
deleted file mode 100644
index 2852d368c..000000000
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/ttypes.go
+++ /dev/null
@@ -1,1272 +0,0 @@
-// Autogenerated by Thrift Compiler (0.9.3)
-// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
-
-package zipkincore
-
-import (
- "bytes"
- "fmt"
- "github.com/apache/thrift/lib/go/thrift"
-)
-
-// (needed to ensure safety because of naive import list construction.)
-var _ = thrift.ZERO
-var _ = fmt.Printf
-var _ = bytes.Equal
-
-var GoUnusedProtection__ int
-
-//A subset of thrift base types, except BYTES.
-type AnnotationType int64
-
-const (
- AnnotationType_BOOL AnnotationType = 0
- AnnotationType_BYTES AnnotationType = 1
- AnnotationType_I16 AnnotationType = 2
- AnnotationType_I32 AnnotationType = 3
- AnnotationType_I64 AnnotationType = 4
- AnnotationType_DOUBLE AnnotationType = 5
- AnnotationType_STRING AnnotationType = 6
-)
-
-func (p AnnotationType) String() string {
- switch p {
- case AnnotationType_BOOL:
- return "BOOL"
- case AnnotationType_BYTES:
- return "BYTES"
- case AnnotationType_I16:
- return "I16"
- case AnnotationType_I32:
- return "I32"
- case AnnotationType_I64:
- return "I64"
- case AnnotationType_DOUBLE:
- return "DOUBLE"
- case AnnotationType_STRING:
- return "STRING"
- }
- return "<UNSET>"
-}
-
-func AnnotationTypeFromString(s string) (AnnotationType, error) {
- switch s {
- case "BOOL":
- return AnnotationType_BOOL, nil
- case "BYTES":
- return AnnotationType_BYTES, nil
- case "I16":
- return AnnotationType_I16, nil
- case "I32":
- return AnnotationType_I32, nil
- case "I64":
- return AnnotationType_I64, nil
- case "DOUBLE":
- return AnnotationType_DOUBLE, nil
- case "STRING":
- return AnnotationType_STRING, nil
- }
- return AnnotationType(0), fmt.Errorf("not a valid AnnotationType string")
-}
-
-func AnnotationTypePtr(v AnnotationType) *AnnotationType { return &v }
-
-func (p AnnotationType) MarshalText() ([]byte, error) {
- return []byte(p.String()), nil
-}
-
-func (p *AnnotationType) UnmarshalText(text []byte) error {
- q, err := AnnotationTypeFromString(string(text))
- if err != nil {
- return err
- }
- *p = q
- return nil
-}
-
-// Indicates the network context of a service recording an annotation with two
-// exceptions.
-//
-// When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR,
-// the endpoint indicates the source or destination of an RPC. This exception
-// allows zipkin to display network context of uninstrumented services, or
-// clients such as web browsers.
-//
-// Attributes:
-// - Ipv4: IPv4 host address packed into 4 bytes.
-//
-// Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
-// - Port: IPv4 port or 0, if unknown.
-//
-// Note: this is to be treated as an unsigned integer, so watch for negatives.
-// - ServiceName: Classifier of a source or destination in lowercase, such as "zipkin-web".
-//
-// This is the primary parameter for trace lookup, so should be intuitive as
-// possible, for example, matching names in service discovery.
-//
-// Conventionally, when the service name isn't known, service_name = "unknown".
-// However, it is also permissible to set service_name = "" (empty string).
-// The difference in the latter usage is that the span will not be queryable
-// by service name unless more information is added to the span with non-empty
-// service name, e.g. an additional annotation from the server.
-//
-// Particularly clients may not have a reliable service name at ingest. One
-// approach is to set service_name to "" at ingest, and later assign a
-// better label based on binary annotations, such as user agent.
-// - Ipv6: IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes()
-type Endpoint struct {
- Ipv4 int32 `thrift:"ipv4,1" json:"ipv4"`
- Port int16 `thrift:"port,2" json:"port"`
- ServiceName string `thrift:"service_name,3" json:"service_name"`
- Ipv6 []byte `thrift:"ipv6,4" json:"ipv6,omitempty"`
-}
-
-func NewEndpoint() *Endpoint {
- return &Endpoint{}
-}
-
-func (p *Endpoint) GetIpv4() int32 {
- return p.Ipv4
-}
-
-func (p *Endpoint) GetPort() int16 {
- return p.Port
-}
-
-func (p *Endpoint) GetServiceName() string {
- return p.ServiceName
-}
-
-var Endpoint_Ipv6_DEFAULT []byte
-
-func (p *Endpoint) GetIpv6() []byte {
- return p.Ipv6
-}
-func (p *Endpoint) IsSetIpv6() bool {
- return p.Ipv6 != nil
-}
-
-func (p *Endpoint) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- case 2:
- if err := p.readField2(iprot); err != nil {
- return err
- }
- case 3:
- if err := p.readField3(iprot); err != nil {
- return err
- }
- case 4:
- if err := p.readField4(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *Endpoint) readField1(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
- } else {
- p.Ipv4 = v
- }
- return nil
-}
-
-func (p *Endpoint) readField2(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI16(); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
- } else {
- p.Port = v
- }
- return nil
-}
-
-func (p *Endpoint) readField3(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
- } else {
- p.ServiceName = v
- }
- return nil
-}
-
-func (p *Endpoint) readField4(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBinary(); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
- } else {
- p.Ipv6 = v
- }
- return nil
-}
-
-func (p *Endpoint) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("Endpoint"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := p.writeField2(oprot); err != nil {
- return err
- }
- if err := p.writeField3(oprot); err != nil {
- return err
- }
- if err := p.writeField4(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *Endpoint) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("ipv4", thrift.I32, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ipv4: ", p), err)
- }
- if err := oprot.WriteI32(int32(p.Ipv4)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.ipv4 (1) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ipv4: ", p), err)
- }
- return err
-}
-
-func (p *Endpoint) writeField2(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("port", thrift.I16, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err)
- }
- if err := oprot.WriteI16(int16(p.Port)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err)
- }
- return err
-}
-
-func (p *Endpoint) writeField3(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("service_name", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:service_name: ", p), err)
- }
- if err := oprot.WriteString(string(p.ServiceName)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.service_name (3) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:service_name: ", p), err)
- }
- return err
-}
-
-func (p *Endpoint) writeField4(oprot thrift.TProtocol) (err error) {
- if p.IsSetIpv6() {
- if err := oprot.WriteFieldBegin("ipv6", thrift.STRING, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:ipv6: ", p), err)
- }
- if err := oprot.WriteBinary(p.Ipv6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.ipv6 (4) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:ipv6: ", p), err)
- }
- }
- return err
-}
-
-func (p *Endpoint) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("Endpoint(%+v)", *p)
-}
-
-// Associates an event that explains latency with a timestamp.
-//
-// Unlike log statements, annotations are often codes: for example "sr".
-//
-// Attributes:
-// - Timestamp: Microseconds from epoch.
-//
-// This value should use the most precise value possible. For example,
-// gettimeofday or syncing nanoTime against a tick of currentTimeMillis.
-// - Value: Usually a short tag indicating an event, like "sr" or "finagle.retry".
-// - Host: The host that recorded the value, primarily for query by service name.
-type Annotation struct {
- Timestamp int64 `thrift:"timestamp,1" json:"timestamp"`
- Value string `thrift:"value,2" json:"value"`
- Host *Endpoint `thrift:"host,3" json:"host,omitempty"`
-}
-
-func NewAnnotation() *Annotation {
- return &Annotation{}
-}
-
-func (p *Annotation) GetTimestamp() int64 {
- return p.Timestamp
-}
-
-func (p *Annotation) GetValue() string {
- return p.Value
-}
-
-var Annotation_Host_DEFAULT *Endpoint
-
-func (p *Annotation) GetHost() *Endpoint {
- if !p.IsSetHost() {
- return Annotation_Host_DEFAULT
- }
- return p.Host
-}
-func (p *Annotation) IsSetHost() bool {
- return p.Host != nil
-}
-
-func (p *Annotation) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- case 2:
- if err := p.readField2(iprot); err != nil {
- return err
- }
- case 3:
- if err := p.readField3(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *Annotation) readField1(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
- } else {
- p.Timestamp = v
- }
- return nil
-}
-
-func (p *Annotation) readField2(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
- } else {
- p.Value = v
- }
- return nil
-}
-
-func (p *Annotation) readField3(iprot thrift.TProtocol) error {
- p.Host = &Endpoint{}
- if err := p.Host.Read(iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Host), err)
- }
- return nil
-}
-
-func (p *Annotation) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("Annotation"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := p.writeField2(oprot); err != nil {
- return err
- }
- if err := p.writeField3(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *Annotation) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err)
- }
- if err := oprot.WriteI64(int64(p.Timestamp)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err)
- }
- return err
-}
-
-func (p *Annotation) writeField2(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err)
- }
- if err := oprot.WriteString(string(p.Value)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err)
- }
- return err
-}
-
-func (p *Annotation) writeField3(oprot thrift.TProtocol) (err error) {
- if p.IsSetHost() {
- if err := oprot.WriteFieldBegin("host", thrift.STRUCT, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:host: ", p), err)
- }
- if err := p.Host.Write(oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Host), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:host: ", p), err)
- }
- }
- return err
-}
-
-func (p *Annotation) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("Annotation(%+v)", *p)
-}
-
-// Binary annotations are tags applied to a Span to give it context. For
-// example, a binary annotation of HTTP_PATH ("http.path") could the path
-// to a resource in a RPC call.
-//
-// Binary annotations of type STRING are always queryable, though more a
-// historical implementation detail than a structural concern.
-//
-// Binary annotations can repeat, and vary on the host. Similar to Annotation,
-// the host indicates who logged the event. This allows you to tell the
-// difference between the client and server side of the same key. For example,
-// the key "http.path" might be different on the client and server side due to
-// rewriting, like "/api/v1/myresource" vs "/myresource. Via the host field,
-// you can see the different points of view, which often help in debugging.
-//
-// Attributes:
-// - Key: Name used to lookup spans, such as "http.path" or "finagle.version".
-// - Value: Serialized thrift bytes, in TBinaryProtocol format.
-//
-// For legacy reasons, byte order is big-endian. See THRIFT-3217.
-// - AnnotationType: The thrift type of value, most often STRING.
-//
-// annotation_type shouldn't vary for the same key.
-// - Host: The host that recorded value, allowing query by service name or address.
-//
-// There are two exceptions: when key is "ca" or "sa", this is the source or
-// destination of an RPC. This exception allows zipkin to display network
-// context of uninstrumented services, such as browsers or databases.
-type BinaryAnnotation struct {
- Key string `thrift:"key,1" json:"key"`
- Value []byte `thrift:"value,2" json:"value"`
- AnnotationType AnnotationType `thrift:"annotation_type,3" json:"annotation_type"`
- Host *Endpoint `thrift:"host,4" json:"host,omitempty"`
-}
-
-func NewBinaryAnnotation() *BinaryAnnotation {
- return &BinaryAnnotation{}
-}
-
-func (p *BinaryAnnotation) GetKey() string {
- return p.Key
-}
-
-func (p *BinaryAnnotation) GetValue() []byte {
- return p.Value
-}
-
-func (p *BinaryAnnotation) GetAnnotationType() AnnotationType {
- return p.AnnotationType
-}
-
-var BinaryAnnotation_Host_DEFAULT *Endpoint
-
-func (p *BinaryAnnotation) GetHost() *Endpoint {
- if !p.IsSetHost() {
- return BinaryAnnotation_Host_DEFAULT
- }
- return p.Host
-}
-func (p *BinaryAnnotation) IsSetHost() bool {
- return p.Host != nil
-}
-
-func (p *BinaryAnnotation) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- case 2:
- if err := p.readField2(iprot); err != nil {
- return err
- }
- case 3:
- if err := p.readField3(iprot); err != nil {
- return err
- }
- case 4:
- if err := p.readField4(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *BinaryAnnotation) readField1(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
- } else {
- p.Key = v
- }
- return nil
-}
-
-func (p *BinaryAnnotation) readField2(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBinary(); err != nil {
- return thrift.PrependError("error reading field 2: ", err)
- } else {
- p.Value = v
- }
- return nil
-}
-
-func (p *BinaryAnnotation) readField3(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI32(); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
- } else {
- temp := AnnotationType(v)
- p.AnnotationType = temp
- }
- return nil
-}
-
-func (p *BinaryAnnotation) readField4(iprot thrift.TProtocol) error {
- p.Host = &Endpoint{}
- if err := p.Host.Read(iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Host), err)
- }
- return nil
-}
-
-func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("BinaryAnnotation"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := p.writeField2(oprot); err != nil {
- return err
- }
- if err := p.writeField3(oprot); err != nil {
- return err
- }
- if err := p.writeField4(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *BinaryAnnotation) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err)
- }
- if err := oprot.WriteString(string(p.Key)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err)
- }
- return err
-}
-
-func (p *BinaryAnnotation) writeField2(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err)
- }
- if err := oprot.WriteBinary(p.Value); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err)
- }
- return err
-}
-
-func (p *BinaryAnnotation) writeField3(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("annotation_type", thrift.I32, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:annotation_type: ", p), err)
- }
- if err := oprot.WriteI32(int32(p.AnnotationType)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.annotation_type (3) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:annotation_type: ", p), err)
- }
- return err
-}
-
-func (p *BinaryAnnotation) writeField4(oprot thrift.TProtocol) (err error) {
- if p.IsSetHost() {
- if err := oprot.WriteFieldBegin("host", thrift.STRUCT, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:host: ", p), err)
- }
- if err := p.Host.Write(oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Host), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:host: ", p), err)
- }
- }
- return err
-}
-
-func (p *BinaryAnnotation) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("BinaryAnnotation(%+v)", *p)
-}
-
-// A trace is a series of spans (often RPC calls) which form a latency tree.
-//
-// Spans are usually created by instrumentation in RPC clients or servers, but
-// can also represent in-process activity. Annotations in spans are similar to
-// log statements, and are sometimes created directly by application developers
-// to indicate events of interest, such as a cache miss.
-//
-// The root span is where parent_id = Nil; it usually has the longest duration
-// in the trace.
-//
-// Span identifiers are packed into i64s, but should be treated opaquely.
-// String encoding is fixed-width lower-hex, to avoid signed interpretation.
-//
-// Attributes:
-// - TraceID: Unique 8-byte identifier for a trace, set on all spans within it.
-// - Name: Span name in lowercase, rpc method for example. Conventionally, when the
-// span name isn't known, name = "unknown".
-// - ID: Unique 8-byte identifier of this span within a trace. A span is uniquely
-// identified in storage by (trace_id, id).
-// - ParentID: The parent's Span.id; absent if this the root span in a trace.
-// - Annotations: Associates events that explain latency with a timestamp. Unlike log
-// statements, annotations are often codes: for example SERVER_RECV("sr").
-// Annotations are sorted ascending by timestamp.
-// - BinaryAnnotations: Tags a span with context, usually to support query or aggregation. For
-// example, a binary annotation key could be "http.path".
-// - Debug: True is a request to store this span even if it overrides sampling policy.
-// - Timestamp: Epoch microseconds of the start of this span, absent if this an incomplete
-// span.
-//
-// This value should be set directly by instrumentation, using the most
-// precise value possible. For example, gettimeofday or syncing nanoTime
-// against a tick of currentTimeMillis.
-//
-// For compatibilty with instrumentation that precede this field, collectors
-// or span stores can derive this via Annotation.timestamp.
-// For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
-//
-// Timestamp is nullable for input only. Spans without a timestamp cannot be
-// presented in a timeline: Span stores should not output spans missing a
-// timestamp.
-//
-// There are two known edge-cases where this could be absent: both cases
-// exist when a collector receives a span in parts and a binary annotation
-// precedes a timestamp. This is possible when..
-// - The span is in-flight (ex not yet received a timestamp)
-// - The span's start event was lost
-// - Duration: Measurement in microseconds of the critical path, if known. Durations of
-// less than one microsecond must be rounded up to 1 microsecond.
-//
-// This value should be set directly, as opposed to implicitly via annotation
-// timestamps. Doing so encourages precision decoupled from problems of
-// clocks, such as skew or NTP updates causing time to move backwards.
-//
-// For compatibility with instrumentation that precede this field, collectors
-// or span stores can derive this by subtracting Annotation.timestamp.
-// For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
-//
-// If this field is persisted as unset, zipkin will continue to work, except
-// duration query support will be implementation-specific. Similarly, setting
-// this field non-atomically is implementation-specific.
-//
-// This field is i64 vs i32 to support spans longer than 35 minutes.
-// - TraceIDHigh: Optional unique 8-byte additional identifier for a trace. If non zero, this
-// means the trace uses 128 bit traceIds instead of 64 bit.
-type Span struct {
- TraceID int64 `thrift:"trace_id,1" json:"trace_id"`
- // unused field # 2
- Name string `thrift:"name,3" json:"name"`
- ID int64 `thrift:"id,4" json:"id"`
- ParentID *int64 `thrift:"parent_id,5" json:"parent_id,omitempty"`
- Annotations []*Annotation `thrift:"annotations,6" json:"annotations"`
- // unused field # 7
- BinaryAnnotations []*BinaryAnnotation `thrift:"binary_annotations,8" json:"binary_annotations"`
- Debug bool `thrift:"debug,9" json:"debug,omitempty"`
- Timestamp *int64 `thrift:"timestamp,10" json:"timestamp,omitempty"`
- Duration *int64 `thrift:"duration,11" json:"duration,omitempty"`
- TraceIDHigh *int64 `thrift:"trace_id_high,12" json:"trace_id_high,omitempty"`
-}
-
-func NewSpan() *Span {
- return &Span{}
-}
-
-func (p *Span) GetTraceID() int64 {
- return p.TraceID
-}
-
-func (p *Span) GetName() string {
- return p.Name
-}
-
-func (p *Span) GetID() int64 {
- return p.ID
-}
-
-var Span_ParentID_DEFAULT int64
-
-func (p *Span) GetParentID() int64 {
- if !p.IsSetParentID() {
- return Span_ParentID_DEFAULT
- }
- return *p.ParentID
-}
-
-func (p *Span) GetAnnotations() []*Annotation {
- return p.Annotations
-}
-
-func (p *Span) GetBinaryAnnotations() []*BinaryAnnotation {
- return p.BinaryAnnotations
-}
-
-var Span_Debug_DEFAULT bool = false
-
-func (p *Span) GetDebug() bool {
- return p.Debug
-}
-
-var Span_Timestamp_DEFAULT int64
-
-func (p *Span) GetTimestamp() int64 {
- if !p.IsSetTimestamp() {
- return Span_Timestamp_DEFAULT
- }
- return *p.Timestamp
-}
-
-var Span_Duration_DEFAULT int64
-
-func (p *Span) GetDuration() int64 {
- if !p.IsSetDuration() {
- return Span_Duration_DEFAULT
- }
- return *p.Duration
-}
-
-var Span_TraceIDHigh_DEFAULT int64
-
-func (p *Span) GetTraceIDHigh() int64 {
- if !p.IsSetTraceIDHigh() {
- return Span_TraceIDHigh_DEFAULT
- }
- return *p.TraceIDHigh
-}
-func (p *Span) IsSetParentID() bool {
- return p.ParentID != nil
-}
-
-func (p *Span) IsSetDebug() bool {
- return p.Debug != Span_Debug_DEFAULT
-}
-
-func (p *Span) IsSetTimestamp() bool {
- return p.Timestamp != nil
-}
-
-func (p *Span) IsSetDuration() bool {
- return p.Duration != nil
-}
-
-func (p *Span) IsSetTraceIDHigh() bool {
- return p.TraceIDHigh != nil
-}
-
-func (p *Span) Read(iprot thrift.TProtocol) error {
- if _, err := iprot.ReadStructBegin(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
- }
-
- for {
- _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
- if err != nil {
- return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
- }
- if fieldTypeId == thrift.STOP {
- break
- }
- switch fieldId {
- case 1:
- if err := p.readField1(iprot); err != nil {
- return err
- }
- case 3:
- if err := p.readField3(iprot); err != nil {
- return err
- }
- case 4:
- if err := p.readField4(iprot); err != nil {
- return err
- }
- case 5:
- if err := p.readField5(iprot); err != nil {
- return err
- }
- case 6:
- if err := p.readField6(iprot); err != nil {
- return err
- }
- case 8:
- if err := p.readField8(iprot); err != nil {
- return err
- }
- case 9:
- if err := p.readField9(iprot); err != nil {
- return err
- }
- case 10:
- if err := p.readField10(iprot); err != nil {
- return err
- }
- case 11:
- if err := p.readField11(iprot); err != nil {
- return err
- }
- case 12:
- if err := p.readField12(iprot); err != nil {
- return err
- }
- default:
- if err := iprot.Skip(fieldTypeId); err != nil {
- return err
- }
- }
- if err := iprot.ReadFieldEnd(); err != nil {
- return err
- }
- }
- if err := iprot.ReadStructEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
- }
- return nil
-}
-
-func (p *Span) readField1(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 1: ", err)
- } else {
- p.TraceID = v
- }
- return nil
-}
-
-func (p *Span) readField3(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadString(); err != nil {
- return thrift.PrependError("error reading field 3: ", err)
- } else {
- p.Name = v
- }
- return nil
-}
-
-func (p *Span) readField4(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 4: ", err)
- } else {
- p.ID = v
- }
- return nil
-}
-
-func (p *Span) readField5(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 5: ", err)
- } else {
- p.ParentID = &v
- }
- return nil
-}
-
-func (p *Span) readField6(iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin()
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]*Annotation, 0, size)
- p.Annotations = tSlice
- for i := 0; i < size; i++ {
- _elem0 := &Annotation{}
- if err := _elem0.Read(iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err)
- }
- p.Annotations = append(p.Annotations, _elem0)
- }
- if err := iprot.ReadListEnd(); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *Span) readField8(iprot thrift.TProtocol) error {
- _, size, err := iprot.ReadListBegin()
- if err != nil {
- return thrift.PrependError("error reading list begin: ", err)
- }
- tSlice := make([]*BinaryAnnotation, 0, size)
- p.BinaryAnnotations = tSlice
- for i := 0; i < size; i++ {
- _elem1 := &BinaryAnnotation{}
- if err := _elem1.Read(iprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err)
- }
- p.BinaryAnnotations = append(p.BinaryAnnotations, _elem1)
- }
- if err := iprot.ReadListEnd(); err != nil {
- return thrift.PrependError("error reading list end: ", err)
- }
- return nil
-}
-
-func (p *Span) readField9(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadBool(); err != nil {
- return thrift.PrependError("error reading field 9: ", err)
- } else {
- p.Debug = v
- }
- return nil
-}
-
-func (p *Span) readField10(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 10: ", err)
- } else {
- p.Timestamp = &v
- }
- return nil
-}
-
-func (p *Span) readField11(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 11: ", err)
- } else {
- p.Duration = &v
- }
- return nil
-}
-
-func (p *Span) readField12(iprot thrift.TProtocol) error {
- if v, err := iprot.ReadI64(); err != nil {
- return thrift.PrependError("error reading field 12: ", err)
- } else {
- p.TraceIDHigh = &v
- }
- return nil
-}
-
-func (p *Span) Write(oprot thrift.TProtocol) error {
- if err := oprot.WriteStructBegin("Span"); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
- }
- if err := p.writeField1(oprot); err != nil {
- return err
- }
- if err := p.writeField3(oprot); err != nil {
- return err
- }
- if err := p.writeField4(oprot); err != nil {
- return err
- }
- if err := p.writeField5(oprot); err != nil {
- return err
- }
- if err := p.writeField6(oprot); err != nil {
- return err
- }
- if err := p.writeField8(oprot); err != nil {
- return err
- }
- if err := p.writeField9(oprot); err != nil {
- return err
- }
- if err := p.writeField10(oprot); err != nil {
- return err
- }
- if err := p.writeField11(oprot); err != nil {
- return err
- }
- if err := p.writeField12(oprot); err != nil {
- return err
- }
- if err := oprot.WriteFieldStop(); err != nil {
- return thrift.PrependError("write field stop error: ", err)
- }
- if err := oprot.WriteStructEnd(); err != nil {
- return thrift.PrependError("write struct stop error: ", err)
- }
- return nil
-}
-
-func (p *Span) writeField1(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("trace_id", thrift.I64, 1); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:trace_id: ", p), err)
- }
- if err := oprot.WriteI64(int64(p.TraceID)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.trace_id (1) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 1:trace_id: ", p), err)
- }
- return err
-}
-
-func (p *Span) writeField3(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err)
- }
- if err := oprot.WriteString(string(p.Name)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err)
- }
- return err
-}
-
-func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("id", thrift.I64, 4); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err)
- }
- if err := oprot.WriteI64(int64(p.ID)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.id (4) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err)
- }
- return err
-}
-
-func (p *Span) writeField5(oprot thrift.TProtocol) (err error) {
- if p.IsSetParentID() {
- if err := oprot.WriteFieldBegin("parent_id", thrift.I64, 5); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:parent_id: ", p), err)
- }
- if err := oprot.WriteI64(int64(*p.ParentID)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.parent_id (5) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 5:parent_id: ", p), err)
- }
- }
- return err
-}
-
-func (p *Span) writeField6(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("annotations", thrift.LIST, 6); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:annotations: ", p), err)
- }
- if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Annotations)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.Annotations {
- if err := v.Write(oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
- }
- }
- if err := oprot.WriteListEnd(); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 6:annotations: ", p), err)
- }
- return err
-}
-
-func (p *Span) writeField8(oprot thrift.TProtocol) (err error) {
- if err := oprot.WriteFieldBegin("binary_annotations", thrift.LIST, 8); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:binary_annotations: ", p), err)
- }
- if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BinaryAnnotations)); err != nil {
- return thrift.PrependError("error writing list begin: ", err)
- }
- for _, v := range p.BinaryAnnotations {
- if err := v.Write(oprot); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
- }
- }
- if err := oprot.WriteListEnd(); err != nil {
- return thrift.PrependError("error writing list end: ", err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 8:binary_annotations: ", p), err)
- }
- return err
-}
-
-func (p *Span) writeField9(oprot thrift.TProtocol) (err error) {
- if p.IsSetDebug() {
- if err := oprot.WriteFieldBegin("debug", thrift.BOOL, 9); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:debug: ", p), err)
- }
- if err := oprot.WriteBool(bool(p.Debug)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.debug (9) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 9:debug: ", p), err)
- }
- }
- return err
-}
-
-func (p *Span) writeField10(oprot thrift.TProtocol) (err error) {
- if p.IsSetTimestamp() {
- if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 10); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timestamp: ", p), err)
- }
- if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.timestamp (10) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timestamp: ", p), err)
- }
- }
- return err
-}
-
-func (p *Span) writeField11(oprot thrift.TProtocol) (err error) {
- if p.IsSetDuration() {
- if err := oprot.WriteFieldBegin("duration", thrift.I64, 11); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:duration: ", p), err)
- }
- if err := oprot.WriteI64(int64(*p.Duration)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.duration (11) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 11:duration: ", p), err)
- }
- }
- return err
-}
-
-func (p *Span) writeField12(oprot thrift.TProtocol) (err error) {
- if p.IsSetTraceIDHigh() {
- if err := oprot.WriteFieldBegin("trace_id_high", thrift.I64, 12); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:trace_id_high: ", p), err)
- }
- if err := oprot.WriteI64(int64(*p.TraceIDHigh)); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T.trace_id_high (12) field write error: ", p), err)
- }
- if err := oprot.WriteFieldEnd(); err != nil {
- return thrift.PrependError(fmt.Sprintf("%T write field end error 12:trace_id_high: ", p), err)
- }
- }
- return err
-}
-
-func (p *Span) String() string {
- if p == nil {
- return "<nil>"
- }
- return fmt.Sprintf("Span(%+v)", *p)
-}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/circle.yml b/vendor/github.com/openzipkin/zipkin-go-opentracing/circle.yml
new file mode 100644
index 000000000..30d5ef4b6
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/circle.yml
@@ -0,0 +1,10 @@
+dependencies:
+ override:
+ - sudo rm -rf /home/ubuntu/.go_workspace/src/github.com/openzipkin
+ - mkdir -p /home/ubuntu/.go_workspace/src/github.com/openzipkin
+ - mv /home/ubuntu/zipkin-go-opentracing /home/ubuntu/.go_workspace/src/github.com/openzipkin
+ - ln -s /home/ubuntu/.go_workspace/src/github.com/openzipkin/zipkin-go-opentracing /home/ubuntu/zipkin-go-opentracing
+ - go get -u -t -v github.com/openzipkin/zipkin-go-opentracing/...
+test:
+ override:
+ - make test bench
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http.go
index 59b5fa928..6fb7b8c7a 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http.go
@@ -8,7 +8,7 @@ import (
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
// Default timeout for http request in seconds
@@ -180,7 +180,7 @@ func (c *HTTPCollector) append(span *zipkincore.Span) (newBatchSize int) {
c.batch = append(c.batch, span)
if len(c.batch) > c.maxBacklog {
dispose := len(c.batch) - c.maxBacklog
- c.logger.Log("Backlog too long, disposing spans.", "count", dispose)
+ c.logger.Log("msg", "backlog too long, disposing spans.", "count", dispose)
c.batch = c.batch[dispose:]
}
newBatchSize = len(c.batch)
@@ -214,10 +214,16 @@ func (c *HTTPCollector) send() error {
if c.reqCallback != nil {
c.reqCallback(req)
}
- if _, err = c.client.Do(req); err != nil {
+ resp, err := c.client.Do(req)
+ if err != nil {
c.logger.Log("err", err.Error())
return err
}
+ resp.Body.Close()
+ // non 2xx code
+ if resp.StatusCode < 200 || resp.StatusCode >= 300 {
+ c.logger.Log("err", "HTTP POST span failed", "code", resp.Status)
+ }
// Remove sent spans from the batch
c.batchMutex.Lock()
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http_test.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http_test.go
index 662de00c2..d3d2cfae1 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http_test.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-http_test.go
@@ -11,7 +11,7 @@ import (
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
const (
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka.go
index daeb4a3dc..eb18c3f36 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka.go
@@ -4,7 +4,7 @@ import (
"github.com/Shopify/sarama"
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
// defaultKafkaTopic sets the standard Kafka topic our Collector will publish
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka_test.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka_test.go
index c7754b060..8ce4ec875 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka_test.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-kafka_test.go
@@ -8,7 +8,7 @@ import (
"github.com/Shopify/sarama"
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
type stubProducer struct {
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe.go
index 3c912ae34..1ff353aa0 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe.go
@@ -1,6 +1,7 @@
package zipkintracer
import (
+ "context"
"encoding/base64"
"fmt"
"net"
@@ -9,8 +10,8 @@ import (
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
const defaultScribeCategory = "zipkin"
@@ -198,7 +199,7 @@ func (c *ScribeCollector) send() error {
return err
}
}
- if rc, err := c.client.Log(sendBatch); err != nil {
+ if rc, err := c.client.Log(context.Background(), sendBatch); err != nil {
c.client = nil
_ = c.logger.Log("err", fmt.Sprintf("during Log: %v", err))
return err
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe_test.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe_test.go
index aa2b03f52..d38e0ddb2 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe_test.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector-scribe_test.go
@@ -1,6 +1,7 @@
package zipkintracer
import (
+ "context"
"encoding/base64"
"fmt"
"math/rand"
@@ -11,8 +12,8 @@ import (
"github.com/apache/thrift/lib/go/thrift"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
func TestScribeCollector(t *testing.T) {
@@ -143,7 +144,7 @@ func newScribeHandler(t *testing.T) *scribeHandler {
return &scribeHandler{t: t}
}
-func (h *scribeHandler) Log(messages []*scribe.LogEntry) (scribe.ResultCode, error) {
+func (h *scribeHandler) Log(ctx context.Context, messages []*scribe.LogEntry) (scribe.ResultCode, error) {
h.Lock()
defer h.Unlock()
for _, m := range messages {
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector.go
index 30979694b..f8cfb58e3 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector.go
@@ -3,7 +3,7 @@ package zipkintracer
import (
"strings"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
// Collector represents a Zipkin trace collector, which is probably a set of
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector_test.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector_test.go
index e611f172f..e0d155489 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/collector_test.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/collector_test.go
@@ -5,7 +5,7 @@ import (
"testing"
"time"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
var s = makeNewSpan("203.0.113.10:1234", "service1", "avg", 123, 456, 0, true)
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/logger.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/logger.go
index c6f223a97..643f65358 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/logger.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/logger.go
@@ -11,8 +11,9 @@ import (
// not even in number
var ErrMissingValue = errors.New("(MISSING)")
-// Logger interface used by this package.
-// This means that we accept Go kit Log compatible loggers
+// Logger is the fundamental interface for all log operations. Log creates a
+// log event from keyvals, a variadic sequence of alternating keys and values.
+// The signature is compatible with the Go kit log package.
type Logger interface {
Log(keyvals ...interface{}) error
}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/observer.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/observer.go
new file mode 100644
index 000000000..f46ff011a
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/observer.go
@@ -0,0 +1,52 @@
+package zipkintracer
+
+import (
+ otobserver "github.com/opentracing-contrib/go-observer"
+ opentracing "github.com/opentracing/opentracing-go"
+)
+
+// observer is a dispatcher to other observers
+type observer struct {
+ observers []otobserver.Observer
+}
+
+// spanObserver is a dispatcher to other span observers
+type spanObserver struct {
+ observers []otobserver.SpanObserver
+}
+
+func (o observer) OnStartSpan(sp opentracing.Span, operationName string, options opentracing.StartSpanOptions) (otobserver.SpanObserver, bool) {
+ var spanObservers []otobserver.SpanObserver
+ for _, obs := range o.observers {
+ spanObs, ok := obs.OnStartSpan(sp, operationName, options)
+ if ok {
+ if spanObservers == nil {
+ spanObservers = make([]otobserver.SpanObserver, 0, len(o.observers))
+ }
+ spanObservers = append(spanObservers, spanObs)
+ }
+ }
+ if len(spanObservers) == 0 {
+ return nil, false
+ }
+
+ return spanObserver{observers: spanObservers}, true
+}
+
+func (o spanObserver) OnSetOperationName(operationName string) {
+ for _, obs := range o.observers {
+ obs.OnSetOperationName(operationName)
+ }
+}
+
+func (o spanObserver) OnSetTag(key string, value interface{}) {
+ for _, obs := range o.observers {
+ obs.OnSetTag(key, value)
+ }
+}
+
+func (o spanObserver) OnFinish(options opentracing.FinishOptions) {
+ for _, obs := range o.observers {
+ obs.OnFinish(options)
+ }
+}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/sample_test.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/sample_test.go
index 3cd07b6ef..ec6dd8dbc 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/sample_test.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/sample_test.go
@@ -13,21 +13,21 @@ func TestBoundarySampler(t *testing.T) {
rate float64
}
for input, want := range map[triple]bool{
- triple{123, 456, 1.0}: true,
- triple{123, 456, 999}: true,
- triple{123, 456, 0.0}: false,
- triple{123, 456, -42}: false,
- triple{1229998, 0, 0.01}: false,
- triple{1229999, 0, 0.01}: false,
- triple{1230000, 0, 0.01}: true,
- triple{1230001, 0, 0.01}: true,
- triple{1230098, 0, 0.01}: true,
- triple{1230099, 0, 0.01}: true,
- triple{1230100, 0, 0.01}: false,
- triple{1230101, 0, 0.01}: false,
- triple{1, 9999999, 0.01}: false,
- triple{999, 0, 0.99}: true,
- triple{9999, 0, 0.99}: false,
+ {123, 456, 1.0}: true,
+ {123, 456, 999}: true,
+ {123, 456, 0.0}: false,
+ {123, 456, -42}: false,
+ {1229998, 0, 0.01}: false,
+ {1229999, 0, 0.01}: false,
+ {1230000, 0, 0.01}: true,
+ {1230001, 0, 0.01}: true,
+ {1230098, 0, 0.01}: true,
+ {1230099, 0, 0.01}: true,
+ {1230100, 0, 0.01}: false,
+ {1230101, 0, 0.01}: false,
+ {1, 9999999, 0.01}: false,
+ {999, 0, 0.99}: true,
+ {9999, 0, 0.99}: false,
} {
sampler := zipkin.NewBoundarySampler(input.rate, input.salt)
if have := sampler(input.id); want != have {
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/span.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/span.go
index 7fa78a9d6..4850a94d0 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/span.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/span.go
@@ -8,7 +8,8 @@ import (
"github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ otobserver "github.com/opentracing-contrib/go-observer"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
// Span provides access to the essential details of the span, for use
@@ -29,6 +30,7 @@ type Span interface {
type spanImpl struct {
tracer *tracerImpl
event func(SpanEvent)
+ observer otobserver.SpanObserver
sync.Mutex // protects the fields below
raw RawSpan
// The number of logs dropped because of MaxLogsPerSpan.
@@ -63,6 +65,9 @@ func (s *spanImpl) reset() {
}
func (s *spanImpl) SetOperationName(operationName string) opentracing.Span {
+ if s.observer != nil {
+ s.observer.OnSetOperationName(operationName)
+ }
s.Lock()
defer s.Unlock()
s.raw.Operation = operationName
@@ -75,6 +80,10 @@ func (s *spanImpl) trim() bool {
func (s *spanImpl) SetTag(key string, value interface{}) opentracing.Span {
defer s.onTag(key, value)
+ if s.observer != nil {
+ s.observer.OnSetTag(key, value)
+ }
+
s.Lock()
defer s.Unlock()
if key == string(ext.SamplingPriority) {
@@ -190,6 +199,10 @@ func (s *spanImpl) FinishWithOptions(opts opentracing.FinishOptions) {
}
duration := finishTime.Sub(s.raw.Start)
+ if s.observer != nil {
+ s.observer.OnFinish(opts)
+ }
+
s.Lock()
defer s.Unlock()
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/compile.sh b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/compile.sh
index eda8d4ed4..743411051 100755
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/compile.sh
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/compile.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
for f in *.thrift ; do
- thrift -r --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift $f
+ thrift -r --gen go:thrift_import=github.com/apache/thrift/lib/go/thrift,package_prefix=github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/ $f
done
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/GoUnusedProtection__.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/GoUnusedProtection__.go
new file mode 100644
index 000000000..9b51d874a
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/GoUnusedProtection__.go
@@ -0,0 +1,7 @@
+// Autogenerated by Thrift Compiler (1.0.0-dev)
+// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+
+package scribe
+
+var GoUnusedProtection__ int;
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/constants.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe-consts.go
index 45fee5a9c..be5fbae02 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/scribe/constants.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe-consts.go
@@ -1,10 +1,12 @@
-// Autogenerated by Thrift Compiler (0.9.3)
+// Autogenerated by Thrift Compiler (1.0.0-dev)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
package scribe
import (
"bytes"
+ "reflect"
+ "context"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
)
@@ -12,7 +14,11 @@ import (
// (needed to ensure safety because of naive import list construction.)
var _ = thrift.ZERO
var _ = fmt.Printf
+var _ = context.Background
+var _ = reflect.DeepEqual
var _ = bytes.Equal
+
func init() {
}
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe.go
new file mode 100644
index 000000000..3767688b6
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/scribe/scribe.go
@@ -0,0 +1,550 @@
+// Autogenerated by Thrift Compiler (1.0.0-dev)
+// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+
+package scribe
+
+import (
+ "bytes"
+ "reflect"
+ "database/sql/driver"
+ "errors"
+ "context"
+ "fmt"
+ "github.com/apache/thrift/lib/go/thrift"
+)
+
+// (needed to ensure safety because of naive import list construction.)
+var _ = thrift.ZERO
+var _ = fmt.Printf
+var _ = context.Background
+var _ = reflect.DeepEqual
+var _ = bytes.Equal
+
+type ResultCode int64
+const (
+ ResultCode_OK ResultCode = 0
+ ResultCode_TRY_LATER ResultCode = 1
+)
+
+func (p ResultCode) String() string {
+ switch p {
+ case ResultCode_OK: return "OK"
+ case ResultCode_TRY_LATER: return "TRY_LATER"
+ }
+ return "<UNSET>"
+}
+
+func ResultCodeFromString(s string) (ResultCode, error) {
+ switch s {
+ case "OK": return ResultCode_OK, nil
+ case "TRY_LATER": return ResultCode_TRY_LATER, nil
+ }
+ return ResultCode(0), fmt.Errorf("not a valid ResultCode string")
+}
+
+
+func ResultCodePtr(v ResultCode) *ResultCode { return &v }
+
+func (p ResultCode) MarshalText() ([]byte, error) {
+return []byte(p.String()), nil
+}
+
+func (p *ResultCode) UnmarshalText(text []byte) error {
+q, err := ResultCodeFromString(string(text))
+if (err != nil) {
+return err
+}
+*p = q
+return nil
+}
+
+func (p *ResultCode) Scan(value interface{}) error {
+v, ok := value.(int64)
+if !ok {
+return errors.New("Scan value is not int64")
+}
+*p = ResultCode(v)
+return nil
+}
+
+func (p * ResultCode) Value() (driver.Value, error) {
+ if p == nil {
+ return nil, nil
+ }
+return int64(*p), nil
+}
+// Attributes:
+// - Category
+// - Message
+type LogEntry struct {
+ Category string `thrift:"category,1" db:"category" json:"category"`
+ Message string `thrift:"message,2" db:"message" json:"message"`
+}
+
+func NewLogEntry() *LogEntry {
+ return &LogEntry{}
+}
+
+
+func (p *LogEntry) GetCategory() string {
+ return p.Category
+}
+
+func (p *LogEntry) GetMessage() string {
+ return p.Message
+}
+func (p *LogEntry) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField2(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *LogEntry) ReadField1(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.Category = v
+}
+ return nil
+}
+
+func (p *LogEntry) ReadField2(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Message = v
+}
+ return nil
+}
+
+func (p *LogEntry) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("LogEntry"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ if err := p.writeField2(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *LogEntry) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("category", thrift.STRING, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:category: ", p), err) }
+ if err := oprot.WriteString(string(p.Category)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.category (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:category: ", p), err) }
+ return err
+}
+
+func (p *LogEntry) writeField2(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("message", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:message: ", p), err) }
+ if err := oprot.WriteString(string(p.Message)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.message (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:message: ", p), err) }
+ return err
+}
+
+func (p *LogEntry) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("LogEntry(%+v)", *p)
+}
+
+type Scribe interface {
+ // Parameters:
+ // - Messages
+ Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error)
+}
+
+type ScribeClient struct {
+ c thrift.TClient
+}
+
+// Deprecated: Use NewScribe instead
+func NewScribeClientFactory(t thrift.TTransport, f thrift.TProtocolFactory) *ScribeClient {
+ return &ScribeClient{
+ c: thrift.NewTStandardClient(f.GetProtocol(t), f.GetProtocol(t)),
+ }
+}
+
+// Deprecated: Use NewScribe instead
+func NewScribeClientProtocol(t thrift.TTransport, iprot thrift.TProtocol, oprot thrift.TProtocol) *ScribeClient {
+ return &ScribeClient{
+ c: thrift.NewTStandardClient(iprot, oprot),
+ }
+}
+
+func NewScribeClient(c thrift.TClient) *ScribeClient {
+ return &ScribeClient{
+ c: c,
+ }
+}
+
+// Parameters:
+// - Messages
+func (p *ScribeClient) Log(ctx context.Context, messages []*LogEntry) (r ResultCode, err error) {
+ var _args0 ScribeLogArgs
+ _args0.Messages = messages
+ var _result1 ScribeLogResult
+ if err = p.c.Call(ctx, "Log", &_args0, &_result1); err != nil {
+ return
+ }
+ return _result1.GetSuccess(), nil
+}
+
+type ScribeProcessor struct {
+ processorMap map[string]thrift.TProcessorFunction
+ handler Scribe
+}
+
+func (p *ScribeProcessor) AddToProcessorMap(key string, processor thrift.TProcessorFunction) {
+ p.processorMap[key] = processor
+}
+
+func (p *ScribeProcessor) GetProcessorFunction(key string) (processor thrift.TProcessorFunction, ok bool) {
+ processor, ok = p.processorMap[key]
+ return processor, ok
+}
+
+func (p *ScribeProcessor) ProcessorMap() map[string]thrift.TProcessorFunction {
+ return p.processorMap
+}
+
+func NewScribeProcessor(handler Scribe) *ScribeProcessor {
+
+ self2 := &ScribeProcessor{handler:handler, processorMap:make(map[string]thrift.TProcessorFunction)}
+ self2.processorMap["Log"] = &scribeProcessorLog{handler:handler}
+return self2
+}
+
+func (p *ScribeProcessor) Process(ctx context.Context, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
+ name, _, seqId, err := iprot.ReadMessageBegin()
+ if err != nil { return false, err }
+ if processor, ok := p.GetProcessorFunction(name); ok {
+ return processor.Process(ctx, seqId, iprot, oprot)
+ }
+ iprot.Skip(thrift.STRUCT)
+ iprot.ReadMessageEnd()
+ x3 := thrift.NewTApplicationException(thrift.UNKNOWN_METHOD, "Unknown function " + name)
+ oprot.WriteMessageBegin(name, thrift.EXCEPTION, seqId)
+ x3.Write(oprot)
+ oprot.WriteMessageEnd()
+ oprot.Flush()
+ return false, x3
+
+}
+
+type scribeProcessorLog struct {
+ handler Scribe
+}
+
+func (p *scribeProcessorLog) Process(ctx context.Context, seqId int32, iprot, oprot thrift.TProtocol) (success bool, err thrift.TException) {
+ args := ScribeLogArgs{}
+ if err = args.Read(iprot); err != nil {
+ iprot.ReadMessageEnd()
+ x := thrift.NewTApplicationException(thrift.PROTOCOL_ERROR, err.Error())
+ oprot.WriteMessageBegin("Log", thrift.EXCEPTION, seqId)
+ x.Write(oprot)
+ oprot.WriteMessageEnd()
+ oprot.Flush()
+ return false, err
+ }
+
+ iprot.ReadMessageEnd()
+ result := ScribeLogResult{}
+var retval ResultCode
+ var err2 error
+ if retval, err2 = p.handler.Log(ctx, args.Messages); err2 != nil {
+ x := thrift.NewTApplicationException(thrift.INTERNAL_ERROR, "Internal error processing Log: " + err2.Error())
+ oprot.WriteMessageBegin("Log", thrift.EXCEPTION, seqId)
+ x.Write(oprot)
+ oprot.WriteMessageEnd()
+ oprot.Flush()
+ return true, err2
+ } else {
+ result.Success = &retval
+}
+ if err2 = oprot.WriteMessageBegin("Log", thrift.REPLY, seqId); err2 != nil {
+ err = err2
+ }
+ if err2 = result.Write(oprot); err == nil && err2 != nil {
+ err = err2
+ }
+ if err2 = oprot.WriteMessageEnd(); err == nil && err2 != nil {
+ err = err2
+ }
+ if err2 = oprot.Flush(); err == nil && err2 != nil {
+ err = err2
+ }
+ if err != nil {
+ return
+ }
+ return true, err
+}
+
+
+// HELPER FUNCTIONS AND STRUCTURES
+
+// Attributes:
+// - Messages
+type ScribeLogArgs struct {
+ Messages []*LogEntry `thrift:"messages,1" db:"messages" json:"messages"`
+}
+
+func NewScribeLogArgs() *ScribeLogArgs {
+ return &ScribeLogArgs{}
+}
+
+
+func (p *ScribeLogArgs) GetMessages() []*LogEntry {
+ return p.Messages
+}
+func (p *ScribeLogArgs) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *ScribeLogArgs) ReadField1(iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin()
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]*LogEntry, 0, size)
+ p.Messages = tSlice
+ for i := 0; i < size; i ++ {
+ _elem4 := &LogEntry{}
+ if err := _elem4.Read(iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem4), err)
+ }
+ p.Messages = append(p.Messages, _elem4)
+ }
+ if err := iprot.ReadListEnd(); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *ScribeLogArgs) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("Log_args"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *ScribeLogArgs) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("messages", thrift.LIST, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:messages: ", p), err) }
+ if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Messages)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Messages {
+ if err := v.Write(oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
+ }
+ }
+ if err := oprot.WriteListEnd(); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:messages: ", p), err) }
+ return err
+}
+
+func (p *ScribeLogArgs) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ScribeLogArgs(%+v)", *p)
+}
+
+// Attributes:
+// - Success
+type ScribeLogResult struct {
+ Success *ResultCode `thrift:"success,0" db:"success" json:"success,omitempty"`
+}
+
+func NewScribeLogResult() *ScribeLogResult {
+ return &ScribeLogResult{}
+}
+
+var ScribeLogResult_Success_DEFAULT ResultCode
+func (p *ScribeLogResult) GetSuccess() ResultCode {
+ if !p.IsSetSuccess() {
+ return ScribeLogResult_Success_DEFAULT
+ }
+return *p.Success
+}
+func (p *ScribeLogResult) IsSetSuccess() bool {
+ return p.Success != nil
+}
+
+func (p *ScribeLogResult) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 0:
+ if fieldTypeId == thrift.I32 {
+ if err := p.ReadField0(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *ScribeLogResult) ReadField0(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(); err != nil {
+ return thrift.PrependError("error reading field 0: ", err)
+} else {
+ temp := ResultCode(v)
+ p.Success = &temp
+}
+ return nil
+}
+
+func (p *ScribeLogResult) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("Log_result"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField0(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *ScribeLogResult) writeField0(oprot thrift.TProtocol) (err error) {
+ if p.IsSetSuccess() {
+ if err := oprot.WriteFieldBegin("success", thrift.I32, 0); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err) }
+ if err := oprot.WriteI32(int32(*p.Success)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err) }
+ }
+ return err
+}
+
+func (p *ScribeLogResult) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("ScribeLogResult(%+v)", *p)
+}
+
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/GoUnusedProtection__.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/GoUnusedProtection__.go
new file mode 100644
index 000000000..2d5ebe7f4
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/GoUnusedProtection__.go
@@ -0,0 +1,7 @@
+// Autogenerated by Thrift Compiler (1.0.0-dev)
+// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+
+package zipkincore
+
+var GoUnusedProtection__ int;
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/constants.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore-consts.go
index 1ee506417..6a662eae6 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore/constants.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore-consts.go
@@ -1,10 +1,12 @@
-// Autogenerated by Thrift Compiler (0.9.3)
+// Autogenerated by Thrift Compiler (1.0.0-dev)
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
package zipkincore
import (
"bytes"
+ "reflect"
+ "context"
"fmt"
"github.com/apache/thrift/lib/go/thrift"
)
@@ -12,6 +14,8 @@ import (
// (needed to ensure safety because of naive import list construction.)
var _ = thrift.ZERO
var _ = fmt.Printf
+var _ = context.Background
+var _ = reflect.DeepEqual
var _ = bytes.Equal
const CLIENT_SEND = "cs"
@@ -38,3 +42,4 @@ const SERVER_ADDR = "sa"
func init() {
}
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore.go
new file mode 100644
index 000000000..42f048a3f
--- /dev/null
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore/zipkinCore.go
@@ -0,0 +1,1285 @@
+// Autogenerated by Thrift Compiler (1.0.0-dev)
+// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+
+package zipkincore
+
+import (
+ "bytes"
+ "reflect"
+ "database/sql/driver"
+ "errors"
+ "context"
+ "fmt"
+ "github.com/apache/thrift/lib/go/thrift"
+)
+
+// (needed to ensure safety because of naive import list construction.)
+var _ = thrift.ZERO
+var _ = fmt.Printf
+var _ = context.Background
+var _ = reflect.DeepEqual
+var _ = bytes.Equal
+
+//A subset of thrift base types, except BYTES.
+type AnnotationType int64
+const (
+ AnnotationType_BOOL AnnotationType = 0
+ AnnotationType_BYTES AnnotationType = 1
+ AnnotationType_I16 AnnotationType = 2
+ AnnotationType_I32 AnnotationType = 3
+ AnnotationType_I64 AnnotationType = 4
+ AnnotationType_DOUBLE AnnotationType = 5
+ AnnotationType_STRING AnnotationType = 6
+)
+
+func (p AnnotationType) String() string {
+ switch p {
+ case AnnotationType_BOOL: return "BOOL"
+ case AnnotationType_BYTES: return "BYTES"
+ case AnnotationType_I16: return "I16"
+ case AnnotationType_I32: return "I32"
+ case AnnotationType_I64: return "I64"
+ case AnnotationType_DOUBLE: return "DOUBLE"
+ case AnnotationType_STRING: return "STRING"
+ }
+ return "<UNSET>"
+}
+
+func AnnotationTypeFromString(s string) (AnnotationType, error) {
+ switch s {
+ case "BOOL": return AnnotationType_BOOL, nil
+ case "BYTES": return AnnotationType_BYTES, nil
+ case "I16": return AnnotationType_I16, nil
+ case "I32": return AnnotationType_I32, nil
+ case "I64": return AnnotationType_I64, nil
+ case "DOUBLE": return AnnotationType_DOUBLE, nil
+ case "STRING": return AnnotationType_STRING, nil
+ }
+ return AnnotationType(0), fmt.Errorf("not a valid AnnotationType string")
+}
+
+
+func AnnotationTypePtr(v AnnotationType) *AnnotationType { return &v }
+
+func (p AnnotationType) MarshalText() ([]byte, error) {
+return []byte(p.String()), nil
+}
+
+func (p *AnnotationType) UnmarshalText(text []byte) error {
+q, err := AnnotationTypeFromString(string(text))
+if (err != nil) {
+return err
+}
+*p = q
+return nil
+}
+
+func (p *AnnotationType) Scan(value interface{}) error {
+v, ok := value.(int64)
+if !ok {
+return errors.New("Scan value is not int64")
+}
+*p = AnnotationType(v)
+return nil
+}
+
+func (p * AnnotationType) Value() (driver.Value, error) {
+ if p == nil {
+ return nil, nil
+ }
+return int64(*p), nil
+}
+// Indicates the network context of a service recording an annotation with two
+// exceptions.
+//
+// When a BinaryAnnotation, and key is CLIENT_ADDR or SERVER_ADDR,
+// the endpoint indicates the source or destination of an RPC. This exception
+// allows zipkin to display network context of uninstrumented services, or
+// clients such as web browsers.
+//
+// Attributes:
+// - Ipv4: IPv4 host address packed into 4 bytes.
+//
+// Ex for the ip 1.2.3.4, it would be (1 << 24) | (2 << 16) | (3 << 8) | 4
+// - Port: IPv4 port or 0, if unknown.
+//
+// Note: this is to be treated as an unsigned integer, so watch for negatives.
+// - ServiceName: Classifier of a source or destination in lowercase, such as "zipkin-web".
+//
+// This is the primary parameter for trace lookup, so should be intuitive as
+// possible, for example, matching names in service discovery.
+//
+// Conventionally, when the service name isn't known, service_name = "unknown".
+// However, it is also permissible to set service_name = "" (empty string).
+// The difference in the latter usage is that the span will not be queryable
+// by service name unless more information is added to the span with non-empty
+// service name, e.g. an additional annotation from the server.
+//
+// Particularly clients may not have a reliable service name at ingest. One
+// approach is to set service_name to "" at ingest, and later assign a
+// better label based on binary annotations, such as user agent.
+// - Ipv6: IPv6 host address packed into 16 bytes. Ex Inet6Address.getBytes()
+type Endpoint struct {
+ Ipv4 int32 `thrift:"ipv4,1" db:"ipv4" json:"ipv4"`
+ Port int16 `thrift:"port,2" db:"port" json:"port"`
+ ServiceName string `thrift:"service_name,3" db:"service_name" json:"service_name"`
+ Ipv6 []byte `thrift:"ipv6,4" db:"ipv6" json:"ipv6,omitempty"`
+}
+
+func NewEndpoint() *Endpoint {
+ return &Endpoint{}
+}
+
+
+func (p *Endpoint) GetIpv4() int32 {
+ return p.Ipv4
+}
+
+func (p *Endpoint) GetPort() int16 {
+ return p.Port
+}
+
+func (p *Endpoint) GetServiceName() string {
+ return p.ServiceName
+}
+var Endpoint_Ipv6_DEFAULT []byte
+
+func (p *Endpoint) GetIpv6() []byte {
+ return p.Ipv6
+}
+func (p *Endpoint) IsSetIpv6() bool {
+ return p.Ipv6 != nil
+}
+
+func (p *Endpoint) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.I32 {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.I16 {
+ if err := p.ReadField2(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField3(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField4(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *Endpoint) ReadField1(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.Ipv4 = v
+}
+ return nil
+}
+
+func (p *Endpoint) ReadField2(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI16(); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Port = v
+}
+ return nil
+}
+
+func (p *Endpoint) ReadField3(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.ServiceName = v
+}
+ return nil
+}
+
+func (p *Endpoint) ReadField4(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBinary(); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
+} else {
+ p.Ipv6 = v
+}
+ return nil
+}
+
+func (p *Endpoint) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("Endpoint"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ if err := p.writeField2(oprot); err != nil { return err }
+ if err := p.writeField3(oprot); err != nil { return err }
+ if err := p.writeField4(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *Endpoint) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("ipv4", thrift.I32, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ipv4: ", p), err) }
+ if err := oprot.WriteI32(int32(p.Ipv4)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.ipv4 (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ipv4: ", p), err) }
+ return err
+}
+
+func (p *Endpoint) writeField2(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("port", thrift.I16, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err) }
+ if err := oprot.WriteI16(int16(p.Port)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err) }
+ return err
+}
+
+func (p *Endpoint) writeField3(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("service_name", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:service_name: ", p), err) }
+ if err := oprot.WriteString(string(p.ServiceName)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.service_name (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:service_name: ", p), err) }
+ return err
+}
+
+func (p *Endpoint) writeField4(oprot thrift.TProtocol) (err error) {
+ if p.IsSetIpv6() {
+ if err := oprot.WriteFieldBegin("ipv6", thrift.STRING, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:ipv6: ", p), err) }
+ if err := oprot.WriteBinary(p.Ipv6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.ipv6 (4) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:ipv6: ", p), err) }
+ }
+ return err
+}
+
+func (p *Endpoint) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("Endpoint(%+v)", *p)
+}
+
+// Associates an event that explains latency with a timestamp.
+//
+// Unlike log statements, annotations are often codes: for example "sr".
+//
+// Attributes:
+// - Timestamp: Microseconds from epoch.
+//
+// This value should use the most precise value possible. For example,
+// gettimeofday or multiplying currentTimeMillis by 1000.
+// - Value: Usually a short tag indicating an event, like "sr" or "finagle.retry".
+// - Host: The host that recorded the value, primarily for query by service name.
+type Annotation struct {
+ Timestamp int64 `thrift:"timestamp,1" db:"timestamp" json:"timestamp"`
+ Value string `thrift:"value,2" db:"value" json:"value"`
+ Host *Endpoint `thrift:"host,3" db:"host" json:"host,omitempty"`
+}
+
+func NewAnnotation() *Annotation {
+ return &Annotation{}
+}
+
+
+func (p *Annotation) GetTimestamp() int64 {
+ return p.Timestamp
+}
+
+func (p *Annotation) GetValue() string {
+ return p.Value
+}
+var Annotation_Host_DEFAULT *Endpoint
+func (p *Annotation) GetHost() *Endpoint {
+ if !p.IsSetHost() {
+ return Annotation_Host_DEFAULT
+ }
+return p.Host
+}
+func (p *Annotation) IsSetHost() bool {
+ return p.Host != nil
+}
+
+func (p *Annotation) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField2(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRUCT {
+ if err := p.ReadField3(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *Annotation) ReadField1(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.Timestamp = v
+}
+ return nil
+}
+
+func (p *Annotation) ReadField2(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Value = v
+}
+ return nil
+}
+
+func (p *Annotation) ReadField3(iprot thrift.TProtocol) error {
+ p.Host = &Endpoint{}
+ if err := p.Host.Read(iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Host), err)
+ }
+ return nil
+}
+
+func (p *Annotation) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("Annotation"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ if err := p.writeField2(oprot); err != nil { return err }
+ if err := p.writeField3(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *Annotation) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:timestamp: ", p), err) }
+ if err := oprot.WriteI64(int64(p.Timestamp)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.timestamp (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:timestamp: ", p), err) }
+ return err
+}
+
+func (p *Annotation) writeField2(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) }
+ if err := oprot.WriteString(string(p.Value)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) }
+ return err
+}
+
+func (p *Annotation) writeField3(oprot thrift.TProtocol) (err error) {
+ if p.IsSetHost() {
+ if err := oprot.WriteFieldBegin("host", thrift.STRUCT, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:host: ", p), err) }
+ if err := p.Host.Write(oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Host), err)
+ }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:host: ", p), err) }
+ }
+ return err
+}
+
+func (p *Annotation) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("Annotation(%+v)", *p)
+}
+
+// Binary annotations are tags applied to a Span to give it context. For
+// example, a binary annotation of HTTP_PATH ("http.path") could the path
+// to a resource in a RPC call.
+//
+// Binary annotations of type STRING are always queryable, though more a
+// historical implementation detail than a structural concern.
+//
+// Binary annotations can repeat, and vary on the host. Similar to Annotation,
+// the host indicates who logged the event. This allows you to tell the
+// difference between the client and server side of the same key. For example,
+// the key "http.path" might be different on the client and server side due to
+// rewriting, like "/api/v1/myresource" vs "/myresource. Via the host field,
+// you can see the different points of view, which often help in debugging.
+//
+// Attributes:
+// - Key: Name used to lookup spans, such as "http.path" or "finagle.version".
+// - Value: Serialized thrift bytes, in TBinaryProtocol format.
+//
+// For legacy reasons, byte order is big-endian. See THRIFT-3217.
+// - AnnotationType: The thrift type of value, most often STRING.
+//
+// annotation_type shouldn't vary for the same key.
+// - Host: The host that recorded value, allowing query by service name or address.
+//
+// There are two exceptions: when key is "ca" or "sa", this is the source or
+// destination of an RPC. This exception allows zipkin to display network
+// context of uninstrumented services, such as browsers or databases.
+type BinaryAnnotation struct {
+ Key string `thrift:"key,1" db:"key" json:"key"`
+ Value []byte `thrift:"value,2" db:"value" json:"value"`
+ AnnotationType AnnotationType `thrift:"annotation_type,3" db:"annotation_type" json:"annotation_type"`
+ Host *Endpoint `thrift:"host,4" db:"host" json:"host,omitempty"`
+}
+
+func NewBinaryAnnotation() *BinaryAnnotation {
+ return &BinaryAnnotation{}
+}
+
+
+func (p *BinaryAnnotation) GetKey() string {
+ return p.Key
+}
+
+func (p *BinaryAnnotation) GetValue() []byte {
+ return p.Value
+}
+
+func (p *BinaryAnnotation) GetAnnotationType() AnnotationType {
+ return p.AnnotationType
+}
+var BinaryAnnotation_Host_DEFAULT *Endpoint
+func (p *BinaryAnnotation) GetHost() *Endpoint {
+ if !p.IsSetHost() {
+ return BinaryAnnotation_Host_DEFAULT
+ }
+return p.Host
+}
+func (p *BinaryAnnotation) IsSetHost() bool {
+ return p.Host != nil
+}
+
+func (p *BinaryAnnotation) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 2:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField2(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.I32 {
+ if err := p.ReadField3(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.STRUCT {
+ if err := p.ReadField4(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *BinaryAnnotation) ReadField1(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.Key = v
+}
+ return nil
+}
+
+func (p *BinaryAnnotation) ReadField2(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBinary(); err != nil {
+ return thrift.PrependError("error reading field 2: ", err)
+} else {
+ p.Value = v
+}
+ return nil
+}
+
+func (p *BinaryAnnotation) ReadField3(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI32(); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ temp := AnnotationType(v)
+ p.AnnotationType = temp
+}
+ return nil
+}
+
+func (p *BinaryAnnotation) ReadField4(iprot thrift.TProtocol) error {
+ p.Host = &Endpoint{}
+ if err := p.Host.Read(iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Host), err)
+ }
+ return nil
+}
+
+func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("BinaryAnnotation"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ if err := p.writeField2(oprot); err != nil { return err }
+ if err := p.writeField3(oprot); err != nil { return err }
+ if err := p.writeField4(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *BinaryAnnotation) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err) }
+ if err := oprot.WriteString(string(p.Key)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err) }
+ return err
+}
+
+func (p *BinaryAnnotation) writeField2(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err) }
+ if err := oprot.WriteBinary(p.Value); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err) }
+ return err
+}
+
+func (p *BinaryAnnotation) writeField3(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("annotation_type", thrift.I32, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:annotation_type: ", p), err) }
+ if err := oprot.WriteI32(int32(p.AnnotationType)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.annotation_type (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:annotation_type: ", p), err) }
+ return err
+}
+
+func (p *BinaryAnnotation) writeField4(oprot thrift.TProtocol) (err error) {
+ if p.IsSetHost() {
+ if err := oprot.WriteFieldBegin("host", thrift.STRUCT, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:host: ", p), err) }
+ if err := p.Host.Write(oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Host), err)
+ }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:host: ", p), err) }
+ }
+ return err
+}
+
+func (p *BinaryAnnotation) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("BinaryAnnotation(%+v)", *p)
+}
+
+// A trace is a series of spans (often RPC calls) which form a latency tree.
+//
+// Spans are usually created by instrumentation in RPC clients or servers, but
+// can also represent in-process activity. Annotations in spans are similar to
+// log statements, and are sometimes created directly by application developers
+// to indicate events of interest, such as a cache miss.
+//
+// The root span is where parent_id = Nil; it usually has the longest duration
+// in the trace.
+//
+// Span identifiers are packed into i64s, but should be treated opaquely.
+// String encoding is fixed-width lower-hex, to avoid signed interpretation.
+//
+// Attributes:
+// - TraceID: Unique 8-byte identifier for a trace, set on all spans within it.
+// - Name: Span name in lowercase, rpc method for example. Conventionally, when the
+// span name isn't known, name = "unknown".
+// - ID: Unique 8-byte identifier of this span within a trace. A span is uniquely
+// identified in storage by (trace_id, id).
+// - ParentID: The parent's Span.id; absent if this the root span in a trace.
+// - Annotations: Associates events that explain latency with a timestamp. Unlike log
+// statements, annotations are often codes: for example SERVER_RECV("sr").
+// Annotations are sorted ascending by timestamp.
+// - BinaryAnnotations: Tags a span with context, usually to support query or aggregation. For
+// example, a binary annotation key could be "http.path".
+// - Debug: True is a request to store this span even if it overrides sampling policy.
+// - Timestamp: Epoch microseconds of the start of this span, absent if this an incomplete
+// span.
+//
+// This value should be set directly by instrumentation, using the most
+// precise value possible. For example, gettimeofday or syncing nanoTime
+// against a tick of currentTimeMillis.
+//
+// For compatibility with instrumentation that precede this field, collectors
+// or span stores can derive this via Annotation.timestamp.
+// For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
+//
+// Timestamp is nullable for input only. Spans without a timestamp cannot be
+// presented in a timeline: Span stores should not output spans missing a
+// timestamp.
+//
+// There are two known edge-cases where this could be absent: both cases
+// exist when a collector receives a span in parts and a binary annotation
+// precedes a timestamp. This is possible when..
+// - The span is in-flight (ex not yet received a timestamp)
+// - The span's start event was lost
+// - Duration: Measurement in microseconds of the critical path, if known. Durations of
+// less than one microsecond must be rounded up to 1 microsecond.
+//
+// This value should be set directly, as opposed to implicitly via annotation
+// timestamps. Doing so encourages precision decoupled from problems of
+// clocks, such as skew or NTP updates causing time to move backwards.
+//
+// For compatibility with instrumentation that precede this field, collectors
+// or span stores can derive this by subtracting Annotation.timestamp.
+// For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
+//
+// If this field is persisted as unset, zipkin will continue to work, except
+// duration query support will be implementation-specific. Similarly, setting
+// this field non-atomically is implementation-specific.
+//
+// This field is i64 vs i32 to support spans longer than 35 minutes.
+// - TraceIDHigh: Optional unique 8-byte additional identifier for a trace. If non zero, this
+// means the trace uses 128 bit traceIds instead of 64 bit.
+type Span struct {
+ TraceID int64 `thrift:"trace_id,1" db:"trace_id" json:"trace_id"`
+ // unused field # 2
+ Name string `thrift:"name,3" db:"name" json:"name"`
+ ID int64 `thrift:"id,4" db:"id" json:"id"`
+ ParentID *int64 `thrift:"parent_id,5" db:"parent_id" json:"parent_id,omitempty"`
+ Annotations []*Annotation `thrift:"annotations,6" db:"annotations" json:"annotations"`
+ // unused field # 7
+ BinaryAnnotations []*BinaryAnnotation `thrift:"binary_annotations,8" db:"binary_annotations" json:"binary_annotations"`
+ Debug bool `thrift:"debug,9" db:"debug" json:"debug,omitempty"`
+ Timestamp *int64 `thrift:"timestamp,10" db:"timestamp" json:"timestamp,omitempty"`
+ Duration *int64 `thrift:"duration,11" db:"duration" json:"duration,omitempty"`
+ TraceIDHigh *int64 `thrift:"trace_id_high,12" db:"trace_id_high" json:"trace_id_high,omitempty"`
+}
+
+func NewSpan() *Span {
+ return &Span{}
+}
+
+
+func (p *Span) GetTraceID() int64 {
+ return p.TraceID
+}
+
+func (p *Span) GetName() string {
+ return p.Name
+}
+
+func (p *Span) GetID() int64 {
+ return p.ID
+}
+var Span_ParentID_DEFAULT int64
+func (p *Span) GetParentID() int64 {
+ if !p.IsSetParentID() {
+ return Span_ParentID_DEFAULT
+ }
+return *p.ParentID
+}
+
+func (p *Span) GetAnnotations() []*Annotation {
+ return p.Annotations
+}
+
+func (p *Span) GetBinaryAnnotations() []*BinaryAnnotation {
+ return p.BinaryAnnotations
+}
+var Span_Debug_DEFAULT bool = false
+
+func (p *Span) GetDebug() bool {
+ return p.Debug
+}
+var Span_Timestamp_DEFAULT int64
+func (p *Span) GetTimestamp() int64 {
+ if !p.IsSetTimestamp() {
+ return Span_Timestamp_DEFAULT
+ }
+return *p.Timestamp
+}
+var Span_Duration_DEFAULT int64
+func (p *Span) GetDuration() int64 {
+ if !p.IsSetDuration() {
+ return Span_Duration_DEFAULT
+ }
+return *p.Duration
+}
+var Span_TraceIDHigh_DEFAULT int64
+func (p *Span) GetTraceIDHigh() int64 {
+ if !p.IsSetTraceIDHigh() {
+ return Span_TraceIDHigh_DEFAULT
+ }
+return *p.TraceIDHigh
+}
+func (p *Span) IsSetParentID() bool {
+ return p.ParentID != nil
+}
+
+func (p *Span) IsSetDebug() bool {
+ return p.Debug != Span_Debug_DEFAULT
+}
+
+func (p *Span) IsSetTimestamp() bool {
+ return p.Timestamp != nil
+}
+
+func (p *Span) IsSetDuration() bool {
+ return p.Duration != nil
+}
+
+func (p *Span) IsSetTraceIDHigh() bool {
+ return p.TraceIDHigh != nil
+}
+
+func (p *Span) Read(iprot thrift.TProtocol) error {
+ if _, err := iprot.ReadStructBegin(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
+ }
+
+
+ for {
+ _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
+ if err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
+ }
+ if fieldTypeId == thrift.STOP { break; }
+ switch fieldId {
+ case 1:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField1(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 3:
+ if fieldTypeId == thrift.STRING {
+ if err := p.ReadField3(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 4:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField4(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 5:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField5(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 6:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField6(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 8:
+ if fieldTypeId == thrift.LIST {
+ if err := p.ReadField8(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 9:
+ if fieldTypeId == thrift.BOOL {
+ if err := p.ReadField9(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 10:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField10(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 11:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField11(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ case 12:
+ if fieldTypeId == thrift.I64 {
+ if err := p.ReadField12(iprot); err != nil {
+ return err
+ }
+ } else {
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ default:
+ if err := iprot.Skip(fieldTypeId); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadFieldEnd(); err != nil {
+ return err
+ }
+ }
+ if err := iprot.ReadStructEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
+ }
+ return nil
+}
+
+func (p *Span) ReadField1(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 1: ", err)
+} else {
+ p.TraceID = v
+}
+ return nil
+}
+
+func (p *Span) ReadField3(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadString(); err != nil {
+ return thrift.PrependError("error reading field 3: ", err)
+} else {
+ p.Name = v
+}
+ return nil
+}
+
+func (p *Span) ReadField4(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 4: ", err)
+} else {
+ p.ID = v
+}
+ return nil
+}
+
+func (p *Span) ReadField5(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 5: ", err)
+} else {
+ p.ParentID = &v
+}
+ return nil
+}
+
+func (p *Span) ReadField6(iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin()
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]*Annotation, 0, size)
+ p.Annotations = tSlice
+ for i := 0; i < size; i ++ {
+ _elem0 := &Annotation{}
+ if err := _elem0.Read(iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err)
+ }
+ p.Annotations = append(p.Annotations, _elem0)
+ }
+ if err := iprot.ReadListEnd(); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *Span) ReadField8(iprot thrift.TProtocol) error {
+ _, size, err := iprot.ReadListBegin()
+ if err != nil {
+ return thrift.PrependError("error reading list begin: ", err)
+ }
+ tSlice := make([]*BinaryAnnotation, 0, size)
+ p.BinaryAnnotations = tSlice
+ for i := 0; i < size; i ++ {
+ _elem1 := &BinaryAnnotation{}
+ if err := _elem1.Read(iprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err)
+ }
+ p.BinaryAnnotations = append(p.BinaryAnnotations, _elem1)
+ }
+ if err := iprot.ReadListEnd(); err != nil {
+ return thrift.PrependError("error reading list end: ", err)
+ }
+ return nil
+}
+
+func (p *Span) ReadField9(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadBool(); err != nil {
+ return thrift.PrependError("error reading field 9: ", err)
+} else {
+ p.Debug = v
+}
+ return nil
+}
+
+func (p *Span) ReadField10(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 10: ", err)
+} else {
+ p.Timestamp = &v
+}
+ return nil
+}
+
+func (p *Span) ReadField11(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 11: ", err)
+} else {
+ p.Duration = &v
+}
+ return nil
+}
+
+func (p *Span) ReadField12(iprot thrift.TProtocol) error {
+ if v, err := iprot.ReadI64(); err != nil {
+ return thrift.PrependError("error reading field 12: ", err)
+} else {
+ p.TraceIDHigh = &v
+}
+ return nil
+}
+
+func (p *Span) Write(oprot thrift.TProtocol) error {
+ if err := oprot.WriteStructBegin("Span"); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) }
+ if p != nil {
+ if err := p.writeField1(oprot); err != nil { return err }
+ if err := p.writeField3(oprot); err != nil { return err }
+ if err := p.writeField4(oprot); err != nil { return err }
+ if err := p.writeField5(oprot); err != nil { return err }
+ if err := p.writeField6(oprot); err != nil { return err }
+ if err := p.writeField8(oprot); err != nil { return err }
+ if err := p.writeField9(oprot); err != nil { return err }
+ if err := p.writeField10(oprot); err != nil { return err }
+ if err := p.writeField11(oprot); err != nil { return err }
+ if err := p.writeField12(oprot); err != nil { return err }
+ }
+ if err := oprot.WriteFieldStop(); err != nil {
+ return thrift.PrependError("write field stop error: ", err) }
+ if err := oprot.WriteStructEnd(); err != nil {
+ return thrift.PrependError("write struct stop error: ", err) }
+ return nil
+}
+
+func (p *Span) writeField1(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("trace_id", thrift.I64, 1); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:trace_id: ", p), err) }
+ if err := oprot.WriteI64(int64(p.TraceID)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.trace_id (1) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 1:trace_id: ", p), err) }
+ return err
+}
+
+func (p *Span) writeField3(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("name", thrift.STRING, 3); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:name: ", p), err) }
+ if err := oprot.WriteString(string(p.Name)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.name (3) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 3:name: ", p), err) }
+ return err
+}
+
+func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("id", thrift.I64, 4); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err) }
+ if err := oprot.WriteI64(int64(p.ID)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.id (4) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err) }
+ return err
+}
+
+func (p *Span) writeField5(oprot thrift.TProtocol) (err error) {
+ if p.IsSetParentID() {
+ if err := oprot.WriteFieldBegin("parent_id", thrift.I64, 5); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:parent_id: ", p), err) }
+ if err := oprot.WriteI64(int64(*p.ParentID)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.parent_id (5) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 5:parent_id: ", p), err) }
+ }
+ return err
+}
+
+func (p *Span) writeField6(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("annotations", thrift.LIST, 6); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 6:annotations: ", p), err) }
+ if err := oprot.WriteListBegin(thrift.STRUCT, len(p.Annotations)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.Annotations {
+ if err := v.Write(oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
+ }
+ }
+ if err := oprot.WriteListEnd(); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 6:annotations: ", p), err) }
+ return err
+}
+
+func (p *Span) writeField8(oprot thrift.TProtocol) (err error) {
+ if err := oprot.WriteFieldBegin("binary_annotations", thrift.LIST, 8); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:binary_annotations: ", p), err) }
+ if err := oprot.WriteListBegin(thrift.STRUCT, len(p.BinaryAnnotations)); err != nil {
+ return thrift.PrependError("error writing list begin: ", err)
+ }
+ for _, v := range p.BinaryAnnotations {
+ if err := v.Write(oprot); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err)
+ }
+ }
+ if err := oprot.WriteListEnd(); err != nil {
+ return thrift.PrependError("error writing list end: ", err)
+ }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 8:binary_annotations: ", p), err) }
+ return err
+}
+
+func (p *Span) writeField9(oprot thrift.TProtocol) (err error) {
+ if p.IsSetDebug() {
+ if err := oprot.WriteFieldBegin("debug", thrift.BOOL, 9); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:debug: ", p), err) }
+ if err := oprot.WriteBool(bool(p.Debug)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.debug (9) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 9:debug: ", p), err) }
+ }
+ return err
+}
+
+func (p *Span) writeField10(oprot thrift.TProtocol) (err error) {
+ if p.IsSetTimestamp() {
+ if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 10); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timestamp: ", p), err) }
+ if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.timestamp (10) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timestamp: ", p), err) }
+ }
+ return err
+}
+
+func (p *Span) writeField11(oprot thrift.TProtocol) (err error) {
+ if p.IsSetDuration() {
+ if err := oprot.WriteFieldBegin("duration", thrift.I64, 11); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:duration: ", p), err) }
+ if err := oprot.WriteI64(int64(*p.Duration)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.duration (11) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 11:duration: ", p), err) }
+ }
+ return err
+}
+
+func (p *Span) writeField12(oprot thrift.TProtocol) (err error) {
+ if p.IsSetTraceIDHigh() {
+ if err := oprot.WriteFieldBegin("trace_id_high", thrift.I64, 12); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field begin error 12:trace_id_high: ", p), err) }
+ if err := oprot.WriteI64(int64(*p.TraceIDHigh)); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T.trace_id_high (12) field write error: ", p), err) }
+ if err := oprot.WriteFieldEnd(); err != nil {
+ return thrift.PrependError(fmt.Sprintf("%T write field end error 12:trace_id_high: ", p), err) }
+ }
+ return err
+}
+
+func (p *Span) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return fmt.Sprintf("Span(%+v)", *p)
+}
+
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/scribe.thrift b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/scribe.thrift
index 12e21ce1e..12e21ce1e 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/scribe.thrift
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/scribe.thrift
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/zipkinCore.thrift b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/zipkinCore.thrift
index 597d1f691..597d1f691 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/zipkinCore.thrift
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/thrift/zipkinCore.thrift
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/tracer.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/tracer.go
index 22855a218..5754d5fc5 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/tracer.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/tracer.go
@@ -7,6 +7,7 @@ import (
opentracing "github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
+ otobserver "github.com/opentracing-contrib/go-observer"
"github.com/openzipkin/zipkin-go-opentracing/flag"
)
@@ -107,6 +108,8 @@ type TracerOptions struct {
// Regardless of this setting, the library will propagate and support both
// 64 and 128 bit incoming traces from upstream sources.
traceID128Bit bool
+
+ observer otobserver.Observer
}
// TracerOption allows for functional options.
@@ -231,6 +234,7 @@ func NewTracer(recorder SpanRecorder, options ...TracerOption) (opentracing.Trac
debugMode: false,
traceID128Bit: false,
maxLogsPerSpan: 10000,
+ observer: nil,
}
for _, o := range options {
err := o(opts)
@@ -289,6 +293,11 @@ func (t *tracerImpl) startSpanWithOptions(
// Build the new span. This is the only allocation: We'll return this as
// an opentracing.Span.
sp := t.getSpan()
+
+ if t.options.observer != nil {
+ sp.observer, _ = t.options.observer.OnStartSpan(sp, operationName, opts)
+ }
+
// Look for a parent in the list of References.
//
// TODO: would be nice if basictracer did something with all
@@ -379,6 +388,7 @@ func (t *tracerImpl) startSpanInternal(
sp.raw.Start = startTime
sp.raw.Duration = -1
sp.raw.Tags = tags
+
if t.options.debugAssertSingleGoroutine {
sp.SetTag(debugGoroutineIDTag, curGoroutineID())
}
@@ -420,3 +430,11 @@ func (t *tracerImpl) Extract(format interface{}, carrier interface{}) (opentraci
func (t *tracerImpl) Options() TracerOptions {
return t.options
}
+
+// WithObserver assigns an initialized observer to opts.observer
+func WithObserver(observer otobserver.Observer) TracerOption {
+ return func(opts *TracerOptions) error {
+ opts.observer = observer
+ return nil
+ }
+}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/gen.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/gen.go
index 86242a9fe..0eb355bab 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/gen.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/gen.go
@@ -1,6 +1,6 @@
package wire
-//go:generate protoc --gogofaster_out=$GOPATH/src/github.com/openzipkin/zipkin-go-opentracing/wire wire.proto
+//go:generate protoc --gogofaster_out=$GOPATH/src wire.proto
// Run `go get github.com/gogo/protobuf/protoc-gen-gogofaster` to install the
// gogofaster generator binary.
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go
index df2c11989..9aa7b2c90 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.pb.go
@@ -624,24 +624,26 @@ var (
func init() { proto.RegisterFile("wire.proto", fileDescriptorWire) }
var fileDescriptorWire = []byte{
- // 300 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xcf, 0x2c, 0x4a,
- 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xa9, 0xca, 0x2c, 0xc8, 0xce, 0xcc, 0x2b, 0x29,
- 0x4a, 0x4c, 0x4e, 0x2d, 0x8a, 0x4f, 0xcf, 0xd7, 0x03, 0xc9, 0x29, 0x5d, 0x63, 0xe2, 0xe2, 0x0e,
- 0x01, 0x0b, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x49, 0x72, 0x71, 0x80, 0x55, 0xc4, 0x67, 0xa6,
- 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0xb1, 0x83, 0xf9, 0x9e, 0x29, 0x42, 0xe2, 0x5c, 0xec,
- 0xc5, 0x05, 0x89, 0x79, 0x20, 0x19, 0x26, 0xb0, 0x0c, 0x1b, 0x88, 0xeb, 0x99, 0x22, 0x24, 0xc1,
- 0xc5, 0x5e, 0x9c, 0x98, 0x5b, 0x90, 0x93, 0x9a, 0x22, 0xc1, 0xac, 0xc0, 0xa8, 0xc1, 0x11, 0x04,
- 0xe3, 0x0a, 0x45, 0x70, 0xf1, 0x26, 0x25, 0xa6, 0xa7, 0x27, 0xa6, 0xa7, 0xc6, 0x67, 0x96, 0xa4,
- 0xe6, 0x16, 0x4b, 0xb0, 0x28, 0x30, 0x6b, 0x70, 0x1b, 0x19, 0xeb, 0x61, 0x73, 0x8b, 0x1e, 0x92,
- 0x3b, 0xf4, 0x9c, 0x20, 0xda, 0x3c, 0x41, 0xba, 0x5c, 0xf3, 0x4a, 0x8a, 0x2a, 0x83, 0x78, 0x92,
- 0x90, 0x84, 0x84, 0x94, 0xb8, 0x78, 0x61, 0xee, 0x8c, 0xcf, 0xc8, 0x4c, 0xcf, 0x90, 0x10, 0x01,
- 0x3b, 0x89, 0x1b, 0xea, 0x58, 0x8f, 0xcc, 0xf4, 0x0c, 0x21, 0x15, 0x2e, 0xbe, 0x82, 0xc4, 0xa2,
- 0xd4, 0xbc, 0x92, 0x78, 0x98, 0xbb, 0x45, 0xc1, 0x8a, 0x78, 0x20, 0xa2, 0xc1, 0x10, 0xd7, 0x8b,
- 0x70, 0xb1, 0xa6, 0xe5, 0x24, 0xa6, 0x17, 0x4b, 0x88, 0x81, 0x25, 0x21, 0x1c, 0x29, 0x7b, 0x2e,
- 0x41, 0x0c, 0x27, 0x08, 0x09, 0x70, 0x31, 0x67, 0xa7, 0x56, 0x82, 0xc3, 0x85, 0x33, 0x08, 0xc4,
- 0x04, 0x69, 0x2e, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0x87, 0x08, 0x67, 0x10, 0x84, 0x63, 0xc5, 0x64,
- 0xc1, 0xe8, 0x24, 0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31,
- 0x4e, 0x78, 0x2c, 0xc7, 0x10, 0xc5, 0x02, 0xf2, 0x64, 0x12, 0x1b, 0x38, 0x36, 0x8c, 0x01, 0x01,
- 0x00, 0x00, 0xff, 0xff, 0xb5, 0x5e, 0x0d, 0x33, 0x9b, 0x01, 0x00, 0x00,
+ // 325 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x91, 0xcf, 0x4a, 0x03, 0x31,
+ 0x18, 0xc4, 0x4d, 0xab, 0xfd, 0xf3, 0xb5, 0x15, 0x0d, 0x55, 0x57, 0x0f, 0x4b, 0x29, 0x1e, 0x7a,
+ 0xe9, 0x56, 0xec, 0x45, 0xbc, 0x08, 0x05, 0xc1, 0x5e, 0xb7, 0x1e, 0xc4, 0xcb, 0x92, 0xed, 0xc6,
+ 0x6c, 0x68, 0x9b, 0x84, 0x6c, 0xaa, 0xd4, 0xa7, 0xf0, 0xb1, 0x3c, 0x7a, 0xf2, 0x2c, 0xf5, 0x45,
+ 0x24, 0x89, 0x85, 0x82, 0x9e, 0x76, 0x67, 0xe6, 0x1b, 0xf8, 0x31, 0x01, 0x78, 0xe1, 0x9a, 0x46,
+ 0x4a, 0x4b, 0x23, 0x71, 0xfb, 0x95, 0xab, 0x19, 0x17, 0x46, 0x93, 0x29, 0xd5, 0x09, 0x93, 0x91,
+ 0xcd, 0xba, 0x9f, 0x25, 0x68, 0xdc, 0x3b, 0x6b, 0x62, 0x88, 0xa1, 0xf8, 0x14, 0x6a, 0xee, 0x22,
+ 0xe1, 0x59, 0x80, 0x3a, 0xa8, 0x57, 0x89, 0xab, 0x4e, 0x8f, 0x33, 0x7c, 0x02, 0xd5, 0x42, 0x11,
+ 0x61, 0x93, 0x92, 0x4b, 0x2a, 0x56, 0x8e, 0x33, 0x1c, 0x40, 0xb5, 0x20, 0x0b, 0x35, 0xa7, 0x59,
+ 0x50, 0xee, 0xa0, 0x5e, 0x2d, 0xde, 0x48, 0xfc, 0x00, 0xad, 0x94, 0x30, 0x46, 0x18, 0x4d, 0xb8,
+ 0xa1, 0x8b, 0x22, 0xd8, 0xed, 0x94, 0x7b, 0x8d, 0xcb, 0x61, 0xf4, 0x1f, 0x4b, 0xb4, 0xc5, 0x11,
+ 0x8d, 0x7c, 0x6d, 0x6c, 0x5b, 0xb7, 0xc2, 0xe8, 0x55, 0xdc, 0x4c, 0xb7, 0x2c, 0xdc, 0x85, 0xd6,
+ 0x86, 0x33, 0xc9, 0x39, 0xcb, 0x83, 0xb6, 0x43, 0x6a, 0xfc, 0xc2, 0xde, 0x71, 0x96, 0xe3, 0x73,
+ 0xd8, 0x57, 0x44, 0x53, 0x61, 0x92, 0x0d, 0xf7, 0x91, 0x3b, 0x6a, 0x7a, 0x77, 0xe2, 0xe9, 0xdb,
+ 0xb0, 0xf7, 0x34, 0x27, 0xac, 0x08, 0x8e, 0x5d, 0xe8, 0xc5, 0xd9, 0x0d, 0x1c, 0xfe, 0x41, 0xc0,
+ 0x07, 0x50, 0x9e, 0xd1, 0x95, 0xdb, 0xa5, 0x1e, 0xdb, 0x5f, 0x5b, 0x7e, 0x26, 0xf3, 0x25, 0x75,
+ 0x8b, 0xd4, 0x63, 0x2f, 0xae, 0x4b, 0x57, 0x68, 0x34, 0x7a, 0x5f, 0x87, 0xe8, 0x63, 0x1d, 0xa2,
+ 0xaf, 0x75, 0x88, 0xde, 0xbe, 0xc3, 0x9d, 0xc7, 0x0b, 0xc6, 0x4d, 0xbe, 0x4c, 0xa3, 0xa9, 0x5c,
+ 0x0c, 0xa4, 0xa2, 0xc2, 0x6f, 0x30, 0xf0, 0x9f, 0x3e, 0x93, 0x7d, 0x6b, 0x5a, 0x7e, 0x2e, 0xd8,
+ 0xc0, 0x0e, 0x92, 0x56, 0xdc, 0xcb, 0x0d, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3a, 0xab, 0xcc,
+ 0x6b, 0xc7, 0x01, 0x00, 0x00,
}
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto
index 7fa01d45f..df425d5b5 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/wire/wire.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
package zipkintracer_go.wire;
-option go_package = "wire";
+option go_package = "github.com/openzipkin/zipkin-go-opentracing/wire";
message TracerState {
fixed64 trace_id = 1;
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-endpoint.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-endpoint.go
index 30f49fc11..e06ca4cbc 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-endpoint.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-endpoint.go
@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
// makeEndpoint takes the hostport and service name that represent this Zipkin
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
index a889011a0..4b293c823 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
@@ -3,7 +3,6 @@ package zipkintracer
import (
"encoding/binary"
"fmt"
- "math"
"net"
"strconv"
"time"
@@ -11,8 +10,8 @@ import (
otext "github.com/opentracing/opentracing-go/ext"
"github.com/opentracing/opentracing-go/log"
- "github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore"
"github.com/openzipkin/zipkin-go-opentracing/flag"
+ "github.com/openzipkin/zipkin-go-opentracing/thrift/gen-go/zipkincore"
)
var (
@@ -202,86 +201,17 @@ func annotate(span *zipkincore.Span, timestamp time.Time, value string, host *zi
// annotateBinary annotates the span with a key and a value that will be []byte
// encoded.
func annotateBinary(span *zipkincore.Span, key string, value interface{}, host *zipkincore.Endpoint) {
- var a zipkincore.AnnotationType
- var b []byte
- // We are not using zipkincore.AnnotationType_I16 for types that could fit
- // as reporting on it seems to be broken on the zipkin web interface
- // (however, we can properly extract the number from zipkin storage
- // directly). int64 has issues with negative numbers but seems ok for
- // positive numbers needing more than 32 bit.
- switch v := value.(type) {
- case bool:
- a = zipkincore.AnnotationType_BOOL
- b = []byte("\x00")
- if v {
- b = []byte("\x01")
+ if b, ok := value.(bool); ok {
+ if b {
+ value = "true"
+ } else {
+ value = "false"
}
- case []byte:
- a = zipkincore.AnnotationType_BYTES
- b = v
- case byte:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int8:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int16:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint16:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int32:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint32:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, v)
- case int64:
- a = zipkincore.AnnotationType_I64
- b = make([]byte, 8)
- binary.BigEndian.PutUint64(b, uint64(v))
- case int:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 8)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 8)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint64:
- a = zipkincore.AnnotationType_I64
- b = make([]byte, 8)
- binary.BigEndian.PutUint64(b, v)
- case float32:
- a = zipkincore.AnnotationType_DOUBLE
- b = make([]byte, 8)
- bits := math.Float64bits(float64(v))
- binary.BigEndian.PutUint64(b, bits)
- case float64:
- a = zipkincore.AnnotationType_DOUBLE
- b = make([]byte, 8)
- bits := math.Float64bits(v)
- binary.BigEndian.PutUint64(b, bits)
- case string:
- a = zipkincore.AnnotationType_STRING
- b = []byte(v)
- default:
- // we have no handler for type's value, but let's get a string
- // representation of it.
- a = zipkincore.AnnotationType_STRING
- b = []byte(fmt.Sprintf("%+v", value))
}
span.BinaryAnnotations = append(span.BinaryAnnotations, &zipkincore.BinaryAnnotation{
Key: key,
- Value: b,
- AnnotationType: a,
+ Value: []byte(fmt.Sprintf("%+v", value)),
+ AnnotationType: zipkincore.AnnotationType_STRING,
Host: host,
})
}
diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go
index 22bb30ccd..aed2b1f01 100644
--- a/vendor/golang.org/x/crypto/ssh/cipher.go
+++ b/vendor/golang.org/x/crypto/ssh/cipher.go
@@ -304,7 +304,7 @@ type gcmCipher struct {
buf []byte
}
-func newGCMCipher(iv, key, macKey []byte) (packetCipher, error) {
+func newGCMCipher(iv, key []byte) (packetCipher, error) {
c, err := aes.NewCipher(key)
if err != nil {
return nil, err
diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go
index e7404ff49..02dad484e 100644
--- a/vendor/golang.org/x/crypto/ssh/terminal/util.go
+++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go
@@ -17,44 +17,41 @@
package terminal // import "golang.org/x/crypto/ssh/terminal"
import (
- "syscall"
- "unsafe"
-
"golang.org/x/sys/unix"
)
// State contains the state of a terminal.
type State struct {
- termios syscall.Termios
+ termios unix.Termios
}
// IsTerminal returns true if the given file descriptor is a terminal.
func IsTerminal(fd int) bool {
- var termios syscall.Termios
- _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
- return err == 0
+ _, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
+ return err == nil
}
// MakeRaw put the terminal connected to the given file descriptor into raw
// mode and returns the previous state of the terminal so that it can be
// restored.
func MakeRaw(fd int) (*State, error) {
- var oldState State
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 {
+ termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
+ if err != nil {
return nil, err
}
- newState := oldState.termios
+ oldState := State{termios: *termios}
+
// This attempts to replicate the behaviour documented for cfmakeraw in
// the termios(3) manpage.
- newState.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON
- newState.Oflag &^= syscall.OPOST
- newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN
- newState.Cflag &^= syscall.CSIZE | syscall.PARENB
- newState.Cflag |= syscall.CS8
- newState.Cc[unix.VMIN] = 1
- newState.Cc[unix.VTIME] = 0
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 {
+ termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON
+ termios.Oflag &^= unix.OPOST
+ termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN
+ termios.Cflag &^= unix.CSIZE | unix.PARENB
+ termios.Cflag |= unix.CS8
+ termios.Cc[unix.VMIN] = 1
+ termios.Cc[unix.VTIME] = 0
+ if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil {
return nil, err
}
@@ -64,59 +61,55 @@ func MakeRaw(fd int) (*State, error) {
// GetState returns the current state of a terminal which may be useful to
// restore the terminal after a signal.
func GetState(fd int) (*State, error) {
- var oldState State
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 {
+ termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
+ if err != nil {
return nil, err
}
- return &oldState, nil
+ return &State{termios: *termios}, nil
}
// Restore restores the terminal connected to the given file descriptor to a
// previous state.
func Restore(fd int, state *State) error {
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0); err != 0 {
- return err
- }
- return nil
+ return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios)
}
// GetSize returns the dimensions of the given terminal.
func GetSize(fd int) (width, height int, err error) {
- var dimensions [4]uint16
-
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0); err != 0 {
+ ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)
+ if err != nil {
return -1, -1, err
}
- return int(dimensions[1]), int(dimensions[0]), nil
+ return int(ws.Col), int(ws.Row), nil
}
// passwordReader is an io.Reader that reads from a specific file descriptor.
type passwordReader int
func (r passwordReader) Read(buf []byte) (int, error) {
- return syscall.Read(int(r), buf)
+ return unix.Read(int(r), buf)
}
// ReadPassword reads a line of input from a terminal without local echo. This
// is commonly used for inputting passwords and other sensitive data. The slice
// returned does not include the \n.
func ReadPassword(fd int) ([]byte, error) {
- var oldState syscall.Termios
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0); err != 0 {
+ termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
+ if err != nil {
return nil, err
}
- newState := oldState
- newState.Lflag &^= syscall.ECHO
- newState.Lflag |= syscall.ICANON | syscall.ISIG
- newState.Iflag |= syscall.ICRNL
- if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 {
+ newState := *termios
+ newState.Lflag &^= unix.ECHO
+ newState.Lflag |= unix.ICANON | unix.ISIG
+ newState.Iflag |= unix.ICRNL
+ if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil {
return nil, err
}
defer func() {
- syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0)
+ unix.IoctlSetTermios(fd, ioctlWriteTermios, termios)
}()
return readPasswordLine(passwordReader(fd))
diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go
index f9780e0ae..ab2b88765 100644
--- a/vendor/golang.org/x/crypto/ssh/transport.go
+++ b/vendor/golang.org/x/crypto/ssh/transport.go
@@ -254,7 +254,7 @@ func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (pac
iv, key, macKey := generateKeys(d, algs, kex)
if algs.Cipher == gcmCipherID {
- return newGCMCipher(iv, key, macKey)
+ return newGCMCipher(iv, key)
}
if algs.Cipher == aes128cbcID {
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 4ddd4ff5d..2db9e0adc 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -421,6 +421,7 @@ ccflags="$@"
$2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^(VM|VMADDR)_/ ||
+ $2 ~ /^IOCTL_VM_SOCKETS_/ ||
$2 ~ /^(TASKSTATS|TS)_/ ||
$2 ~ /^GENL_/ ||
$2 ~ /^UTIME_/ ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 25eeada15..49c65ea61 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -130,6 +130,45 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
return ENOSYS
}
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
/*
* Exposed directly
*/
@@ -230,7 +269,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
// Getlogin
// Sigpending
// Sigaltstack
-// Ioctl
// Reboot
// Execve
// Vfork
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 4455effd8..914680952 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -55,7 +55,6 @@ func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
}
func nametomib(name string) (mib []_C_int, err error) {
-
// Split name into components.
var parts []string
last := 0
@@ -129,6 +128,45 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
return ENOSYS
}
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
/*
* Exposed directly
*/
@@ -389,7 +427,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
// getitimer
// getvfsstat
// getxattr
-// ioctl
// ktrace
// lchflags
// lchmod
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 215819672..0bda73c38 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -32,7 +32,6 @@ type SockaddrDatalink struct {
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func nametomib(name string) (mib []_C_int, err error) {
-
// Perform lookup via a binary search
left := 0
right := len(sysctlMib) - 1
@@ -107,6 +106,45 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
return ENOSYS
}
+//sys ioctl(fd int, req uint, arg uintptr) (err error)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req uint, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+func IoctlSetTermios(fd int, req uint, value *Termios) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+func IoctlGetInt(fd int, req uint) (int, error) {
+ var value int
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+ var value Winsize
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+ var value Termios
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
+ return &value, err
+}
+
/*
* Exposed directly
*/
@@ -227,7 +265,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error {
// getresuid
// getrtable
// getthrid
-// ioctl
// ktrace
// lfs_bmapv
// lfs_markv
diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go
index 78ce32a90..46d7da96d 100644
--- a/vendor/golang.org/x/sys/unix/types_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go
@@ -242,6 +242,8 @@ type BpfHdr C.struct_bpf_hdr
type Termios C.struct_termios
+type Winsize C.struct_winsize
+
// fchmodat-like syscalls.
const (
diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go
index 9097245a2..7ff50bc84 100644
--- a/vendor/golang.org/x/sys/unix/types_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/types_netbsd.go
@@ -228,6 +228,8 @@ type BpfTimeval C.struct_bpf_timeval
type Termios C.struct_termios
+type Winsize C.struct_winsize
+
// fchmodat-like syscalls.
const (
diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go
index 44ea7c028..837b514dc 100644
--- a/vendor/golang.org/x/sys/unix/types_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/types_openbsd.go
@@ -244,6 +244,8 @@ type BpfTimeval C.struct_bpf_timeval
type Termios C.struct_termios
+type Winsize C.struct_winsize
+
// fchmodat-like syscalls.
const (
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
index ac581f3d5..c90ebcf7a 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go
@@ -510,6 +510,7 @@ const (
F_PATHPKG_CHECK = 0x34
F_PEOFPOSMODE = 0x3
F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
F_RDADVISE = 0x2c
F_RDAHEAD = 0x2d
F_RDLCK = 0x1
@@ -526,6 +527,7 @@ const (
F_SINGLE_WRITER = 0x4c
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
F_UNLCK = 0x2
F_VOLPOSMODE = 0x4
F_WRLCK = 0x3
@@ -766,6 +768,7 @@ const (
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x300
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -856,6 +859,7 @@ const (
IP_RECVOPTS = 0x5
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
IP_RECVTTL = 0x18
IP_RETOPTS = 0x8
IP_RF = 0x8000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 2ba407a73..899194864 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -510,6 +510,7 @@ const (
F_PATHPKG_CHECK = 0x34
F_PEOFPOSMODE = 0x3
F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
F_RDADVISE = 0x2c
F_RDAHEAD = 0x2d
F_RDLCK = 0x1
@@ -526,6 +527,7 @@ const (
F_SINGLE_WRITER = 0x4c
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
F_UNLCK = 0x2
F_VOLPOSMODE = 0x4
F_WRLCK = 0x3
@@ -766,6 +768,7 @@ const (
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x300
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -856,6 +859,7 @@ const (
IP_RECVOPTS = 0x5
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
IP_RECVTTL = 0x18
IP_RETOPTS = 0x8
IP_RF = 0x8000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
index f4a2fde8a..c41a6b879 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go
@@ -510,6 +510,7 @@ const (
F_PATHPKG_CHECK = 0x34
F_PEOFPOSMODE = 0x3
F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
F_RDADVISE = 0x2c
F_RDAHEAD = 0x2d
F_RDLCK = 0x1
@@ -526,6 +527,7 @@ const (
F_SINGLE_WRITER = 0x4c
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
F_UNLCK = 0x2
F_VOLPOSMODE = 0x4
F_WRLCK = 0x3
@@ -766,6 +768,7 @@ const (
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x300
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -856,6 +859,7 @@ const (
IP_RECVOPTS = 0x5
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
IP_RECVTTL = 0x18
IP_RETOPTS = 0x8
IP_RF = 0x8000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index 4c2e696a0..73f8c8784 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -510,6 +510,7 @@ const (
F_PATHPKG_CHECK = 0x34
F_PEOFPOSMODE = 0x3
F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
F_RDADVISE = 0x2c
F_RDAHEAD = 0x2d
F_RDLCK = 0x1
@@ -526,6 +527,7 @@ const (
F_SINGLE_WRITER = 0x4c
F_THAW_FS = 0x36
F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
F_UNLCK = 0x2
F_VOLPOSMODE = 0x4
F_WRLCK = 0x3
@@ -766,6 +768,7 @@ const (
IPV6_FAITH = 0x1d
IPV6_FLOWINFO_MASK = 0xffffff0f
IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x300
IPV6_FRAGTTL = 0x3c
IPV6_FW_ADD = 0x1e
IPV6_FW_DEL = 0x1f
@@ -856,6 +859,7 @@ const (
IP_RECVOPTS = 0x5
IP_RECVPKTINFO = 0x1a
IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
IP_RECVTTL = 0x18
IP_RETOPTS = 0x8
IP_RF = 0x8000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index bb8a7724b..8947248f6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index cf0b2249f..4083cb2a8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 57cfcf3fe..27d38352b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index b6e5b090e..69ad31470 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -625,6 +625,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 0113e1f6a..d131a4cc5 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 6857657a5..62dd20352 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 14f7e0e05..dc8e56e30 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index f795862d8..906766254 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 2544c4b63..f6ca82c71 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 133bdf584..ddd256254 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index b921fb17a..fc304a68f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -623,6 +623,7 @@ const (
IN_OPEN = 0x20
IN_Q_OVERFLOW = 0x4000
IN_UNMOUNT = 0x2000
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
IPPROTO_AH = 0x33
IPPROTO_BEETPH = 0x5e
IPPROTO_COMP = 0x6c
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
index 9fb1b31f4..763ae4fbb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go
@@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 1e0fb46b0..d6808e072 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
index e1026a88a..6ae95e6b9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go
@@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
@@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 37fb210a0..ca6a7ea8b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Madvise(b []byte, behav int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
@@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index 75761477d..2ed340fd1 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -423,6 +423,16 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index cfdea854f..04a1ace9d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -406,6 +406,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index 244a3c761..079824a71 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -406,6 +406,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index e891adc3a..05f8b496a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -406,6 +406,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index f48beb091..3b55544df 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -404,6 +404,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 44a3faf77..cdaf4ef4c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -404,6 +404,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 1563752dd..6c4dc8a9f 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -404,6 +404,16 @@ func getdents(fd int, buf []byte) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
index 2786773ba..d1d36da3f 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go
@@ -1,5 +1,5 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
+// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
// +build 386,darwin
@@ -121,13 +121,15 @@ const (
SYS_CSOPS = 169
SYS_CSOPS_AUDITTOKEN = 170
SYS_WAITID = 173
+ SYS_KDEBUG_TYPEFILTER = 177
+ SYS_KDEBUG_TRACE_STRING = 178
SYS_KDEBUG_TRACE64 = 179
SYS_KDEBUG_TRACE = 180
SYS_SETGID = 181
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
- SYS_CHUD = 185
+ SYS_THREAD_SELFCOUNTS = 186
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
@@ -278,7 +280,6 @@ const (
SYS_KQUEUE = 362
SYS_KEVENT = 363
SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
SYS_BSDTHREAD_REGISTER = 366
SYS_WORKQ_OPEN = 367
SYS_WORKQ_KERNRETURN = 368
@@ -287,6 +288,8 @@ const (
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
+ SYS_KEVENT_QOS = 374
+ SYS_KEVENT_ID = 375
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
@@ -298,11 +301,8 @@ const (
SYS___MAC_GET_FD = 388
SYS___MAC_SET_FD = 389
SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
+ SYS_PSELECT = 394
+ SYS_PSELECT_NOCANCEL = 395
SYS_READ_NOCANCEL = 396
SYS_WRITE_NOCANCEL = 397
SYS_OPEN_NOCANCEL = 398
@@ -351,6 +351,7 @@ const (
SYS_GUARDED_CLOSE_NP = 442
SYS_GUARDED_KQUEUE_NP = 443
SYS_CHANGE_FDGUARD_NP = 444
+ SYS_USRCTL = 445
SYS_PROC_RLIMIT_CONTROL = 446
SYS_CONNECTX = 447
SYS_DISCONNECTX = 448
@@ -367,6 +368,7 @@ const (
SYS_COALITION_INFO = 459
SYS_NECP_MATCH_POLICY = 460
SYS_GETATTRLISTBULK = 461
+ SYS_CLONEFILEAT = 462
SYS_OPENAT = 463
SYS_OPENAT_NOCANCEL = 464
SYS_RENAMEAT = 465
@@ -392,7 +394,43 @@ const (
SYS_GUARDED_WRITE_NP = 485
SYS_GUARDED_PWRITE_NP = 486
SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAME_EXT = 488
+ SYS_RENAMEATX_NP = 488
SYS_MREMAP_ENCRYPTED = 489
- SYS_MAXSYSCALL = 490
+ SYS_NETAGENT_TRIGGER = 490
+ SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
+ SYS_MICROSTACKSHOT = 492
+ SYS_GRAB_PGO_DATA = 493
+ SYS_PERSONA = 494
+ SYS_WORK_INTERVAL_CTL = 499
+ SYS_GETENTROPY = 500
+ SYS_NECP_OPEN = 501
+ SYS_NECP_CLIENT_ACTION = 502
+ SYS___NEXUS_OPEN = 503
+ SYS___NEXUS_REGISTER = 504
+ SYS___NEXUS_DEREGISTER = 505
+ SYS___NEXUS_CREATE = 506
+ SYS___NEXUS_DESTROY = 507
+ SYS___NEXUS_GET_OPT = 508
+ SYS___NEXUS_SET_OPT = 509
+ SYS___CHANNEL_OPEN = 510
+ SYS___CHANNEL_GET_INFO = 511
+ SYS___CHANNEL_SYNC = 512
+ SYS___CHANNEL_GET_OPT = 513
+ SYS___CHANNEL_SET_OPT = 514
+ SYS_ULOCK_WAIT = 515
+ SYS_ULOCK_WAKE = 516
+ SYS_FCLONEFILEAT = 517
+ SYS_FS_SNAPSHOT = 518
+ SYS_TERMINATE_WITH_PAYLOAD = 520
+ SYS_ABORT_WITH_PAYLOAD = 521
+ SYS_NECP_SESSION_OPEN = 522
+ SYS_NECP_SESSION_ACTION = 523
+ SYS_SETATTRLISTAT = 524
+ SYS_NET_QOS_GUIDELINE = 525
+ SYS_FMOUNT = 526
+ SYS_NTP_ADJTIME = 527
+ SYS_NTP_GETTIME = 528
+ SYS_OS_FAULT_WITH_PAYLOAD = 529
+ SYS_MAXSYSCALL = 530
+ SYS_INVALID = 63
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
index 09de240c8..e35de4145 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go
@@ -1,5 +1,5 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h
-// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
+// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
// +build amd64,darwin
@@ -121,13 +121,15 @@ const (
SYS_CSOPS = 169
SYS_CSOPS_AUDITTOKEN = 170
SYS_WAITID = 173
+ SYS_KDEBUG_TYPEFILTER = 177
+ SYS_KDEBUG_TRACE_STRING = 178
SYS_KDEBUG_TRACE64 = 179
SYS_KDEBUG_TRACE = 180
SYS_SETGID = 181
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
- SYS_CHUD = 185
+ SYS_THREAD_SELFCOUNTS = 186
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
@@ -278,7 +280,6 @@ const (
SYS_KQUEUE = 362
SYS_KEVENT = 363
SYS_LCHOWN = 364
- SYS_STACK_SNAPSHOT = 365
SYS_BSDTHREAD_REGISTER = 366
SYS_WORKQ_OPEN = 367
SYS_WORKQ_KERNRETURN = 368
@@ -287,6 +288,8 @@ const (
SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
+ SYS_KEVENT_QOS = 374
+ SYS_KEVENT_ID = 375
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
@@ -298,11 +301,8 @@ const (
SYS___MAC_GET_FD = 388
SYS___MAC_SET_FD = 389
SYS___MAC_GET_PID = 390
- SYS___MAC_GET_LCID = 391
- SYS___MAC_GET_LCTX = 392
- SYS___MAC_SET_LCTX = 393
- SYS_SETLCID = 394
- SYS_GETLCID = 395
+ SYS_PSELECT = 394
+ SYS_PSELECT_NOCANCEL = 395
SYS_READ_NOCANCEL = 396
SYS_WRITE_NOCANCEL = 397
SYS_OPEN_NOCANCEL = 398
@@ -351,6 +351,7 @@ const (
SYS_GUARDED_CLOSE_NP = 442
SYS_GUARDED_KQUEUE_NP = 443
SYS_CHANGE_FDGUARD_NP = 444
+ SYS_USRCTL = 445
SYS_PROC_RLIMIT_CONTROL = 446
SYS_CONNECTX = 447
SYS_DISCONNECTX = 448
@@ -367,6 +368,7 @@ const (
SYS_COALITION_INFO = 459
SYS_NECP_MATCH_POLICY = 460
SYS_GETATTRLISTBULK = 461
+ SYS_CLONEFILEAT = 462
SYS_OPENAT = 463
SYS_OPENAT_NOCANCEL = 464
SYS_RENAMEAT = 465
@@ -392,7 +394,43 @@ const (
SYS_GUARDED_WRITE_NP = 485
SYS_GUARDED_PWRITE_NP = 486
SYS_GUARDED_WRITEV_NP = 487
- SYS_RENAME_EXT = 488
+ SYS_RENAMEATX_NP = 488
SYS_MREMAP_ENCRYPTED = 489
- SYS_MAXSYSCALL = 490
+ SYS_NETAGENT_TRIGGER = 490
+ SYS_STACK_SNAPSHOT_WITH_CONFIG = 491
+ SYS_MICROSTACKSHOT = 492
+ SYS_GRAB_PGO_DATA = 493
+ SYS_PERSONA = 494
+ SYS_WORK_INTERVAL_CTL = 499
+ SYS_GETENTROPY = 500
+ SYS_NECP_OPEN = 501
+ SYS_NECP_CLIENT_ACTION = 502
+ SYS___NEXUS_OPEN = 503
+ SYS___NEXUS_REGISTER = 504
+ SYS___NEXUS_DEREGISTER = 505
+ SYS___NEXUS_CREATE = 506
+ SYS___NEXUS_DESTROY = 507
+ SYS___NEXUS_GET_OPT = 508
+ SYS___NEXUS_SET_OPT = 509
+ SYS___CHANNEL_OPEN = 510
+ SYS___CHANNEL_GET_INFO = 511
+ SYS___CHANNEL_SYNC = 512
+ SYS___CHANNEL_GET_OPT = 513
+ SYS___CHANNEL_SET_OPT = 514
+ SYS_ULOCK_WAIT = 515
+ SYS_ULOCK_WAKE = 516
+ SYS_FCLONEFILEAT = 517
+ SYS_FS_SNAPSHOT = 518
+ SYS_TERMINATE_WITH_PAYLOAD = 520
+ SYS_ABORT_WITH_PAYLOAD = 521
+ SYS_NECP_SESSION_OPEN = 522
+ SYS_NECP_SESSION_ACTION = 523
+ SYS_SETATTRLISTAT = 524
+ SYS_NET_QOS_GUIDELINE = 525
+ SYS_FMOUNT = 526
+ SYS_NTP_ADJTIME = 527
+ SYS_NTP_GETTIME = 528
+ SYS_OS_FAULT_WITH_PAYLOAD = 529
+ SYS_MAXSYSCALL = 530
+ SYS_INVALID = 63
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
index 41cb6ed39..f2df27db2 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go
@@ -1,4 +1,4 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
+// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm,darwin
@@ -129,6 +129,7 @@ const (
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
+ SYS_THREAD_SELFCOUNTS = 186
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
@@ -288,6 +289,7 @@ const (
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
SYS_KEVENT_QOS = 374
+ SYS_KEVENT_ID = 375
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
@@ -421,6 +423,14 @@ const (
SYS_FS_SNAPSHOT = 518
SYS_TERMINATE_WITH_PAYLOAD = 520
SYS_ABORT_WITH_PAYLOAD = 521
- SYS_MAXSYSCALL = 522
+ SYS_NECP_SESSION_OPEN = 522
+ SYS_NECP_SESSION_ACTION = 523
+ SYS_SETATTRLISTAT = 524
+ SYS_NET_QOS_GUIDELINE = 525
+ SYS_FMOUNT = 526
+ SYS_NTP_ADJTIME = 527
+ SYS_NTP_GETTIME = 528
+ SYS_OS_FAULT_WITH_PAYLOAD = 529
+ SYS_MAXSYSCALL = 530
SYS_INVALID = 63
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
index 075816c34..969463023 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go
@@ -1,4 +1,4 @@
-// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h
+// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build arm64,darwin
@@ -129,6 +129,7 @@ const (
SYS_SETEGID = 182
SYS_SETEUID = 183
SYS_SIGRETURN = 184
+ SYS_THREAD_SELFCOUNTS = 186
SYS_FDATASYNC = 187
SYS_STAT = 188
SYS_FSTAT = 189
@@ -288,6 +289,7 @@ const (
SYS_THREAD_SELFID = 372
SYS_LEDGER = 373
SYS_KEVENT_QOS = 374
+ SYS_KEVENT_ID = 375
SYS___MAC_EXECVE = 380
SYS___MAC_SYSCALL = 381
SYS___MAC_GET_FILE = 382
@@ -421,6 +423,14 @@ const (
SYS_FS_SNAPSHOT = 518
SYS_TERMINATE_WITH_PAYLOAD = 520
SYS_ABORT_WITH_PAYLOAD = 521
- SYS_MAXSYSCALL = 522
+ SYS_NECP_SESSION_OPEN = 522
+ SYS_NECP_SESSION_ACTION = 523
+ SYS_SETATTRLISTAT = 524
+ SYS_NET_QOS_GUIDELINE = 525
+ SYS_FMOUNT = 526
+ SYS_NTP_ADJTIME = 527
+ SYS_NTP_GETTIME = 528
+ SYS_OS_FAULT_WITH_PAYLOAD = 529
+ SYS_MAXSYSCALL = 530
SYS_INVALID = 63
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
index ab515c3e1..1ca0e3ee0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go
@@ -442,6 +442,13 @@ type Termios struct {
Ospeed uint32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = 0xfffafdcd
AT_SYMLINK_NOFOLLOW = 0x1
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
index dfe446bff..e16c05a8a 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go
@@ -382,6 +382,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x200
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
index 1498c23c2..9c3743561 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go
@@ -389,6 +389,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x200
diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
index d6711ce17..132942318 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go
@@ -387,6 +387,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x200
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index af295c3d0..2cf08bf49 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -440,6 +440,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index ae153e70c..7cfc61f66 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -447,6 +447,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index 35bb6195b..842c59c5c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -433,6 +433,13 @@ type Termios struct {
Ospeed int32
}
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
const (
AT_FDCWD = -0x64
AT_SYMLINK_NOFOLLOW = 0x2
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go
index 0f73c11ba..9c7133cc4 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows_test.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows_test.go
@@ -81,7 +81,7 @@ func TestFormatMessage(t *testing.T) {
buf := make([]uint16, 300)
_, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil)
if err != nil {
- t.Fatal("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err)
+ t.Fatalf("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err)
}
}