diff --git a/Gopkg.lock b/Gopkg.lock index 78ba22f6db1..a4cdf6e97a2 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,37 +2,37 @@ [[projects]] - digest = "1:d1665c44bd5db19aaee18d1b6233c99b0b9a986e8bccb24ef54747547a48027f" + digest = "1:d8ebbd207f3d3266d4423ce4860c9f3794956306ded6c7ba312ecc69cdfbf04c" name = "github.com/PuerkitoBio/purell" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4" version = "v1.1.0" [[projects]] branch = "master" - digest = "1:c739832d67eb1e9cc478a19cc1a1ccd78df0397bf8a32978b759152e205f644b" + digest = "1:8098cd40cd09879efbf12e33bcd51ead4a66006ac802cd563a66c4f3373b9727" name = "github.com/PuerkitoBio/urlesc" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "de5bf2ad457846296e2031421a34e2568e304e35" [[projects]] - digest = "1:64982d65e04905ce370e2e59dcf38c68c2c26fe6b7e550a6e4f7e05196d42803" + digest = "1:90a8a2a653a9b8d07a1e095a6dda29d6d8917014b44726f2aab487937e04a73b" name = "github.com/Shopify/sarama" packages = [ ".", "mocks", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "f7be6aa2bc7b2e38edf816b08b582782194a1c02" version = "v1.16.0" [[projects]] - digest = "1:8515c0ca4381246cf332cee05fc84070bbbb07bd679b639161506ba532f47128" + digest = "1:bad93311d7294e3916fd50a744e5185afcbe64716dde7734353ed0ccf96b6f14" name = "github.com/VividCortex/gohistogram" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "51564d9861991fb0ad0f531c99ef602d0f9866e6" version = "v1.0.0" @@ -40,107 +40,107 @@ digest = "1:f563c51359f64bc448d47183c7a3959f4e76c3bfc7dd040e2dfa84ec124c38fe" name = "github.com/apache/thrift" packages = ["lib/go/thrift"] - pruneopts = "UT" + pruneopts = "NUT" revision = "53dd39833a08ce33582e5ff31fa18bb4735d6731" version = "0.9.3" [[projects]] - digest = "1:320e7ead93de9fd2b0e59b50fd92a4d50c1f8ab455d96bc2eb083267453a9709" + digest = "1:5a23cd3a5496a0b2da7e3b348d14e77b11a210738c398200d7d6f04ea8cf3bd8" name = "github.com/asaskevich/govalidator" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ccb8e960c48f04d6935e72476ae4a51028f9e22f" version = "v9" [[projects]] branch = "master" - digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" + digest = "1:707ebe952a8b3d00b343c01536c79c73771d100f63ec6babeaed5c79e2b8a8dd" name = "github.com/beorn7/perks" packages = ["quantile"] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a771d992973f24aa725d07868b467d1ddfceafb" [[projects]] - digest = "1:4fdffd1724c105db8c394019cfc2444fd23466be04812850506437361ee5de55" + digest = "1:4fb088ed7f384178cfc4552661e280a12ccc93be7f30a1ca994958a61a8e1d13" name = "github.com/bsm/sarama-cluster" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "cf455bc755fe41ac9bb2861e7a961833d9c2ecc3" version = "v2.1.13" [[projects]] branch = "master" - digest = "1:4c4c33075b704791d6a7f09dfb55c66769e8a1dc6adf87026292d274fe8ad113" + digest = "1:8ecb89af7dfe3ac401bdb0c9390b134ef96a97e85f732d2b0604fb7b3977839f" name = "github.com/codahale/hdrhistogram" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a0bb77429bd3a61596f5e8a3172445844342120" [[projects]] branch = "master" - digest = "1:a382acd6150713655ded76ab5fbcbc7924a7808dab4312dda5d1f23dd8ce5277" + digest = "1:b0adc37330921aa4e756b811d1c99cd6ee2a45a8753bf835cfd7527647500571" name = "github.com/crossdock/crossdock-go" packages = [ ".", "assert", "require", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "049aabb0122b03bc9bd30cab8f3f91fb60166361" [[projects]] digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] - pruneopts = "UT" + pruneopts = "NUT" revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" version = "v1.1.1" [[projects]] - digest = "1:1f0c7ab489b407a7f8f9ad16c25a504d28ab461517a971d341388a56156c1bd7" + digest = "1:08143362be979b087c2c1bae5dde986e988d3d5d4dc661727cbe436411b3f33a" name = "github.com/eapache/go-resiliency" packages = ["breaker"] - pruneopts = "UT" + pruneopts = "NUT" revision = "ea41b0fad31007accc7f806884dcdf3da98b79ce" version = "v1.1.0" [[projects]] branch = "master" - digest = "1:79f16588b5576b1b3cd90e48d2374cc9a1a8776862d28d8fd0f23b0e15534967" + digest = "1:d3430c048e919ed27813d20dc65a32d4e3bae3ad05b83700e244a81eaaf48e2a" name = "github.com/eapache/go-xerial-snappy" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "776d5712da21bc4762676d614db1d8a64f4238b0" [[projects]] - digest = "1:444b82bfe35c83bbcaf84e310fb81a1f9ece03edfed586483c869e2c046aef69" + digest = "1:0d36a2b325b9e75f8057f7f9fbe778d348d70ba652cb9335485b69d1a5c4e038" name = "github.com/eapache/queue" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "44cc805cf13205b55f69e14bcb69867d1ae92f98" version = "v1.1.0" [[projects]] - digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" + digest = "1:1b91ae0dc69a41d4c2ed23ea5cffb721ea63f5037ca4b81e6d6771fbb8f45129" name = "github.com/fsnotify/fsnotify" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" version = "v1.4.7" [[projects]] branch = "master" - digest = "1:7fb51688eadf38272411852d7a2b3538c7caff53309abee6c0964a83c00fe69e" + digest = "1:ce0cdcf4a121add67d3c6f7cc08e6233275d0f417852f025b790d35da88fab10" name = "github.com/globalsign/mgo" packages = [ "bson", "internal/json", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "eeefdecb41b842af6dc652aaea4026e8403e62df" [[projects]] - digest = "1:c598a8cefc266a1a0dae50314298326532768ab07b9e6a1b0cd4b26c5a9cf299" + digest = "1:ad610d570a66a738adba29e579d801a8b9825b55bfb10a67b3c80da2e28e48cf" name = "github.com/go-kit/kit" packages = [ "metrics", @@ -148,55 +148,55 @@ "metrics/generic", "metrics/internal/lv", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "a9ca6725cbbea455e61c6bc8a1ed28e81eb3493b" version = "v0.5.0" [[projects]] - digest = "1:c49164b7b1e34324258ae61deef2cba7912005ba9cb7a9ee4930fe6bdfec7b5d" + digest = "1:da40b9e5973892e2bd37a72c36464b8252a4034522925d920983edaabda03693" name = "github.com/go-openapi/analysis" packages = [ ".", "internal", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "c701774f4e604d952e4e8c56dee260be696e33c3" version = "v0.17.2" [[projects]] - digest = "1:ac4b35a4bba11edb2110fca0707bae03ae92fbd8222e6b483465d98efaabfb97" + digest = "1:02356188d2100454319fc9f17e956bf6db7abd0fd66fef602ffa17d7ceb2808b" name = "github.com/go-openapi/errors" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d9664f9fab8994271e573ed69cf2adfc09b7a800" version = "v0.17.2" [[projects]] - digest = "1:953a2628e4c5c72856b53f5470ed5e071c55eccf943d798d42908102af2a610f" + digest = "1:260f7ebefc63024c8dfe2c9f1a2935a89fa4213637a1f522f592f80c001cc441" name = "github.com/go-openapi/jsonpointer" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ef5f0afec364d3b9396b7b77b43dbe26bf1f8004" version = "v0.17.2" [[projects]] - digest = "1:81210e0af657a0fb3638932ec68e645236bceefa4c839823db0c4d918f080895" + digest = "1:98abd61947ff5c7c6fcfec5473d02a4821ed3a2dd99a4fbfdb7925b0dd745546" name = "github.com/go-openapi/jsonreference" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "8483a886a90412cd6858df4ea3483dce9c8e35a3" version = "v0.17.2" [[projects]] - digest = "1:ff04019588fc028ac28c3c565ce5316461a4641df197555041ee66cf45d213e3" + digest = "1:cc4186672d13bce6e14f7b39c6f51b2f8c5126532a020ced03841e7175886651" name = "github.com/go-openapi/loads" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "2a2b323bab96e6b1fdee110e57d959322446e9c9" version = "0.16.0" [[projects]] - digest = "1:47260ededff90d53b84a66578963639d7fd3e5a9cdc672dbcc7847af794339d2" + digest = "1:a630cba9cb07e32082bf314f5c13e5906cf557c04db3351aed7314255131616d" name = "github.com/go-openapi/runtime" packages = [ ".", @@ -207,45 +207,45 @@ "middleware/untyped", "security", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "231d7876b7019dbcbfc97a7ba764379497b67c1d" version = "v0.17.2" [[projects]] - digest = "1:394fed5c0425fe01da3a34078adaa1682e4deaea6e5d232dde25c4034004c151" + digest = "1:dfab391de021809e0041f0ab5648da6b74dd16a685472a1b8c3dc06b3dca1ee2" name = "github.com/go-openapi/spec" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "5bae59e25b21498baea7f9d46e9c147ec106a42e" version = "v0.17.2" [[projects]] - digest = "1:ffa79f4705a3a85f2412d2d163c37acdf60d128c679e641c323a5de712e23d27" + digest = "1:76667bb6bc2df5b95be9efb9ee0b72b3550c639f530232a0b8fcf3347035d987" name = "github.com/go-openapi/strfmt" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "edab9990ffc9b4a428f3306ecf4d18a069ca3317" version = "v0.17.2" [[projects]] - digest = "1:32f3d2e7f343de7263c550d696fb8a64d3c49d8df16b1ddfc8e80e1e4b3233ce" + digest = "1:983f95b2fae6fe8fdd361738325ed6090f4f3bd15ce4db745e899fb5b0fdfc46" name = "github.com/go-openapi/swag" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "5899d5c5e619fda5fa86e14795a835f473ca284c" version = "v0.17.2" [[projects]] - digest = "1:58541fddf3f4ec485710f1b346e7f647baf09a878a604e47e3668c600fe44076" + digest = "1:7d7626b94bc5e04d1c23eaa97816181f4ff6218540a6d43379070d6ece9ca467" name = "github.com/go-openapi/validate" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d2eab7d93009e9215fc85b2faa2c2f2a98c2af48" version = "v0.17.2" [[projects]] branch = "master" - digest = "1:1a5f28249f1a5b118994359a1c7b8c53ee1ff47aa7fe65884fbd20cd237001f4" + digest = "1:c7981274f5866a0c444474d1eec4a2862fae27ad606fc3636c72542bd47ced6f" name = "github.com/gocql/gocql" packages = [ ".", @@ -253,19 +253,19 @@ "internal/murmur", "internal/streams", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "70385f88b28b43805bd83d212169ab2d38810b15" [[projects]] - digest = "1:38f3de2fa45b2e412a87b79d803fd1242f098b8add8c95cb8b25ecb53ad4c043" + digest = "1:54d5c6a784a9de9c836fc070d51d0689c3e99ee6d24dba8a36f0762039dae830" name = "github.com/gogo/googleapis" packages = ["google/api"] - pruneopts = "UT" + pruneopts = "T" revision = "8558fb44d2f1fc223118afc694129d2c2d2924d1" version = "v1.1.0" [[projects]] - digest = "1:35621fe20f140f05a0c4ef662c26c0ab4ee50bca78aa30fe87d33120bd28165e" + digest = "1:da39f4a22829ca95e63566208e0ea42d6f055f41dff1b14fdab88d88f62df653" name = "github.com/gogo/protobuf" packages = [ "gogoproto", @@ -275,12 +275,12 @@ "sortkeys", "types", ] - pruneopts = "UT" + pruneopts = "T" revision = "636bf0302bc95575d69441b25a2603156ffdddf1" version = "v1.1.1" [[projects]] - digest = "1:fa5e9e1af8a8645086811ec5ab003806026babc57c8bb3a6f7e1ab34b80e2ff1" + digest = "1:9b117ac202b9de210a7093bca0c29d0d2424e4c9235c9e025ae0d6ef6b121c82" name = "github.com/golang/protobuf" packages = [ "jsonpb", @@ -292,44 +292,44 @@ "ptypes/struct", "ptypes/timestamp", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5" version = "v1.2.0" [[projects]] branch = "master" - digest = "1:4a0c6bb4805508a6287675fac876be2ac1182539ca8a32468d8128882e9d5009" + digest = "1:7f114b78210bf5b75f307fc97cff293633c835bab1e0ea8a744a44b39c042dfe" name = "github.com/golang/snappy" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a" [[projects]] - digest = "1:c79fb010be38a59d657c48c6ba1d003a8aa651fa56b579d959d74573b7dff8e1" + digest = "1:c01767916c59f084bb7c41a7d5877c0f3099b1595cfa066e84ec6ad6b084dd89" name = "github.com/gorilla/context" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "08b5f424b9271eedf6f9f0ce86cb9396ed337a42" version = "v1.1.1" [[projects]] - digest = "1:bdde4c5680027035091a29ceef113a5fef59295682c97c29e5f673276e9a55d8" + digest = "1:ce99f0fa341de71caf89941d6c58e6b6473f841f590d5e3679eadf8c88e9ee56" name = "github.com/gorilla/handlers" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3a5767ca75ece5f7f1440b1d16975247f8d8b221" version = "v1.2" [[projects]] - digest = "1:099bdd0a1b3a8f20c016e5e4c7c0eb717ec21fab7537633ce7088d7dece2dde6" + digest = "1:4f53b8f09786fc66f1c57754d6509cea6dd546167be9c881a9185af8895d71ae" name = "github.com/gorilla/mux" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "392c28fe23e1c45ddba891b0320b3b5df220beea" version = "v1.3.0" [[projects]] - digest = "1:d0f4b7935eec1d68994aaa55773fca3e5c1fdaa7898a45d966efde76f471156e" + digest = "1:c4a0b2286ccdfcb4575e19c2bab20d4972ba7fce2ed7cba0941c168708b96f54" name = "github.com/grpc-ecosystem/grpc-gateway" packages = [ "protoc-gen-swagger/options", @@ -337,20 +337,39 @@ "runtime/internal", "utilities", ] - pruneopts = "UT" + pruneopts = "T" revision = "aeab1d96e0f1368d243e2e5f526aa29d495517bb" version = "v1.5.1" [[projects]] branch = "master" - digest = "1:364b908b9b27b97ab838f2f6f1b1f46281fa29b978a037d72a9b1d4f6d940190" + digest = "1:414b0b85f897039eb35308a0f7f1beaf16c073cfdc6fccd325ddd8a7f7dca7a3" name = "github.com/hailocab/go-hostpool" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "e80d13ce29ede4452c43dea11e79b9bc8a15b478" [[projects]] - digest = "1:c0d19ab64b32ce9fe5cf4ddceba78d5bc9807f0016db6b1183599da3dcc24d10" + branch = "master" + digest = "1:26159b03ea04b155cb70d071c32bf599f0519548f8724be87df85fe8fd0a33a3" + name = "github.com/hashicorp/go-hclog" + packages = ["."] + pruneopts = "NUT" + revision = "61d530d6c27f994fb6c83b80f99a69c54125ec8a" + +[[projects]] + branch = "master" + digest = "1:8c38df748ea4cf82f8a5185eb3e6292a1047b76c90c8c8e8b924451e043ba7e4" + name = "github.com/hashicorp/go-plugin" + packages = [ + ".", + "internal/proto", + ] + pruneopts = "NUT" + revision = "f444068e8f5a19853177f7aa0aea7e7d95b5b528" + +[[projects]] + digest = "1:11c6c696067d3127ecf332b10f89394d386d9083f82baf71f40f2da31841a009" name = "github.com/hashicorp/hcl" packages = [ ".", @@ -364,39 +383,47 @@ "json/scanner", "json/token", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "8cb6e5b959231cc1119e43259c4a608f9c51a241" version = "v1.0.0" [[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" + branch = "master" + digest = "1:8deb0c5545c824dfeb0ac77ab8eb67a3d541eab76df5c85ce93064ef02d44cd0" + name = "github.com/hashicorp/yamux" + packages = ["."] + pruneopts = "NUT" + revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675" + +[[projects]] + digest = "1:406338ad39ab2e37b7f4452906442a3dbf0eb3379dd1f06aafb5c07e769a5fbb" name = "github.com/inconshreveable/mousetrap" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] - digest = "1:ca955a9cd5b50b0f43d2cc3aeb35c951473eeca41b34eb67507f1dbcc0542394" + digest = "1:7b21c7fc5551b46d1308b4ffa9e9e49b66c7a8b0ba88c0130474b0e7a20d859f" name = "github.com/kr/pretty" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "73f6ac0b30a98e433b289500d779f50c1a6f0712" version = "v0.1.0" [[projects]] - digest = "1:15b5cc79aad436d47019f814fde81a10221c740dc8ddf769221a65097fb6c2e9" + digest = "1:c3a7836b5904db0f8b609595b619916a6831cb35b8b714aec39f96d00c6155d8" name = "github.com/kr/text" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "e2ffdb16a802fe2bb95e2e35ff34f0e53aeef34f" version = "v0.1.0" [[projects]] - digest = "1:c568d7727aa262c32bdf8a3f7db83614f7af0ed661474b24588de635c20024c7" + digest = "1:d244f8666a838fe6ad70ec8fe77f50ebc29fdc3331a2729ba5886bef8435d10d" name = "github.com/magiconair/properties" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c2353362d570a7bfa228149c62842019201cfb71" version = "v1.8.0" @@ -409,69 +436,85 @@ "jlexer", "jwriter", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "60711f1a8329503b04e1c88535f419d0bb440bff" [[projects]] - digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" + digest = "1:5985ef4caf91ece5d54817c11ea25f182697534f8ae6521eadcd628c142ac4b6" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] - pruneopts = "UT" + pruneopts = "NUT" revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" version = "v1.0.1" [[projects]] - digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318" + digest = "1:18b773b92ac82a451c1276bd2776c1e55ce057ee202691ab33c8d6690efcc048" + name = "github.com/mitchellh/go-testing-interface" + packages = ["."] + pruneopts = "NUT" + revision = "6d0b8010fcc857872e42fc6c931227569016843c" + version = "v1.0.0" + +[[projects]] + digest = "1:a45ae66dea4c899d79fceb116accfa1892105c251f0dcd9a217ddc276b42ec68" name = "github.com/mitchellh/mapstructure" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe" version = "v1.1.2" +[[projects]] + digest = "1:3b517122f3aad1ecce45a630ea912b3092b4729f25532a911d0cb2935a1f9352" + name = "github.com/oklog/run" + packages = ["."] + pruneopts = "NUT" + revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39" + version = "v1.0.0" + [[projects]] branch = "master" digest = "1:51fb21c0dd1b64d5ae74c34f544e312ee73edd2a258db6347369014b5949f44a" name = "github.com/opentracing-contrib/go-stdlib" packages = ["nethttp"] - pruneopts = "UT" + pruneopts = "NUT" revision = "c9628a4f0148d7e441a4af66dc0b1653cd941c20" [[projects]] - digest = "1:450b7623b185031f3a456801155c8320209f75d0d4c4e633c6b1e59d44d6e392" + digest = "1:7da29c22bcc5c2ffb308324377dc00b5084650348c2799e573ed226d8cc9faf0" name = "github.com/opentracing/opentracing-go" packages = [ ".", "ext", "log", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" version = "v1.0.2" [[projects]] - digest = "1:95741de3af260a92cc5c7f3f3061e85273f5a81b5db20d4bd68da74bd521675e" + digest = "1:51ea800cff51752ff68e12e04106f5887b4daec6f9356721238c28019f0b42db" name = "github.com/pelletier/go-toml" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194" version = "v1.2.0" [[projects]] - digest = "1:e39a5ee8fcbec487f8fc68863ef95f2b025e0739b0e4aa55558a2b4cf8f0ecf0" + digest = "1:1d920dce8e11bfff65b5709e883a8ece131b63a5bc4b2cd404f9ef7eb445f73f" name = "github.com/pierrec/lz4" packages = [ ".", "internal/xxh32", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "635575b42742856941dbc767b44905bb9ba083f6" version = "v2.0.7" [[projects]] - digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" + digest = "1:5cf3f025cbee5951a4ee961de067c8a89fc95a5adabead774f82822efabab121" name = "github.com/pkg/errors" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" @@ -479,18 +522,18 @@ digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] - pruneopts = "UT" + pruneopts = "NUT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] - digest = "1:d14a5f4bfecf017cb780bdde1b6483e5deb87e12c332544d2c430eda58734bcb" + digest = "1:03bca087b180bf24c4f9060775f137775550a0834e18f0bca0520a868679dbd7" name = "github.com/prometheus/client_golang" packages = [ "prometheus", "prometheus/promhttp", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "c5b7fccd204277076155f10851dad72b76a49317" version = "v0.8.0" @@ -499,24 +542,24 @@ digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] - pruneopts = "UT" + pruneopts = "NUT" revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" [[projects]] branch = "master" - digest = "1:db712fde5d12d6cdbdf14b777f0c230f4ff5ab0be8e35b239fc319953ed577a4" + digest = "1:06375f3b602de9c99fa99b8484f0e949fd5273e6e9c6592b5a0dd4cd9085f3ea" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", "model", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "4724e9255275ce38f7179b2478abeae4e28c904f" [[projects]] branch = "master" - digest = "1:d39e7c7677b161c2dd4c635a2ac196460608c7d8ba5337cc8cae5825a2681f8f" + digest = "1:102dea0c03a915acfc634b7c67f2662012b5483b56d9025e33f5188e112759b6" name = "github.com/prometheus/procfs" packages = [ ".", @@ -524,86 +567,86 @@ "nfs", "xfs", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1dc9a6cbc91aacc3e8b2d63db4d2e957a5394ac4" [[projects]] digest = "1:ea0700160aca4ef099f4e06686a665a87691f4248dddd40796925eda2e46bd64" name = "github.com/rakyll/statik" packages = ["fs"] - pruneopts = "UT" + pruneopts = "NUT" revision = "1355192d24db2566a83c3914e187e2a7e7679832" version = "v0.1.5" [[projects]] branch = "master" - digest = "1:d38f81081a389f1466ec98192cf9115a82158854d6f01e1c23e2e7554b97db71" + digest = "1:120b256a4d3cd2946ffa4b87102731c2f004aed6d836dc2fba400ed9398696e7" name = "github.com/rcrowley/go-metrics" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3113b8401b8a98917cde58f8bbd42a1b1c03b1fd" [[projects]] - digest = "1:6a4a11ba764a56d2758899ec6f3848d24698d48442ebce85ee7a3f63284526cd" + digest = "1:330e9062b308ac597e28485699c02223bd052437a6eed32a173c9227dcb9d95a" name = "github.com/spf13/afero" packages = [ ".", "mem", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "d40851caa0d747393da1ffb28f7f9d8b4eeffebd" version = "v1.1.2" [[projects]] - digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" + digest = "1:c5e6b121ef3d2043505edaf4c80e5a008cec2513dc8804795eb0479d1555bcf7" name = "github.com/spf13/cast" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "8c9545af88b134710ab1cd196795e7f2388358d7" version = "v1.3.0" [[projects]] - digest = "1:645cabccbb4fa8aab25a956cbcbdf6a6845ca736b2c64e197ca7cbb9d210b939" + digest = "1:343d44e06621142ab09ae0c76c1799104cdfddd3ffb445d78b1adf8dc3ffaf3d" name = "github.com/spf13/cobra" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "ef82de70bb3f60c65fb8eebacbb2d122ef517385" version = "v0.0.3" [[projects]] - digest = "1:68ea4e23713989dc20b1bded5d9da2c5f9be14ff9885beef481848edd18c26cb" + digest = "1:f29f83301ed096daed24a90f4af591b7560cb14b9cc3e1827abbf04db7269ab5" name = "github.com/spf13/jwalterweatherman" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "4a4406e478ca629068e7768fc33f3f044173c0a6" version = "v1.0.0" [[projects]] - digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" + digest = "1:9d8420bbf131d1618bde6530af37c3799340d3762cc47210c1d9532a4c3a2779" name = "github.com/spf13/pflag" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "298182f68c66c05229eb03ac171abe6e309ee79a" version = "v1.0.3" [[projects]] - digest = "1:34c2a71c3317bd76711f66330d7846597bea8cd26c9df5bfd4603d156503e1bf" + digest = "1:d12d5b3af1a59b158e074068eccc0ded9b9c399091ebe0b70507b46a72a7fc77" name = "github.com/spf13/viper" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "41cd1c3aa32b2685fae6c296e6f044bc68922c0e" version = "v1.3.0" [[projects]] - digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" + digest = "1:60a46e2410edbf02b419f833372dd1d24d7aa1b916a990a7370e792fada1eadd" name = "github.com/stretchr/objx" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" version = "v0.1.1" [[projects]] - digest = "1:131cbf301e1846f83658887188efbf97a6331095f53588b60525667e40f28f4c" + digest = "1:8376c0ff082913a631477205de033ca20aeb502319a8a19b759a1867570184ac" name = "github.com/stretchr/testify" packages = [ "assert", @@ -611,20 +654,20 @@ "mock", "require", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" version = "v1.2.1" [[projects]] - digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" + digest = "1:22f696cee54865fb8e9ff91df7b633f6b8f22037a8015253c6b6a71ca82219c7" name = "github.com/uber-go/atomic" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" version = "v1.3.2" [[projects]] - digest = "1:473fbf1a56c0b116352cbaaa7e3b6d012fbfe5b00194341a8c3ffd1de5fb74ff" + digest = "1:3eb7e4307e197a995396634cc87870c2189aefec4e338a6c7ee74837f9d7fefe" name = "github.com/uber/jaeger-client-go" packages = [ ".", @@ -647,7 +690,7 @@ "transport/zipkin", "utils", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1a782e2da844727691fef1757c72eb190c2909f0" version = "v2.15.0" @@ -663,12 +706,12 @@ "metrics/prometheus", "metrics/testutils", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "ed3a127ec5fef7ae9ea95b01b542c47fbd999ce5" version = "v1.5.0" [[projects]] - digest = "1:9c231161ce5a181c5782f73f443933b928b631d988f705dafc070f83aa79f4e9" + digest = "1:f7dcdb21001852b64f48eea1eda86e699eee381dbb168d61dfe6a2dd69465aab" name = "github.com/uber/tchannel-go" packages = [ ".", @@ -683,28 +726,28 @@ "trand", "typed", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "1a0e35378f6f721bc07f6c4466bc9701ed70b506" version = "v1.1.0" [[projects]] - digest = "1:3c1a69cdae3501bf75e76d0d86dc6f2b0a7421bc205c0cb7b96b19eed464a34d" + digest = "1:22f696cee54865fb8e9ff91df7b633f6b8f22037a8015253c6b6a71ca82219c7" name = "go.uber.org/atomic" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289" version = "v1.3.2" [[projects]] - digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a" + digest = "1:58ca93bdf81bac106ded02226b5395a0595d5346cdc4caa8d9c1f3a5f8f9976e" name = "go.uber.org/multierr" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" version = "v1.1.0" [[projects]] - digest = "1:29f5757129c68d0f5c3ee78bf7ff2967259c52798a494fea010b1bfa83324f92" + digest = "1:a739f2c8e7f5ea57038c4d0a60d209d828b0ef756a9e49c7e6849fe73ec97014" name = "go.uber.org/zap" packages = [ ".", @@ -717,13 +760,13 @@ "zaptest", "zaptest/observer", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982" version = "v1.9.1" [[projects]] branch = "master" - digest = "1:29fe5460430a338b64f4a0259a6c59a1e2350bbcff54fa66f906fa8d10515c4d" + digest = "1:fe6c7d45580996cb78fa1e5eb1eadc9422c20ff0ca93a3862bd151f91ec6f240" name = "golang.org/x/net" packages = [ "context", @@ -735,19 +778,19 @@ "internal/timeseries", "trace", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "351d144fa1fc0bd934e2408202be0c29f25e35a0" [[projects]] branch = "master" - digest = "1:9399de11945e643d7131cf070736122b76800d92d57a80494bd9a4e73e6979f3" + digest = "1:ed2e112f90e562e29a28c19801e8306c83efc3dbd6be76d55bd767d152cb72b5" name = "golang.org/x/sys" packages = ["unix"] - pruneopts = "UT" + pruneopts = "NUT" revision = "70b957f3b65e069b4930ea94e2721eefa0f8f695" [[projects]] - digest = "1:0c56024909189aee3364b7f21a95a27459f718aa7c199a5c111c36cfffd9eaef" + digest = "1:e33513a825fcd765e97b5de639a2f7547542d1a8245df0cef18e1fd390b778a9" name = "golang.org/x/text" packages = [ "collate", @@ -766,7 +809,7 @@ "unicode/rangetable", "width", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" version = "v0.3.0" @@ -775,11 +818,11 @@ digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] - pruneopts = "UT" + pruneopts = "NUT" revision = "bd91e49a0898e27abb88c339b432fa53d7497ac0" [[projects]] - digest = "1:977794f3a0427850b6f4cb87cb88869a1833cb9e3f8867938c87434e422b7aa0" + digest = "1:cf02868d74414ddc47a8859b706e47e7641cdfced08f5a7c39c9369a08267246" name = "google.golang.org/grpc" packages = [ ".", @@ -793,6 +836,8 @@ "encoding/proto", "grpclb/grpc_lb_v1/messages", "grpclog", + "health", + "health/grpc_health_v1", "internal", "keepalive", "metadata", @@ -808,7 +853,7 @@ "test/bufconn", "transport", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "afc05b9e1d36f289ea16ba294894486a3e458246" version = "v1.11.0" @@ -816,27 +861,27 @@ digest = "1:2d1fbdc6777e5408cabeb02bf336305e724b925ff4546ded0fa8715a7267922a" name = "gopkg.in/inf.v0" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" version = "v0.9.1" [[projects]] - digest = "1:6847cc3dadcf84c757776d3aee7d635eefb97830dcae5aa4ec9f912073e062ab" + digest = "1:be950f632c30e58eeaf02bafeae71770e1bd7f12270f048b247771a172a8586e" name = "gopkg.in/olivere/elastic.v5" packages = [ ".", "config", "uritemplates", ] - pruneopts = "UT" + pruneopts = "NUT" revision = "171ce647da4acfb30ffc99981d66d80bdea6bcee" version = "v5.0.53" [[projects]] - digest = "1:73e6fda93622790d2371344759df06ff5ff2fac64a6b6e8832b792e7402956e7" + digest = "1:13e704c08924325be00f96e47e7efe0bfddf0913cdfc237423c83f9b183ff590" name = "gopkg.in/yaml.v2" packages = ["."] - pruneopts = "UT" + pruneopts = "NUT" revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" version = "v2.0.0" @@ -870,6 +915,8 @@ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options", "github.com/grpc-ecosystem/grpc-gateway/runtime", "github.com/grpc-ecosystem/grpc-gateway/utilities", + "github.com/hashicorp/go-hclog", + "github.com/hashicorp/go-plugin", "github.com/kr/pretty", "github.com/opentracing-contrib/go-stdlib/nethttp", "github.com/opentracing/opentracing-go", diff --git a/Gopkg.toml b/Gopkg.toml index 056dc1b6088..551dadb3223 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -116,3 +116,17 @@ [prune] go-tests = true unused-packages = true + non-go = true + + [[prune.project]] + name = "github.com/gogo/protobuf" + non-go = false + unused-packages = false + [[prune.project]] + name = "github.com/grpc-ecosystem/grpc-gateway" + non-go = false + unused-packages = false + [[prune.project]] + name = "github.com/gogo/googleapis" + non-go = false + unused-packages = false \ No newline at end of file diff --git a/Makefile b/Makefile index 64ddb0086e6..2382f072ace 100644 --- a/Makefile +++ b/Makefile @@ -323,9 +323,11 @@ PROTO_INCLUDES := \ -I model/proto \ -I vendor/github.com/grpc-ecosystem/grpc-gateway \ -I vendor/github.com/gogo/googleapis \ + -I vendor/github.com/gogo/protobuf/protobuf \ -I vendor/github.com/gogo/protobuf # Remapping of std types to gogo types (must not contain spaces) PROTO_GOGO_MAPPINGS := $(shell echo \ + Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types, \ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types, \ @@ -386,3 +388,15 @@ proto-install: ./vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger # ./vendor/github.com/mwitkow/go-proto-validators/protoc-gen-govalidators \ # ./vendor/github.com/rakyll/statik + +.PHONY: plugin-proto +plugin-proto: + protoc \ + -I model/proto \ + -I vendor/github.com/grpc-ecosystem/grpc-gateway \ + -I vendor/github.com/gogo/googleapis \ + -I vendor/github.com/gogo/protobuf/protobuf \ + -I vendor/github.com/gogo/protobuf \ + -I plugin/storage/grpc/proto \ + --gogo_out=plugins=grpc,$(PROTO_GOGO_MAPPINGS):$(PWD)/plugin/storage/grpc/proto \ + plugin/storage/grpc/proto/storage.proto \ No newline at end of file diff --git a/cmd/noop-grpc-plugin/load_test.go b/cmd/noop-grpc-plugin/load_test.go new file mode 100644 index 00000000000..35a872c50e3 --- /dev/null +++ b/cmd/noop-grpc-plugin/load_test.go @@ -0,0 +1,75 @@ +package main + +import ( + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics/prometheus" + "go.uber.org/zap" + "testing" + "time" +) + +var logger = zap.NewNop() + +func BenchmarkNoopSpanWriter(b *testing.B) { + s := &noopStore{} + + for n := 0; n < b.N; n++ { + s.WriteSpan(&model.Span{ + TraceID:model.NewTraceID(1, 2), + SpanID:model.NewSpanID(1), + OperationName: "test", + StartTime: time.Now(), + Duration: 1 * time.Second, + Process: model.NewProcess("process", []model.KeyValue{ + + }), + ProcessID: "process_id", + Tags: []model.KeyValue{ + { + Key:"test", + VStr: "", + }, + }, + }) + } +} + +func BenchmarkGRPCNoopSpanWriter(b *testing.B) { + v := viper.New() + + v.Set("grpc-storage-plugin.binary", "noop-grpc-plugin") + + f := grpc.NewFactory() + f.InitFromViper(v) + + metricsFactory := prometheus.New() + + f.Initialize( metricsFactory, logger) + + sw, err := f.CreateSpanWriter() + if err != nil { + b.Fatal(err) + } + + for n := 0; n < b.N; n++ { + sw.WriteSpan(&model.Span{ + TraceID:model.NewTraceID(1, 2), + SpanID:model.NewSpanID(1), + OperationName: "test", + StartTime: time.Now(), + Duration: 1 * time.Second, + Process: model.NewProcess("process", []model.KeyValue{ + + }), + ProcessID: "process_id", + Tags: []model.KeyValue{ + { + Key:"test", + VStr: "", + }, + }, + }) + } +} diff --git a/cmd/noop-grpc-plugin/main.go b/cmd/noop-grpc-plugin/main.go new file mode 100644 index 00000000000..ffa82e4b98b --- /dev/null +++ b/cmd/noop-grpc-plugin/main.go @@ -0,0 +1,92 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package main + +import ( + "context" + "flag" + "github.com/hashicorp/go-plugin" + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/plugin/storage/memory" + "github.com/jaegertracing/jaeger/storage/spanstore" + "github.com/spf13/viper" + "path" + "strings" + "time" +) + +var configPath string + +func main() { + flag.StringVar(&configPath, "config", "", "A path to the plugin's configuration file") + flag.Parse() + + if configPath != "" { + viper.SetConfigFile(path.Base(configPath)) + viper.AddConfigPath(path.Dir(configPath)) + } + + v := viper.New() + v.AutomaticEnv() + v.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_")) + + opts := memory.Options{} + opts.InitFromViper(v) + + plugin.Serve(&plugin.ServeConfig{ + HandshakeConfig: shared.Handshake, + VersionedPlugins: map[int]plugin.PluginSet{ + 1: map[string]plugin.Plugin{ + shared.StoragePluginIdentifier: &shared.StorageGRPCPlugin{ + Impl: &noopStore{}, + }, + }, + }, + GRPCServer: plugin.DefaultGRPCServer, + }) +} + +type noopStore struct { + +} + +func (*noopStore) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + return nil, nil +} + +func (*noopStore) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + return nil, nil +} + +func (*noopStore) GetServices(ctx context.Context) ([]string, error) { + return nil, nil +} + +func (*noopStore) GetOperations(ctx context.Context, service string) ([]string, error) { + return nil, nil +} + +func (*noopStore) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + return nil,nil +} + +func (*noopStore) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + return nil, nil +} + +func (*noopStore) WriteSpan(span *model.Span) error { + return nil +} diff --git a/model/model.pb.go b/model/model.pb.go index a2877bd5feb..3437bb82161 100644 --- a/model/model.pb.go +++ b/model/model.pb.go @@ -15,6 +15,7 @@ Span Trace Batch + DependencyLink */ package model @@ -393,6 +394,38 @@ func (m *Batch) GetProcess() *Process { return nil } +type DependencyLink struct { + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + Child string `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` + CallCount uint64 `protobuf:"varint,3,opt,name=call_count,json=callCount,proto3" json:"call_count,omitempty"` +} + +func (m *DependencyLink) Reset() { *m = DependencyLink{} } +func (m *DependencyLink) String() string { return proto.CompactTextString(m) } +func (*DependencyLink) ProtoMessage() {} +func (*DependencyLink) Descriptor() ([]byte, []int) { return fileDescriptorModel, []int{7} } + +func (m *DependencyLink) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *DependencyLink) GetChild() string { + if m != nil { + return m.Child + } + return "" +} + +func (m *DependencyLink) GetCallCount() uint64 { + if m != nil { + return m.CallCount + } + return 0 +} + func init() { proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") golang_proto.RegisterType((*KeyValue)(nil), "jaeger.api_v2.KeyValue") @@ -410,6 +443,8 @@ func init() { golang_proto.RegisterType((*Trace_ProcessMapping)(nil), "jaeger.api_v2.Trace.ProcessMapping") proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") golang_proto.RegisterType((*Batch)(nil), "jaeger.api_v2.Batch") + proto.RegisterType((*DependencyLink)(nil), "jaeger.api_v2.DependencyLink") + golang_proto.RegisterType((*DependencyLink)(nil), "jaeger.api_v2.DependencyLink") proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) golang_proto.RegisterEnum("jaeger.api_v2.ValueType", ValueType_name, ValueType_value) proto.RegisterEnum("jaeger.api_v2.SpanRefType", SpanRefType_name, SpanRefType_value) @@ -961,6 +996,41 @@ func (m *Batch) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *DependencyLink) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DependencyLink) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Parent) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintModel(dAtA, i, uint64(len(m.Parent))) + i += copy(dAtA[i:], m.Parent) + } + if len(m.Child) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintModel(dAtA, i, uint64(len(m.Child))) + i += copy(dAtA[i:], m.Child) + } + if m.CallCount != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintModel(dAtA, i, uint64(m.CallCount)) + } + return i, nil +} + func encodeVarintModel(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -1148,6 +1218,23 @@ func (m *Batch) Size() (n int) { return n } +func (m *DependencyLink) Size() (n int) { + var l int + _ = l + l = len(m.Parent) + if l > 0 { + n += 1 + l + sovModel(uint64(l)) + } + l = len(m.Child) + if l > 0 { + n += 1 + l + sovModel(uint64(l)) + } + if m.CallCount != 0 { + n += 1 + sovModel(uint64(m.CallCount)) + } + return n +} + func sovModel(x uint64) (n int) { for { n++ @@ -2485,6 +2572,133 @@ func (m *Batch) Unmarshal(dAtA []byte) error { } return nil } +func (m *DependencyLink) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DependencyLink: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DependencyLink: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModel + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Child", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModel + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Child = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CallCount", wireType) + } + m.CallCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModel + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CallCount |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipModel(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthModel + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipModel(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 @@ -2594,62 +2808,66 @@ func init() { proto.RegisterFile("model.proto", fileDescriptorModel) } func init() { golang_proto.RegisterFile("model.proto", fileDescriptorModel) } var fileDescriptorModel = []byte{ - // 905 bytes of a gzipped FileDescriptorProto + // 964 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0xde, 0x49, 0xec, 0xd8, 0x79, 0x49, 0x56, 0xd1, 0x14, 0x58, 0x37, 0xa0, 0x24, 0xa4, 0x42, - 0x0a, 0x55, 0x49, 0xda, 0xd0, 0xee, 0x01, 0x21, 0xa1, 0xba, 0x4b, 0xc0, 0x90, 0xdd, 0xa0, 0xd9, - 0x08, 0x04, 0x17, 0x6b, 0x36, 0x99, 0x18, 0x17, 0xc7, 0x63, 0xd9, 0x5e, 0xa3, 0xdc, 0xf8, 0x09, - 0x88, 0x13, 0x47, 0xb8, 0xf2, 0x2b, 0x38, 0xf6, 0xc8, 0x81, 0x13, 0x12, 0x0b, 0x0a, 0x97, 0xfe, - 0x0c, 0x34, 0xe3, 0x71, 0xb6, 0x1b, 0x2a, 0xd8, 0x5e, 0x38, 0x79, 0x66, 0xde, 0xf7, 0xde, 0x7c, - 0xef, 0x7b, 0x9f, 0x6d, 0xa8, 0xad, 0xf8, 0x82, 0x05, 0x83, 0x28, 0xe6, 0x29, 0xc7, 0x8d, 0xc7, - 0x94, 0x79, 0x2c, 0x1e, 0xd0, 0xc8, 0x77, 0xb3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 0xfd, - 0x3a, 0x31, 0x32, 0x5b, 0x6e, 0xdf, 0x31, 0x9f, 0xfe, 0xd0, 0x41, 0x4f, 0x7f, 0xec, 0xa0, 0xde, - 0x37, 0x08, 0xca, 0x13, 0xee, 0x61, 0x1b, 0xaa, 0x5b, 0x45, 0x64, 0x5f, 0xb5, 0x51, 0x6b, 0x90, - 0x4b, 0x32, 0x28, 0x24, 0x19, 0xcc, 0x0a, 0x84, 0x6d, 0x3e, 0xb9, 0xe8, 0xec, 0x7d, 0xfb, 0x47, - 0x07, 0x91, 0xcb, 0x34, 0xfc, 0x00, 0x2a, 0x4b, 0x9f, 0x05, 0x8b, 0xc4, 0x2a, 0x75, 0xcb, 0xfd, - 0xda, 0xe8, 0x60, 0x47, 0x83, 0x42, 0x3e, 0x5b, 0x13, 0xd9, 0x44, 0x81, 0x7b, 0x3f, 0x21, 0x30, - 0x4e, 0x23, 0x1a, 0x12, 0xb6, 0xc4, 0x0f, 0xc0, 0x4c, 0x63, 0x3a, 0x67, 0xae, 0xbf, 0x90, 0x2c, - 0xea, 0x76, 0x4b, 0x60, 0x7f, 0xbb, 0xe8, 0x18, 0x33, 0x71, 0xee, 0x1c, 0x6d, 0x2e, 0x97, 0xc4, - 0x90, 0x58, 0x67, 0x81, 0xef, 0x81, 0x91, 0x44, 0x34, 0x14, 0x59, 0x25, 0x99, 0x65, 0xa9, 0xac, - 0x8a, 0x28, 0x2c, 0x93, 0xd4, 0x8a, 0x54, 0x04, 0xd0, 0x59, 0x88, 0x9b, 0x62, 0xb6, 0xcc, 0x47, - 0x56, 0x96, 0x23, 0x6b, 0xed, 0xd0, 0x55, 0x9c, 0xe4, 0xd0, 0x8c, 0x38, 0x5f, 0xf4, 0x5c, 0x30, - 0x3e, 0x89, 0xf9, 0x9c, 0x25, 0x09, 0x7e, 0x1d, 0xea, 0x09, 0x8b, 0x33, 0x7f, 0xce, 0xdc, 0x90, - 0xae, 0x98, 0x72, 0x43, 0x4d, 0x9d, 0x9d, 0x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x1f, 0x92, 0x2f, 0x9a, 0xda, 0xed, 0xb7, + 0xa1, 0xfe, 0xdc, 0xf7, 0x0f, 0x37, 0xc0, 0x3c, 0xf8, 0xc8, 0x1d, 0x1e, 0x7a, 0xa3, 0x41, 0x73, + 0x03, 0x37, 0xa1, 0x31, 0x18, 0x0d, 0x87, 0xa3, 0xcf, 0x4f, 0xbc, 0x01, 0x19, 0x1d, 0x35, 0x91, + 0x73, 0xf7, 0xe9, 0x72, 0x07, 0xfd, 0xb2, 0xdc, 0x41, 0x7f, 0x2e, 0x77, 0xd0, 0xcf, 0x7f, 0xed, + 0x20, 0xd8, 0x0e, 0xb8, 0xd2, 0x43, 0x7c, 0x99, 0x82, 0xc8, 0x57, 0xb2, 0x7c, 0xa9, 0xcb, 0x7f, + 0xf6, 0xd3, 0x9a, 0x7c, 0x8b, 0xef, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x4c, 0xe8, 0xe0, + 0xe9, 0x07, 0x00, 0x00, } diff --git a/model/proto/model.proto b/model/proto/model.proto index 3bce8a1ac5a..22e1ff36dd6 100644 --- a/model/proto/model.proto +++ b/model/proto/model.proto @@ -158,3 +158,9 @@ message Batch { (gogoproto.nullable) = true ]; } + +message DependencyLink { + string parent = 1; + string child = 2; + uint64 call_count = 3; +} \ No newline at end of file diff --git a/model/prototest/model_test.pb.go b/model/prototest/model_test.pb.go index 87a1e7dd6fc..3a9c61d7bf1 100644 --- a/model/prototest/model_test.pb.go +++ b/model/prototest/model_test.pb.go @@ -1,20 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: model_test.proto -/* -Package prototest is a generated protocol buffer package. - -It is generated from these files: - model_test.proto - -It has these top-level messages: - SpanRef -*/ package prototest -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -38,6 +31,7 @@ var SpanRefType_name = map[int32]string{ 0: "CHILD_OF", 1: "FOLLOWS_FROM", } + var SpanRefType_value = map[string]int32{ "CHILD_OF": 0, "FOLLOWS_FROM": 1, @@ -46,18 +40,44 @@ var SpanRefType_value = map[string]int32{ func (x SpanRefType) String() string { return proto.EnumName(SpanRefType_name, int32(x)) } -func (SpanRefType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (SpanRefType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7d019f60590a05da, []int{0} +} type SpanRef struct { - TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` - SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` - RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,enum=prototest.SpanRefType" json:"ref_type,omitempty"` + TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` + SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` + RefType SpanRefType `protobuf:"varint,3,opt,name=ref_type,json=refType,proto3,enum=prototest.SpanRefType" json:"ref_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SpanRef) Reset() { *m = SpanRef{} } +func (m *SpanRef) String() string { return proto.CompactTextString(m) } +func (*SpanRef) ProtoMessage() {} +func (*SpanRef) Descriptor() ([]byte, []int) { + return fileDescriptor_7d019f60590a05da, []int{0} } -func (m *SpanRef) Reset() { *m = SpanRef{} } -func (m *SpanRef) String() string { return proto.CompactTextString(m) } -func (*SpanRef) ProtoMessage() {} -func (*SpanRef) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *SpanRef) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SpanRef.Unmarshal(m, b) +} +func (m *SpanRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SpanRef.Marshal(b, m, deterministic) +} +func (m *SpanRef) XXX_Merge(src proto.Message) { + xxx_messageInfo_SpanRef.Merge(m, src) +} +func (m *SpanRef) XXX_Size() int { + return xxx_messageInfo_SpanRef.Size(m) +} +func (m *SpanRef) XXX_DiscardUnknown() { + xxx_messageInfo_SpanRef.DiscardUnknown(m) +} + +var xxx_messageInfo_SpanRef proto.InternalMessageInfo func (m *SpanRef) GetTraceId() []byte { if m != nil { @@ -81,13 +101,13 @@ func (m *SpanRef) GetRefType() SpanRefType { } func init() { - proto.RegisterType((*SpanRef)(nil), "prototest.SpanRef") proto.RegisterEnum("prototest.SpanRefType", SpanRefType_name, SpanRefType_value) + proto.RegisterType((*SpanRef)(nil), "prototest.SpanRef") } -func init() { proto.RegisterFile("model_test.proto", fileDescriptor0) } +func init() { proto.RegisterFile("model_test.proto", fileDescriptor_7d019f60590a05da) } -var fileDescriptor0 = []byte{ +var fileDescriptor_7d019f60590a05da = []byte{ // 178 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcd, 0x4f, 0x49, 0xcd, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x04, 0x53, diff --git a/pkg/grpc/config/config.go b/pkg/grpc/config/config.go new file mode 100644 index 00000000000..b265ea1e6b8 --- /dev/null +++ b/pkg/grpc/config/config.go @@ -0,0 +1,69 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package config + +import ( + "fmt" + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/go-plugin" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "os/exec" + "runtime" +) + +// Configuration describes the options to customize the storage behavior +type Configuration struct { + PluginBinary string `yaml:"binary"` + PluginConfigurationFile string `yaml:"configuration-file"` +} + +func (c *Configuration) Build() (shared.StoragePlugin, error) { + client := plugin.NewClient(&plugin.ClientConfig{ + HandshakeConfig: shared.Handshake, + VersionedPlugins: map[int]plugin.PluginSet{ + 1: shared.PluginMap, + }, + Cmd: exec.Command(c.PluginBinary, "--config", c.PluginConfigurationFile), + AllowedProtocols: []plugin.Protocol{plugin.ProtocolGRPC}, + Logger: hclog.New(&hclog.LoggerOptions{ + Level: hclog.Warn, + }), + }) + + runtime.SetFinalizer(client, func(c *plugin.Client) { + c.Kill() + }) + + rpcClient, err := client.Client() + if err != nil { + return nil, fmt.Errorf("error attempting to connect to plugin rpc client: %s", err) + } + + raw, err := rpcClient.Dispense(shared.StoragePluginIdentifier) + if err != nil { + return nil, fmt.Errorf("unable to retrieve storage plugin instance: %s", err) + } + + storagePlugin, ok := raw.(shared.StoragePlugin) + if !ok { + return nil, fmt.Errorf("unexpected type for plugin \"%s\"", shared.StoragePluginIdentifier) + } + + return storagePlugin, nil +} + +type PluginBuilder interface { + Build() (shared.StoragePlugin, error) +} \ No newline at end of file diff --git a/model/dependencies.go b/pkg/grpc/config/empty_test.go similarity index 68% rename from model/dependencies.go rename to pkg/grpc/config/empty_test.go index c3e5ee56c76..6e632bd9e87 100644 --- a/model/dependencies.go +++ b/pkg/grpc/config/empty_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017 Uber Technologies, Inc. +// Copyright (c) 2018 The Jaeger Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,11 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -package model - -// DependencyLink shows dependencies between services -type DependencyLink struct { - Parent string `json:"parent"` - Child string `json:"child"` - CallCount uint64 `json:"callCount"` -} +package config diff --git a/plugin/storage/factory.go b/plugin/storage/factory.go index bd1c641ebd0..71fa96b1ef2 100644 --- a/plugin/storage/factory.go +++ b/plugin/storage/factory.go @@ -25,6 +25,7 @@ import ( "github.com/jaegertracing/jaeger/plugin" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" "github.com/jaegertracing/jaeger/plugin/storage/es" + "github.com/jaegertracing/jaeger/plugin/storage/grpc" "github.com/jaegertracing/jaeger/plugin/storage/kafka" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" @@ -37,9 +38,10 @@ const ( elasticsearchStorageType = "elasticsearch" memoryStorageType = "memory" kafkaStorageType = "kafka" + grpcPluginStorageType = "grpc-plugin" ) -var allStorageTypes = []string{cassandraStorageType, elasticsearchStorageType, memoryStorageType, kafkaStorageType} +var allStorageTypes = []string{cassandraStorageType, elasticsearchStorageType, memoryStorageType, kafkaStorageType, grpcPluginStorageType} // Factory implements storage.Factory interface as a meta-factory for storage components. type Factory struct { @@ -79,6 +81,8 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.Factory, error) return memory.NewFactory(), nil case kafkaStorageType: return kafka.NewFactory(), nil + case grpcPluginStorageType: + return grpc.NewFactory(), nil default: return nil, fmt.Errorf("Unknown storage type %s. Valid types are %v", factoryType, allStorageTypes) } diff --git a/plugin/storage/grpc/factory.go b/plugin/storage/grpc/factory.go new file mode 100644 index 00000000000..29a928f4e56 --- /dev/null +++ b/plugin/storage/grpc/factory.go @@ -0,0 +1,83 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package grpc + +import ( + "flag" + "github.com/jaegertracing/jaeger/pkg/grpc/config" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/storage/dependencystore" + + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics" + "go.uber.org/zap" + + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +type Factory struct { + options Options + metricsFactory metrics.Factory + logger *zap.Logger + + builder config.PluginBuilder + + store shared.StoragePlugin +} + +// NewFactory creates a new Factory. +func NewFactory() *Factory { + return &Factory{} +} + +// AddFlags implements plugin.Configurable +func (f *Factory) AddFlags(flagSet *flag.FlagSet) { + f.options.AddFlags(flagSet) +} + +// InitFromViper implements plugin.Configurable +func (f *Factory) InitFromViper(v *viper.Viper) { + f.options.InitFromViper(v) + f.builder = &f.options.Configuration +} + +// Initialize implements storage.Factory +func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error { + f.metricsFactory, f.logger = metricsFactory, logger + + store, err := f.builder.Build() + if err != nil { + return err + } + + f.store = store + logger.Info("External plugin storage configuration", zap.Any("configuration", f.options.Configuration)) + return nil +} + +// CreateSpanReader implements storage.Factory +func (f *Factory) CreateSpanReader() (spanstore.Reader, error) { + return f.store, nil +} + +// CreateSpanWriter implements storage.Factory +func (f *Factory) CreateSpanWriter() (spanstore.Writer, error) { + return f.store, nil +} + +// CreateDependencyReader implements storage.Factory +func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { + return f.store, nil +} diff --git a/plugin/storage/grpc/factory_test.go b/plugin/storage/grpc/factory_test.go new file mode 100644 index 00000000000..613fab54b01 --- /dev/null +++ b/plugin/storage/grpc/factory_test.go @@ -0,0 +1,105 @@ +package grpc + +import ( + "context" + "errors" + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/storage/spanstore" + "github.com/spf13/viper" + "github.com/uber/jaeger-lib/metrics" + "go.uber.org/zap" + "testing" + "time" + + "github.com/jaegertracing/jaeger/pkg/config" + "github.com/jaegertracing/jaeger/storage" + "github.com/stretchr/testify/assert" +) + +var _ storage.Factory = new(Factory) + +type mockPluginBuilder struct { + plugin *mockPlugin + err error +} + +func (b *mockPluginBuilder) Build() (shared.StoragePlugin, error) { + if b.err != nil { + return nil, b.err + } + return b.plugin, nil +} + +type mockPlugin struct { + +} + +func (*mockPlugin) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + panic("implement me") +} + +func (*mockPlugin) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + panic("implement me") +} + +func (*mockPlugin) GetServices(ctx context.Context) ([]string, error) { + panic("implement me") +} + +func (*mockPlugin) GetOperations(ctx context.Context, service string) ([]string, error) { + panic("implement me") +} + +func (*mockPlugin) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + panic("implement me") +} + +func (*mockPlugin) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + panic("implement me") +} + +func (*mockPlugin) WriteSpan(span *model.Span) error { + panic("implement me") +} + +func TestGRPCStorageFactory(t *testing.T) { + f := NewFactory() + v := viper.New() + f.InitFromViper(v) + + // after InitFromViper, f.builder points to a real plugin builder that will fail in unit tests, + // so we override it with a mock. + f.builder = &mockPluginBuilder{ + err: errors.New("made-up error"), + } + assert.EqualError(t, f.Initialize(metrics.NullFactory, zap.NewNop()), "made-up error") + + f.builder = &mockPluginBuilder{ + plugin: &mockPlugin{}, + } + assert.NoError(t, f.Initialize(metrics.NullFactory, zap.NewNop())) + + assert.NotNil(t, f.store) + reader, err := f.CreateSpanReader() + assert.NoError(t, err) + assert.Equal(t, f.store, reader) + writer, err := f.CreateSpanWriter() + assert.NoError(t, err) + assert.Equal(t, f.store, writer) + depReader, err := f.CreateDependencyReader() + assert.NoError(t, err) + assert.Equal(t, f.store, depReader) +} + +func TestWithConfiguration(t *testing.T) { + f := NewFactory() + v, command := config.Viperize(f.AddFlags) + command.ParseFlags([]string{ + "--grpc-storage-plugin.binary=noop-grpc-plugin", + "--grpc-storage-plugin.configuration-file=config.json", + }) + f.InitFromViper(v) + assert.Equal(t, f.options.Configuration.PluginBinary, "noop-grpc-plugin") + assert.Equal(t, f.options.Configuration.PluginConfigurationFile, "config.json") +} diff --git a/plugin/storage/grpc/options.go b/plugin/storage/grpc/options.go new file mode 100644 index 00000000000..94917671c45 --- /dev/null +++ b/plugin/storage/grpc/options.go @@ -0,0 +1,39 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package grpc + +import ( + "flag" + "github.com/spf13/viper" + + "github.com/jaegertracing/jaeger/pkg/grpc/config" +) + +const pluginBinary = "grpc-storage-plugin.binary" +const pluginConfigurationFile = "grpc-storage-plugin.configuration-file" + +type Options struct { + Configuration config.Configuration +} + +func (opt *Options) AddFlags(flagSet *flag.FlagSet) { + flagSet.String(pluginBinary, "", "The location of the plugin binary") + flagSet.String(pluginConfigurationFile, "", "A path pointing to the plugin's configuration file, made available to the plugin with the --config arg") +} + +func (opt *Options) InitFromViper(v *viper.Viper) { + opt.Configuration.PluginBinary = v.GetString(pluginBinary) + opt.Configuration.PluginConfigurationFile = v.GetString(pluginConfigurationFile) +} diff --git a/plugin/storage/grpc/options_test.go b/plugin/storage/grpc/options_test.go new file mode 100644 index 00000000000..225849d6891 --- /dev/null +++ b/plugin/storage/grpc/options_test.go @@ -0,0 +1,22 @@ +package grpc + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/jaegertracing/jaeger/pkg/config" +) + +func TestOptionsWithFlags(t *testing.T) { + opts := &Options{} + v, command := config.Viperize(opts.AddFlags) + command.ParseFlags([]string{ + "--grpc-storage-plugin.binary=noop-grpc-plugin", + "--grpc-storage-plugin.configuration-file=config.json", + }) + opts.InitFromViper(v) + + assert.Equal(t, opts.Configuration.PluginBinary, "noop-grpc-plugin") + assert.Equal(t, opts.Configuration.PluginConfigurationFile, "config.json") +} diff --git a/plugin/storage/grpc/plugin.go b/plugin/storage/grpc/plugin.go new file mode 100644 index 00000000000..34da046953b --- /dev/null +++ b/plugin/storage/grpc/plugin.go @@ -0,0 +1,58 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package grpc + +import ( + "context" + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/pkg/grpc/config" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/shared" + "github.com/jaegertracing/jaeger/storage/spanstore" + "time" +) + +type Store struct { + config config.Configuration + + plugin shared.StoragePlugin +} + +func (s *Store) WriteSpan(span *model.Span) error { + return s.plugin.WriteSpan(span) +} + +func (s *Store) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + return s.plugin.GetTrace(ctx, traceID) +} + +func (s *Store) GetServices(ctx context.Context) ([]string, error) { + return s.plugin.GetServices(ctx) +} + +func (s *Store) GetOperations(ctx context.Context, service string) ([]string, error) { + return s.plugin.GetOperations(ctx, service) +} + +func (s *Store) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + return s.plugin.FindTraces(ctx, query) +} + +func (s *Store) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + return s.plugin.FindTraceIDs(ctx, query) +} + +func (s *Store) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + return s.plugin.GetDependencies(endTs, lookback) +} diff --git a/plugin/storage/grpc/proto/storage.pb.go b/plugin/storage/grpc/proto/storage.pb.go new file mode 100644 index 00000000000..480cb5669ce --- /dev/null +++ b/plugin/storage/grpc/proto/storage.pb.go @@ -0,0 +1,5327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: storage.proto + +/* + Package proto is a generated protocol buffer package. + + It is generated from these files: + storage.proto + + It has these top-level messages: + GetDependenciesRequest + GetDependenciesSuccess + GetDependenciesResponse + WriteSpanRequest + WriteSpanResponse + GetTraceRequest + GetTraceSuccess + GetTraceResponse + GetServicesRequest + GetServicesSuccess + GetServicesResponse + GetOperationsRequest + GetOperationsSuccess + GetOperationsResponse + TraceQueryParameters + FindTracesRequest + FindTracesSuccess + FindTracesResponse + FindTraceIDsRequest + FindTraceIDsSuccess + FindTraceIDsResponse + EmptyResponse + StoragePluginError +*/ +package proto + +import proto1 "github.com/gogo/protobuf/proto" +import golang_proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import jaeger_api_v2 "github.com/jaegertracing/jaeger/model" +import _ "github.com/gogo/protobuf/types" +import _ "github.com/gogo/protobuf/types" + +import time "time" +import github_com_jaegertracing_jaeger_model "github.com/jaegertracing/jaeger/model" + +import context "golang.org/x/net/context" +import grpc "google.golang.org/grpc" + +import types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = golang_proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type GetDependenciesRequest struct { + EndTimestamp time.Time `protobuf:"bytes,1,opt,name=end_timestamp,json=endTimestamp,stdtime" json:"end_timestamp"` + Lookback time.Duration `protobuf:"bytes,2,opt,name=lookback,stdduration" json:"lookback"` +} + +func (m *GetDependenciesRequest) Reset() { *m = GetDependenciesRequest{} } +func (m *GetDependenciesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesRequest) ProtoMessage() {} +func (*GetDependenciesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{0} } + +func (m *GetDependenciesRequest) GetEndTimestamp() time.Time { + if m != nil { + return m.EndTimestamp + } + return time.Time{} +} + +func (m *GetDependenciesRequest) GetLookback() time.Duration { + if m != nil { + return m.Lookback + } + return 0 +} + +type GetDependenciesSuccess struct { + Dependencies []github_com_jaegertracing_jaeger_model.DependencyLink `protobuf:"bytes,1,rep,name=dependencies,customtype=github.com/jaegertracing/jaeger/model.DependencyLink" json:"dependencies"` +} + +func (m *GetDependenciesSuccess) Reset() { *m = GetDependenciesSuccess{} } +func (m *GetDependenciesSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesSuccess) ProtoMessage() {} +func (*GetDependenciesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{1} } + +type GetDependenciesResponse struct { + // Types that are valid to be assigned to Response: + // *GetDependenciesResponse_Success + // *GetDependenciesResponse_Error + Response isGetDependenciesResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetDependenciesResponse) Reset() { *m = GetDependenciesResponse{} } +func (m *GetDependenciesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetDependenciesResponse) ProtoMessage() {} +func (*GetDependenciesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{2} } + +type isGetDependenciesResponse_Response interface { + isGetDependenciesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetDependenciesResponse_Success struct { + Success *GetDependenciesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetDependenciesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetDependenciesResponse_Success) isGetDependenciesResponse_Response() {} +func (*GetDependenciesResponse_Error) isGetDependenciesResponse_Response() {} + +func (m *GetDependenciesResponse) GetResponse() isGetDependenciesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetDependenciesResponse) GetSuccess() *GetDependenciesSuccess { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetDependenciesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetDependenciesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetDependenciesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetDependenciesResponse_OneofMarshaler, _GetDependenciesResponse_OneofUnmarshaler, _GetDependenciesResponse_OneofSizer, []interface{}{ + (*GetDependenciesResponse_Success)(nil), + (*GetDependenciesResponse_Error)(nil), + } +} + +func _GetDependenciesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetDependenciesResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetDependenciesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetDependenciesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetDependenciesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetDependenciesSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetDependenciesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetDependenciesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetDependenciesResponse) + // response + switch x := m.Response.(type) { + case *GetDependenciesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetDependenciesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type WriteSpanRequest struct { + Span *jaeger_api_v2.Span `protobuf:"bytes,1,opt,name=span" json:"span,omitempty"` +} + +func (m *WriteSpanRequest) Reset() { *m = WriteSpanRequest{} } +func (m *WriteSpanRequest) String() string { return proto1.CompactTextString(m) } +func (*WriteSpanRequest) ProtoMessage() {} +func (*WriteSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{3} } + +func (m *WriteSpanRequest) GetSpan() *jaeger_api_v2.Span { + if m != nil { + return m.Span + } + return nil +} + +type WriteSpanResponse struct { + // Types that are valid to be assigned to Response: + // *WriteSpanResponse_Success + // *WriteSpanResponse_Error + Response isWriteSpanResponse_Response `protobuf_oneof:"response"` +} + +func (m *WriteSpanResponse) Reset() { *m = WriteSpanResponse{} } +func (m *WriteSpanResponse) String() string { return proto1.CompactTextString(m) } +func (*WriteSpanResponse) ProtoMessage() {} +func (*WriteSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{4} } + +type isWriteSpanResponse_Response interface { + isWriteSpanResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type WriteSpanResponse_Success struct { + Success *EmptyResponse `protobuf:"bytes,1,opt,name=success,oneof"` +} +type WriteSpanResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*WriteSpanResponse_Success) isWriteSpanResponse_Response() {} +func (*WriteSpanResponse_Error) isWriteSpanResponse_Response() {} + +func (m *WriteSpanResponse) GetResponse() isWriteSpanResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *WriteSpanResponse) GetSuccess() *EmptyResponse { + if x, ok := m.GetResponse().(*WriteSpanResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *WriteSpanResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*WriteSpanResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*WriteSpanResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _WriteSpanResponse_OneofMarshaler, _WriteSpanResponse_OneofUnmarshaler, _WriteSpanResponse_OneofSizer, []interface{}{ + (*WriteSpanResponse_Success)(nil), + (*WriteSpanResponse_Error)(nil), + } +} + +func _WriteSpanResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*WriteSpanResponse) + // response + switch x := m.Response.(type) { + case *WriteSpanResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *WriteSpanResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("WriteSpanResponse.Response has unexpected type %T", x) + } + return nil +} + +func _WriteSpanResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*WriteSpanResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(EmptyResponse) + err := b.DecodeMessage(msg) + m.Response = &WriteSpanResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &WriteSpanResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _WriteSpanResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*WriteSpanResponse) + // response + switch x := m.Response.(type) { + case *WriteSpanResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *WriteSpanResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetTraceRequest struct { + TraceID github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` +} + +func (m *GetTraceRequest) Reset() { *m = GetTraceRequest{} } +func (m *GetTraceRequest) String() string { return proto1.CompactTextString(m) } +func (*GetTraceRequest) ProtoMessage() {} +func (*GetTraceRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{5} } + +type GetTraceSuccess struct { + Trace *jaeger_api_v2.Trace `protobuf:"bytes,1,opt,name=trace" json:"trace,omitempty"` +} + +func (m *GetTraceSuccess) Reset() { *m = GetTraceSuccess{} } +func (m *GetTraceSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetTraceSuccess) ProtoMessage() {} +func (*GetTraceSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{6} } + +func (m *GetTraceSuccess) GetTrace() *jaeger_api_v2.Trace { + if m != nil { + return m.Trace + } + return nil +} + +type GetTraceResponse struct { + // Types that are valid to be assigned to Response: + // *GetTraceResponse_Success + // *GetTraceResponse_Error + Response isGetTraceResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetTraceResponse) Reset() { *m = GetTraceResponse{} } +func (m *GetTraceResponse) String() string { return proto1.CompactTextString(m) } +func (*GetTraceResponse) ProtoMessage() {} +func (*GetTraceResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{7} } + +type isGetTraceResponse_Response interface { + isGetTraceResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetTraceResponse_Success struct { + Success *GetTraceSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetTraceResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetTraceResponse_Success) isGetTraceResponse_Response() {} +func (*GetTraceResponse_Error) isGetTraceResponse_Response() {} + +func (m *GetTraceResponse) GetResponse() isGetTraceResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetTraceResponse) GetSuccess() *GetTraceSuccess { + if x, ok := m.GetResponse().(*GetTraceResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetTraceResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetTraceResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetTraceResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetTraceResponse_OneofMarshaler, _GetTraceResponse_OneofUnmarshaler, _GetTraceResponse_OneofSizer, []interface{}{ + (*GetTraceResponse_Success)(nil), + (*GetTraceResponse_Error)(nil), + } +} + +func _GetTraceResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetTraceResponse) + // response + switch x := m.Response.(type) { + case *GetTraceResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetTraceResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetTraceResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetTraceResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetTraceResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetTraceSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetTraceResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetTraceResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetTraceResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetTraceResponse) + // response + switch x := m.Response.(type) { + case *GetTraceResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetTraceResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetServicesRequest struct { +} + +func (m *GetServicesRequest) Reset() { *m = GetServicesRequest{} } +func (m *GetServicesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetServicesRequest) ProtoMessage() {} +func (*GetServicesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{8} } + +type GetServicesSuccess struct { + Services []string `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"` +} + +func (m *GetServicesSuccess) Reset() { *m = GetServicesSuccess{} } +func (m *GetServicesSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetServicesSuccess) ProtoMessage() {} +func (*GetServicesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{9} } + +func (m *GetServicesSuccess) GetServices() []string { + if m != nil { + return m.Services + } + return nil +} + +type GetServicesResponse struct { + // Types that are valid to be assigned to Response: + // *GetServicesResponse_Success + // *GetServicesResponse_Error + Response isGetServicesResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetServicesResponse) Reset() { *m = GetServicesResponse{} } +func (m *GetServicesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetServicesResponse) ProtoMessage() {} +func (*GetServicesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{10} } + +type isGetServicesResponse_Response interface { + isGetServicesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetServicesResponse_Success struct { + Success *GetServicesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetServicesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetServicesResponse_Success) isGetServicesResponse_Response() {} +func (*GetServicesResponse_Error) isGetServicesResponse_Response() {} + +func (m *GetServicesResponse) GetResponse() isGetServicesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetServicesResponse) GetSuccess() *GetServicesSuccess { + if x, ok := m.GetResponse().(*GetServicesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetServicesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetServicesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetServicesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetServicesResponse_OneofMarshaler, _GetServicesResponse_OneofUnmarshaler, _GetServicesResponse_OneofSizer, []interface{}{ + (*GetServicesResponse_Success)(nil), + (*GetServicesResponse_Error)(nil), + } +} + +func _GetServicesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetServicesResponse) + // response + switch x := m.Response.(type) { + case *GetServicesResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetServicesResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetServicesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetServicesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetServicesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetServicesSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetServicesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetServicesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetServicesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetServicesResponse) + // response + switch x := m.Response.(type) { + case *GetServicesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetServicesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type GetOperationsRequest struct { + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` +} + +func (m *GetOperationsRequest) Reset() { *m = GetOperationsRequest{} } +func (m *GetOperationsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsRequest) ProtoMessage() {} +func (*GetOperationsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{11} } + +func (m *GetOperationsRequest) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +type GetOperationsSuccess struct { + Operations []string `protobuf:"bytes,1,rep,name=operations" json:"operations,omitempty"` +} + +func (m *GetOperationsSuccess) Reset() { *m = GetOperationsSuccess{} } +func (m *GetOperationsSuccess) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsSuccess) ProtoMessage() {} +func (*GetOperationsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{12} } + +func (m *GetOperationsSuccess) GetOperations() []string { + if m != nil { + return m.Operations + } + return nil +} + +type GetOperationsResponse struct { + // Types that are valid to be assigned to Response: + // *GetOperationsResponse_Success + // *GetOperationsResponse_Error + Response isGetOperationsResponse_Response `protobuf_oneof:"response"` +} + +func (m *GetOperationsResponse) Reset() { *m = GetOperationsResponse{} } +func (m *GetOperationsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetOperationsResponse) ProtoMessage() {} +func (*GetOperationsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{13} } + +type isGetOperationsResponse_Response interface { + isGetOperationsResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type GetOperationsResponse_Success struct { + Success *GetOperationsSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type GetOperationsResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*GetOperationsResponse_Success) isGetOperationsResponse_Response() {} +func (*GetOperationsResponse_Error) isGetOperationsResponse_Response() {} + +func (m *GetOperationsResponse) GetResponse() isGetOperationsResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *GetOperationsResponse) GetSuccess() *GetOperationsSuccess { + if x, ok := m.GetResponse().(*GetOperationsResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *GetOperationsResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*GetOperationsResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GetOperationsResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _GetOperationsResponse_OneofMarshaler, _GetOperationsResponse_OneofUnmarshaler, _GetOperationsResponse_OneofSizer, []interface{}{ + (*GetOperationsResponse_Success)(nil), + (*GetOperationsResponse_Error)(nil), + } +} + +func _GetOperationsResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*GetOperationsResponse) + // response + switch x := m.Response.(type) { + case *GetOperationsResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *GetOperationsResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("GetOperationsResponse.Response has unexpected type %T", x) + } + return nil +} + +func _GetOperationsResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*GetOperationsResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(GetOperationsSuccess) + err := b.DecodeMessage(msg) + m.Response = &GetOperationsResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &GetOperationsResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _GetOperationsResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*GetOperationsResponse) + // response + switch x := m.Response.(type) { + case *GetOperationsResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *GetOperationsResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TraceQueryParameters struct { + ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + OperationName string `protobuf:"bytes,2,opt,name=operation_name,json=operationName,proto3" json:"operation_name,omitempty"` + Tags map[string]string `protobuf:"bytes,3,rep,name=tags" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StartTimeMin time.Time `protobuf:"bytes,4,opt,name=start_time_min,json=startTimeMin,stdtime" json:"start_time_min"` + StartTimeMax time.Time `protobuf:"bytes,5,opt,name=start_time_max,json=startTimeMax,stdtime" json:"start_time_max"` + DurationMin time.Duration `protobuf:"bytes,6,opt,name=duration_min,json=durationMin,stdduration" json:"duration_min"` + DurationMax time.Duration `protobuf:"bytes,7,opt,name=duration_max,json=durationMax,stdduration" json:"duration_max"` + NumTraces int32 `protobuf:"varint,8,opt,name=num_traces,json=numTraces,proto3" json:"num_traces,omitempty"` +} + +func (m *TraceQueryParameters) Reset() { *m = TraceQueryParameters{} } +func (m *TraceQueryParameters) String() string { return proto1.CompactTextString(m) } +func (*TraceQueryParameters) ProtoMessage() {} +func (*TraceQueryParameters) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{14} } + +func (m *TraceQueryParameters) GetServiceName() string { + if m != nil { + return m.ServiceName + } + return "" +} + +func (m *TraceQueryParameters) GetOperationName() string { + if m != nil { + return m.OperationName + } + return "" +} + +func (m *TraceQueryParameters) GetTags() map[string]string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *TraceQueryParameters) GetStartTimeMin() time.Time { + if m != nil { + return m.StartTimeMin + } + return time.Time{} +} + +func (m *TraceQueryParameters) GetStartTimeMax() time.Time { + if m != nil { + return m.StartTimeMax + } + return time.Time{} +} + +func (m *TraceQueryParameters) GetDurationMin() time.Duration { + if m != nil { + return m.DurationMin + } + return 0 +} + +func (m *TraceQueryParameters) GetDurationMax() time.Duration { + if m != nil { + return m.DurationMax + } + return 0 +} + +func (m *TraceQueryParameters) GetNumTraces() int32 { + if m != nil { + return m.NumTraces + } + return 0 +} + +type FindTracesRequest struct { + Query *TraceQueryParameters `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` +} + +func (m *FindTracesRequest) Reset() { *m = FindTracesRequest{} } +func (m *FindTracesRequest) String() string { return proto1.CompactTextString(m) } +func (*FindTracesRequest) ProtoMessage() {} +func (*FindTracesRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{15} } + +func (m *FindTracesRequest) GetQuery() *TraceQueryParameters { + if m != nil { + return m.Query + } + return nil +} + +type FindTracesSuccess struct { + Traces []*jaeger_api_v2.Trace `protobuf:"bytes,1,rep,name=traces" json:"traces,omitempty"` +} + +func (m *FindTracesSuccess) Reset() { *m = FindTracesSuccess{} } +func (m *FindTracesSuccess) String() string { return proto1.CompactTextString(m) } +func (*FindTracesSuccess) ProtoMessage() {} +func (*FindTracesSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{16} } + +func (m *FindTracesSuccess) GetTraces() []*jaeger_api_v2.Trace { + if m != nil { + return m.Traces + } + return nil +} + +type FindTracesResponse struct { + // Types that are valid to be assigned to Response: + // *FindTracesResponse_Success + // *FindTracesResponse_Error + Response isFindTracesResponse_Response `protobuf_oneof:"response"` +} + +func (m *FindTracesResponse) Reset() { *m = FindTracesResponse{} } +func (m *FindTracesResponse) String() string { return proto1.CompactTextString(m) } +func (*FindTracesResponse) ProtoMessage() {} +func (*FindTracesResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{17} } + +type isFindTracesResponse_Response interface { + isFindTracesResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type FindTracesResponse_Success struct { + Success *FindTracesSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type FindTracesResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*FindTracesResponse_Success) isFindTracesResponse_Response() {} +func (*FindTracesResponse_Error) isFindTracesResponse_Response() {} + +func (m *FindTracesResponse) GetResponse() isFindTracesResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *FindTracesResponse) GetSuccess() *FindTracesSuccess { + if x, ok := m.GetResponse().(*FindTracesResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *FindTracesResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*FindTracesResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*FindTracesResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _FindTracesResponse_OneofMarshaler, _FindTracesResponse_OneofUnmarshaler, _FindTracesResponse_OneofSizer, []interface{}{ + (*FindTracesResponse_Success)(nil), + (*FindTracesResponse_Error)(nil), + } +} + +func _FindTracesResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*FindTracesResponse) + // response + switch x := m.Response.(type) { + case *FindTracesResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *FindTracesResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("FindTracesResponse.Response has unexpected type %T", x) + } + return nil +} + +func _FindTracesResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*FindTracesResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(FindTracesSuccess) + err := b.DecodeMessage(msg) + m.Response = &FindTracesResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &FindTracesResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _FindTracesResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*FindTracesResponse) + // response + switch x := m.Response.(type) { + case *FindTracesResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *FindTracesResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type FindTraceIDsRequest struct { + Query *TraceQueryParameters `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"` +} + +func (m *FindTraceIDsRequest) Reset() { *m = FindTraceIDsRequest{} } +func (m *FindTraceIDsRequest) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsRequest) ProtoMessage() {} +func (*FindTraceIDsRequest) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{18} } + +func (m *FindTraceIDsRequest) GetQuery() *TraceQueryParameters { + if m != nil { + return m.Query + } + return nil +} + +type FindTraceIDsSuccess struct { + TraceIDs []github_com_jaegertracing_jaeger_model.TraceID `protobuf:"bytes,1,rep,name=trace_id,json=traceId,customtype=github.com/jaegertracing/jaeger/model.TraceID" json:"trace_id"` +} + +func (m *FindTraceIDsSuccess) Reset() { *m = FindTraceIDsSuccess{} } +func (m *FindTraceIDsSuccess) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsSuccess) ProtoMessage() {} +func (*FindTraceIDsSuccess) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{19} } + +type FindTraceIDsResponse struct { + // Types that are valid to be assigned to Response: + // *FindTraceIDsResponse_Success + // *FindTraceIDsResponse_Error + Response isFindTraceIDsResponse_Response `protobuf_oneof:"response"` +} + +func (m *FindTraceIDsResponse) Reset() { *m = FindTraceIDsResponse{} } +func (m *FindTraceIDsResponse) String() string { return proto1.CompactTextString(m) } +func (*FindTraceIDsResponse) ProtoMessage() {} +func (*FindTraceIDsResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{20} } + +type isFindTraceIDsResponse_Response interface { + isFindTraceIDsResponse_Response() + MarshalTo([]byte) (int, error) + Size() int +} + +type FindTraceIDsResponse_Success struct { + Success *FindTraceIDsSuccess `protobuf:"bytes,1,opt,name=success,oneof"` +} +type FindTraceIDsResponse_Error struct { + Error *StoragePluginError `protobuf:"bytes,2,opt,name=error,oneof"` +} + +func (*FindTraceIDsResponse_Success) isFindTraceIDsResponse_Response() {} +func (*FindTraceIDsResponse_Error) isFindTraceIDsResponse_Response() {} + +func (m *FindTraceIDsResponse) GetResponse() isFindTraceIDsResponse_Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *FindTraceIDsResponse) GetSuccess() *FindTraceIDsSuccess { + if x, ok := m.GetResponse().(*FindTraceIDsResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *FindTraceIDsResponse) GetError() *StoragePluginError { + if x, ok := m.GetResponse().(*FindTraceIDsResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*FindTraceIDsResponse) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) { + return _FindTraceIDsResponse_OneofMarshaler, _FindTraceIDsResponse_OneofUnmarshaler, _FindTraceIDsResponse_OneofSizer, []interface{}{ + (*FindTraceIDsResponse_Success)(nil), + (*FindTraceIDsResponse_Error)(nil), + } +} + +func _FindTraceIDsResponse_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error { + m := msg.(*FindTraceIDsResponse) + // response + switch x := m.Response.(type) { + case *FindTraceIDsResponse_Success: + _ = b.EncodeVarint(1<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Success); err != nil { + return err + } + case *FindTraceIDsResponse_Error: + _ = b.EncodeVarint(2<<3 | proto1.WireBytes) + if err := b.EncodeMessage(x.Error); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("FindTraceIDsResponse.Response has unexpected type %T", x) + } + return nil +} + +func _FindTraceIDsResponse_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) { + m := msg.(*FindTraceIDsResponse) + switch tag { + case 1: // response.success + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(FindTraceIDsSuccess) + err := b.DecodeMessage(msg) + m.Response = &FindTraceIDsResponse_Success{msg} + return true, err + case 2: // response.error + if wire != proto1.WireBytes { + return true, proto1.ErrInternalBadWireType + } + msg := new(StoragePluginError) + err := b.DecodeMessage(msg) + m.Response = &FindTraceIDsResponse_Error{msg} + return true, err + default: + return false, nil + } +} + +func _FindTraceIDsResponse_OneofSizer(msg proto1.Message) (n int) { + m := msg.(*FindTraceIDsResponse) + // response + switch x := m.Response.(type) { + case *FindTraceIDsResponse_Success: + s := proto1.Size(x.Success) + n += proto1.SizeVarint(1<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case *FindTraceIDsResponse_Error: + s := proto1.Size(x.Error) + n += proto1.SizeVarint(2<<3 | proto1.WireBytes) + n += proto1.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type EmptyResponse struct { +} + +func (m *EmptyResponse) Reset() { *m = EmptyResponse{} } +func (m *EmptyResponse) String() string { return proto1.CompactTextString(m) } +func (*EmptyResponse) ProtoMessage() {} +func (*EmptyResponse) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{21} } + +type StoragePluginError struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *StoragePluginError) Reset() { *m = StoragePluginError{} } +func (m *StoragePluginError) String() string { return proto1.CompactTextString(m) } +func (*StoragePluginError) ProtoMessage() {} +func (*StoragePluginError) Descriptor() ([]byte, []int) { return fileDescriptorStorage, []int{22} } + +func (m *StoragePluginError) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func init() { + proto1.RegisterType((*GetDependenciesRequest)(nil), "jaeger.api_v2.GetDependenciesRequest") + golang_proto.RegisterType((*GetDependenciesRequest)(nil), "jaeger.api_v2.GetDependenciesRequest") + proto1.RegisterType((*GetDependenciesSuccess)(nil), "jaeger.api_v2.GetDependenciesSuccess") + golang_proto.RegisterType((*GetDependenciesSuccess)(nil), "jaeger.api_v2.GetDependenciesSuccess") + proto1.RegisterType((*GetDependenciesResponse)(nil), "jaeger.api_v2.GetDependenciesResponse") + golang_proto.RegisterType((*GetDependenciesResponse)(nil), "jaeger.api_v2.GetDependenciesResponse") + proto1.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") + golang_proto.RegisterType((*WriteSpanRequest)(nil), "jaeger.api_v2.WriteSpanRequest") + proto1.RegisterType((*WriteSpanResponse)(nil), "jaeger.api_v2.WriteSpanResponse") + golang_proto.RegisterType((*WriteSpanResponse)(nil), "jaeger.api_v2.WriteSpanResponse") + proto1.RegisterType((*GetTraceRequest)(nil), "jaeger.api_v2.GetTraceRequest") + golang_proto.RegisterType((*GetTraceRequest)(nil), "jaeger.api_v2.GetTraceRequest") + proto1.RegisterType((*GetTraceSuccess)(nil), "jaeger.api_v2.GetTraceSuccess") + golang_proto.RegisterType((*GetTraceSuccess)(nil), "jaeger.api_v2.GetTraceSuccess") + proto1.RegisterType((*GetTraceResponse)(nil), "jaeger.api_v2.GetTraceResponse") + golang_proto.RegisterType((*GetTraceResponse)(nil), "jaeger.api_v2.GetTraceResponse") + proto1.RegisterType((*GetServicesRequest)(nil), "jaeger.api_v2.GetServicesRequest") + golang_proto.RegisterType((*GetServicesRequest)(nil), "jaeger.api_v2.GetServicesRequest") + proto1.RegisterType((*GetServicesSuccess)(nil), "jaeger.api_v2.GetServicesSuccess") + golang_proto.RegisterType((*GetServicesSuccess)(nil), "jaeger.api_v2.GetServicesSuccess") + proto1.RegisterType((*GetServicesResponse)(nil), "jaeger.api_v2.GetServicesResponse") + golang_proto.RegisterType((*GetServicesResponse)(nil), "jaeger.api_v2.GetServicesResponse") + proto1.RegisterType((*GetOperationsRequest)(nil), "jaeger.api_v2.GetOperationsRequest") + golang_proto.RegisterType((*GetOperationsRequest)(nil), "jaeger.api_v2.GetOperationsRequest") + proto1.RegisterType((*GetOperationsSuccess)(nil), "jaeger.api_v2.GetOperationsSuccess") + golang_proto.RegisterType((*GetOperationsSuccess)(nil), "jaeger.api_v2.GetOperationsSuccess") + proto1.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + golang_proto.RegisterType((*GetOperationsResponse)(nil), "jaeger.api_v2.GetOperationsResponse") + proto1.RegisterType((*TraceQueryParameters)(nil), "jaeger.api_v2.TraceQueryParameters") + golang_proto.RegisterType((*TraceQueryParameters)(nil), "jaeger.api_v2.TraceQueryParameters") + proto1.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") + golang_proto.RegisterType((*FindTracesRequest)(nil), "jaeger.api_v2.FindTracesRequest") + proto1.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") + golang_proto.RegisterType((*FindTracesSuccess)(nil), "jaeger.api_v2.FindTracesSuccess") + proto1.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") + golang_proto.RegisterType((*FindTracesResponse)(nil), "jaeger.api_v2.FindTracesResponse") + proto1.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.api_v2.FindTraceIDsRequest") + golang_proto.RegisterType((*FindTraceIDsRequest)(nil), "jaeger.api_v2.FindTraceIDsRequest") + proto1.RegisterType((*FindTraceIDsSuccess)(nil), "jaeger.api_v2.FindTraceIDsSuccess") + golang_proto.RegisterType((*FindTraceIDsSuccess)(nil), "jaeger.api_v2.FindTraceIDsSuccess") + proto1.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.api_v2.FindTraceIDsResponse") + golang_proto.RegisterType((*FindTraceIDsResponse)(nil), "jaeger.api_v2.FindTraceIDsResponse") + proto1.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") + golang_proto.RegisterType((*EmptyResponse)(nil), "jaeger.api_v2.EmptyResponse") + proto1.RegisterType((*StoragePluginError)(nil), "jaeger.api_v2.StoragePluginError") + golang_proto.RegisterType((*StoragePluginError)(nil), "jaeger.api_v2.StoragePluginError") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for StoragePlugin service + +type StoragePluginClient interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) + // spanstore/Writer + WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) + // spanstore/Reader + GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, error) + GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) + GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) + FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (*FindTracesResponse, error) + FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) +} + +type storagePluginClient struct { + cc *grpc.ClientConn +} + +func NewStoragePluginClient(cc *grpc.ClientConn) StoragePluginClient { + return &storagePluginClient{cc} +} + +func (c *storagePluginClient) GetDependencies(ctx context.Context, in *GetDependenciesRequest, opts ...grpc.CallOption) (*GetDependenciesResponse, error) { + out := new(GetDependenciesResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetDependencies", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) WriteSpan(ctx context.Context, in *WriteSpanRequest, opts ...grpc.CallOption) (*WriteSpanResponse, error) { + out := new(WriteSpanResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/WriteSpan", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetTrace(ctx context.Context, in *GetTraceRequest, opts ...grpc.CallOption) (*GetTraceResponse, error) { + out := new(GetTraceResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetTrace", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesResponse, error) { + out := new(GetServicesResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetServices", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) GetOperations(ctx context.Context, in *GetOperationsRequest, opts ...grpc.CallOption) (*GetOperationsResponse, error) { + out := new(GetOperationsResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/GetOperations", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) FindTraces(ctx context.Context, in *FindTracesRequest, opts ...grpc.CallOption) (*FindTracesResponse, error) { + out := new(FindTracesResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/FindTraces", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *storagePluginClient) FindTraceIDs(ctx context.Context, in *FindTraceIDsRequest, opts ...grpc.CallOption) (*FindTraceIDsResponse, error) { + out := new(FindTraceIDsResponse) + err := grpc.Invoke(ctx, "/jaeger.api_v2.StoragePlugin/FindTraceIDs", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for StoragePlugin service + +type StoragePluginServer interface { + // dependencystore/Writer + // rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + GetDependencies(context.Context, *GetDependenciesRequest) (*GetDependenciesResponse, error) + // spanstore/Writer + WriteSpan(context.Context, *WriteSpanRequest) (*WriteSpanResponse, error) + // spanstore/Reader + GetTrace(context.Context, *GetTraceRequest) (*GetTraceResponse, error) + GetServices(context.Context, *GetServicesRequest) (*GetServicesResponse, error) + GetOperations(context.Context, *GetOperationsRequest) (*GetOperationsResponse, error) + FindTraces(context.Context, *FindTracesRequest) (*FindTracesResponse, error) + FindTraceIDs(context.Context, *FindTraceIDsRequest) (*FindTraceIDsResponse, error) +} + +func RegisterStoragePluginServer(s *grpc.Server, srv StoragePluginServer) { + s.RegisterService(&_StoragePlugin_serviceDesc, srv) +} + +func _StoragePlugin_GetDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDependenciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).GetDependencies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/GetDependencies", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetDependencies(ctx, req.(*GetDependenciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_WriteSpan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteSpanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).WriteSpan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/WriteSpan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).WriteSpan(ctx, req.(*WriteSpanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_GetTrace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTraceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).GetTrace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/GetTrace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetTrace(ctx, req.(*GetTraceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_GetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).GetServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/GetServices", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetServices(ctx, req.(*GetServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_GetOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOperationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).GetOperations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/GetOperations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).GetOperations(ctx, req.(*GetOperationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_FindTraces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindTracesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).FindTraces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/FindTraces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).FindTraces(ctx, req.(*FindTracesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StoragePlugin_FindTraceIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FindTraceIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoragePluginServer).FindTraceIDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/jaeger.api_v2.StoragePlugin/FindTraceIDs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoragePluginServer).FindTraceIDs(ctx, req.(*FindTraceIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _StoragePlugin_serviceDesc = grpc.ServiceDesc{ + ServiceName: "jaeger.api_v2.StoragePlugin", + HandlerType: (*StoragePluginServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetDependencies", + Handler: _StoragePlugin_GetDependencies_Handler, + }, + { + MethodName: "WriteSpan", + Handler: _StoragePlugin_WriteSpan_Handler, + }, + { + MethodName: "GetTrace", + Handler: _StoragePlugin_GetTrace_Handler, + }, + { + MethodName: "GetServices", + Handler: _StoragePlugin_GetServices_Handler, + }, + { + MethodName: "GetOperations", + Handler: _StoragePlugin_GetOperations_Handler, + }, + { + MethodName: "FindTraces", + Handler: _StoragePlugin_FindTraces_Handler, + }, + { + MethodName: "FindTraceIDs", + Handler: _StoragePlugin_FindTraceIDs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "storage.proto", +} + +func (m *GetDependenciesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.EndTimestamp))) + n1, err := types.StdTimeMarshalTo(m.EndTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.Lookback))) + n2, err := types.StdDurationMarshalTo(m.Lookback, dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + return i, nil +} + +func (m *GetDependenciesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Dependencies) > 0 { + for _, msg := range m.Dependencies { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *GetDependenciesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetDependenciesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn3, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + return i, nil +} + +func (m *GetDependenciesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n4, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *GetDependenciesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n5, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *WriteSpanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WriteSpanRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Span != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Span.Size())) + n6, err := m.Span.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *WriteSpanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WriteSpanResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn7, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn7 + } + return i, nil +} + +func (m *WriteSpanResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n8, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} +func (m *WriteSpanResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n9, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + return i, nil +} +func (m *GetTraceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.TraceID.Size())) + n10, err := m.TraceID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + return i, nil +} + +func (m *GetTraceSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Trace != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Trace.Size())) + n11, err := m.Trace.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *GetTraceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetTraceResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn12, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn12 + } + return i, nil +} + +func (m *GetTraceResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n13, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + return i, nil +} +func (m *GetTraceResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n14, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + return i, nil +} +func (m *GetServicesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *GetServicesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *GetServicesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetServicesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn15, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn15 + } + return i, nil +} + +func (m *GetServicesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n16, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + return i, nil +} +func (m *GetServicesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n17, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + return i, nil +} +func (m *GetOperationsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Service) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Service))) + i += copy(dAtA[i:], m.Service) + } + return i, nil +} + +func (m *GetOperationsSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *GetOperationsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOperationsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn18, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn18 + } + return i, nil +} + +func (m *GetOperationsResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n19, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + return i, nil +} +func (m *GetOperationsResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n20, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + return i, nil +} +func (m *TraceQueryParameters) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TraceQueryParameters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ServiceName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.ServiceName))) + i += copy(dAtA[i:], m.ServiceName) + } + if len(m.OperationName) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.OperationName))) + i += copy(dAtA[i:], m.OperationName) + } + if len(m.Tags) > 0 { + for k, _ := range m.Tags { + dAtA[i] = 0x1a + i++ + v := m.Tags[k] + mapSize := 1 + len(k) + sovStorage(uint64(len(k))) + 1 + len(v) + sovStorage(uint64(len(v))) + i = encodeVarintStorage(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + dAtA[i] = 0x22 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMin))) + n21, err := types.StdTimeMarshalTo(m.StartTimeMin, dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + dAtA[i] = 0x2a + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdTime(m.StartTimeMax))) + n22, err := types.StdTimeMarshalTo(m.StartTimeMax, dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + dAtA[i] = 0x32 + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMin))) + n23, err := types.StdDurationMarshalTo(m.DurationMin, dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + dAtA[i] = 0x3a + i++ + i = encodeVarintStorage(dAtA, i, uint64(types.SizeOfStdDuration(m.DurationMax))) + n24, err := types.StdDurationMarshalTo(m.DurationMax, dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + if m.NumTraces != 0 { + dAtA[i] = 0x40 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.NumTraces)) + } + return i, nil +} + +func (m *FindTracesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Query != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) + n25, err := m.Query.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} + +func (m *FindTracesSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Traces) > 0 { + for _, msg := range m.Traces { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *FindTracesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTracesResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn26, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn26 + } + return i, nil +} + +func (m *FindTracesResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n27, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + return i, nil +} +func (m *FindTracesResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n28, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } + return i, nil +} +func (m *FindTraceIDsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTraceIDsRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Query != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Query.Size())) + n29, err := m.Query.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + return i, nil +} + +func (m *FindTraceIDsSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTraceIDsSuccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TraceIDs) > 0 { + for _, msg := range m.TraceIDs { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *FindTraceIDsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FindTraceIDsResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Response != nil { + nn30, err := m.Response.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn30 + } + return i, nil +} + +func (m *FindTraceIDsResponse_Success) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Success != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Success.Size())) + n31, err := m.Success.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + return i, nil +} +func (m *FindTraceIDsResponse_Error) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Error != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStorage(dAtA, i, uint64(m.Error.Size())) + n32, err := m.Error.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + return i, nil +} +func (m *EmptyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EmptyResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *StoragePluginError) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoragePluginError) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Message) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintStorage(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + } + return i, nil +} + +func encodeVarintStorage(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *GetDependenciesRequest) Size() (n int) { + var l int + _ = l + l = types.SizeOfStdTime(m.EndTimestamp) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.Lookback) + n += 1 + l + sovStorage(uint64(l)) + return n +} + +func (m *GetDependenciesSuccess) Size() (n int) { + var l int + _ = l + if len(m.Dependencies) > 0 { + for _, e := range m.Dependencies { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *GetDependenciesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetDependenciesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetDependenciesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *WriteSpanRequest) Size() (n int) { + var l int + _ = l + if m.Span != nil { + l = m.Span.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *WriteSpanResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *WriteSpanResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *WriteSpanResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetTraceRequest) Size() (n int) { + var l int + _ = l + l = m.TraceID.Size() + n += 1 + l + sovStorage(uint64(l)) + return n +} + +func (m *GetTraceSuccess) Size() (n int) { + var l int + _ = l + if m.Trace != nil { + l = m.Trace.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *GetTraceResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetTraceResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetTraceResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetServicesRequest) Size() (n int) { + var l int + _ = l + return n +} + +func (m *GetServicesSuccess) Size() (n int) { + var l int + _ = l + if len(m.Services) > 0 { + for _, s := range m.Services { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *GetServicesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetServicesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetServicesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetOperationsRequest) Size() (n int) { + var l int + _ = l + l = len(m.Service) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *GetOperationsSuccess) Size() (n int) { + var l int + _ = l + if len(m.Operations) > 0 { + for _, s := range m.Operations { + l = len(s) + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *GetOperationsResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *GetOperationsResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *GetOperationsResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *TraceQueryParameters) Size() (n int) { + var l int + _ = l + l = len(m.ServiceName) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + l = len(m.OperationName) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + if len(m.Tags) > 0 { + for k, v := range m.Tags { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovStorage(uint64(len(k))) + 1 + len(v) + sovStorage(uint64(len(v))) + n += mapEntrySize + 1 + sovStorage(uint64(mapEntrySize)) + } + } + l = types.SizeOfStdTime(m.StartTimeMin) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdTime(m.StartTimeMax) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.DurationMin) + n += 1 + l + sovStorage(uint64(l)) + l = types.SizeOfStdDuration(m.DurationMax) + n += 1 + l + sovStorage(uint64(l)) + if m.NumTraces != 0 { + n += 1 + sovStorage(uint64(m.NumTraces)) + } + return n +} + +func (m *FindTracesRequest) Size() (n int) { + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *FindTracesSuccess) Size() (n int) { + var l int + _ = l + if len(m.Traces) > 0 { + for _, e := range m.Traces { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *FindTracesResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *FindTracesResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTracesResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTraceIDsRequest) Size() (n int) { + var l int + _ = l + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func (m *FindTraceIDsSuccess) Size() (n int) { + var l int + _ = l + if len(m.TraceIDs) > 0 { + for _, e := range m.TraceIDs { + l = e.Size() + n += 1 + l + sovStorage(uint64(l)) + } + } + return n +} + +func (m *FindTraceIDsResponse) Size() (n int) { + var l int + _ = l + if m.Response != nil { + n += m.Response.Size() + } + return n +} + +func (m *FindTraceIDsResponse_Success) Size() (n int) { + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *FindTraceIDsResponse_Error) Size() (n int) { + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovStorage(uint64(l)) + } + return n +} +func (m *EmptyResponse) Size() (n int) { + var l int + _ = l + return n +} + +func (m *StoragePluginError) Size() (n int) { + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovStorage(uint64(l)) + } + return n +} + +func sovStorage(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStorage(x uint64) (n int) { + return sovStorage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GetDependenciesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.EndTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Lookback", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.Lookback, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_jaegertracing_jaeger_model.DependencyLink + m.Dependencies = append(m.Dependencies, v) + if err := m.Dependencies[len(m.Dependencies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDependenciesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetDependenciesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDependenciesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GetDependenciesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetDependenciesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetDependenciesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WriteSpanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteSpanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteSpanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Span", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Span == nil { + m.Span = &jaeger_api_v2.Span{} + } + if err := m.Span.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WriteSpanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WriteSpanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WriteSpanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &EmptyResponse{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &WriteSpanResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &WriteSpanResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTraceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTraceSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Trace", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Trace == nil { + m.Trace = &jaeger_api_v2.Trace{} + } + if err := m.Trace.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetTraceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTraceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTraceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GetTraceSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetTraceResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetTraceResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetServicesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetServicesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetServicesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GetServicesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetServicesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetServicesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operations", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operations = append(m.Operations, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOperationsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &GetOperationsSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetOperationsResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &GetOperationsResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TraceQueryParameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TraceQueryParameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TraceQueryParameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServiceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tags == nil { + m.Tags = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthStorage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthStorage + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Tags[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.StartTimeMin, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeMax", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdTimeUnmarshal(&m.StartTimeMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.DurationMin, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationMax", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := types.StdDurationUnmarshal(&m.DurationMax, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumTraces", wireType) + } + m.NumTraces = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumTraces |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTracesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTracesSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Traces", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Traces = append(m.Traces, &jaeger_api_v2.Trace{}) + if err := m.Traces[len(m.Traces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTracesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTracesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTracesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &FindTracesSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTracesResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTracesResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTraceIDsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTraceIDsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTraceIDsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &TraceQueryParameters{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTraceIDsSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTraceIDsSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTraceIDsSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceIDs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_jaegertracing_jaeger_model.TraceID + m.TraceIDs = append(m.TraceIDs, v) + if err := m.TraceIDs[len(m.TraceIDs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FindTraceIDsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FindTraceIDsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FindTraceIDsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &FindTraceIDsSuccess{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTraceIDsResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &StoragePluginError{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Response = &FindTraceIDsResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EmptyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EmptyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EmptyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoragePluginError) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoragePluginError: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoragePluginError: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStorage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStorage + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStorage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStorage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStorage(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthStorage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStorage + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipStorage(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthStorage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStorage = fmt.Errorf("proto: integer overflow") +) + +func init() { proto1.RegisterFile("storage.proto", fileDescriptorStorage) } +func init() { golang_proto.RegisterFile("storage.proto", fileDescriptorStorage) } + +var fileDescriptorStorage = []byte{ + // 1076 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdf, 0x6e, 0x1b, 0xc5, + 0x17, 0xce, 0x26, 0x71, 0x6c, 0x1f, 0xdb, 0x6d, 0x3a, 0xf1, 0xef, 0x57, 0x63, 0x81, 0xed, 0x6c, + 0x29, 0x44, 0x88, 0xae, 0xab, 0x80, 0xa0, 0x2d, 0x2d, 0x25, 0x56, 0xd2, 0x34, 0xfc, 0x09, 0xe9, + 0x26, 0x52, 0xa5, 0x82, 0xe4, 0x4e, 0xec, 0x61, 0x59, 0xe2, 0x9d, 0x75, 0x77, 0x66, 0xa3, 0x98, + 0xa7, 0xe0, 0x02, 0x24, 0x10, 0x42, 0x5c, 0x94, 0x07, 0xe1, 0xb2, 0x97, 0x5c, 0x73, 0x11, 0x50, + 0xb8, 0xe5, 0x21, 0xd0, 0xce, 0xce, 0x6c, 0xbc, 0xe3, 0xd8, 0x2d, 0x11, 0xbe, 0xda, 0x9d, 0x99, + 0xef, 0x7c, 0x73, 0xce, 0x77, 0xe6, 0xcc, 0x19, 0x28, 0x31, 0xee, 0x07, 0xd8, 0x21, 0x56, 0x3f, + 0xf0, 0xb9, 0x8f, 0x4a, 0x5f, 0x61, 0xe2, 0x90, 0xc0, 0xc2, 0x7d, 0xb7, 0x7d, 0xb8, 0x5a, 0x2d, + 0x3b, 0xbe, 0xe3, 0x8b, 0x95, 0x66, 0xf4, 0x17, 0x83, 0xaa, 0x05, 0xcf, 0xef, 0x92, 0x9e, 0x1c,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, + 0xbe, 0xd9, 0x17, 0xc4, 0xe7, 0xad, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x63, 0x7a, 0xfc, 0x43, + 0xe5, 0x0d, 0x00, 0x00, +} diff --git a/plugin/storage/grpc/proto/storage.proto b/plugin/storage/grpc/proto/storage.proto new file mode 100644 index 00000000000..dda869e98b8 --- /dev/null +++ b/plugin/storage/grpc/proto/storage.proto @@ -0,0 +1,201 @@ +syntax = "proto3"; + +package jaeger.api_v2; + +option go_package = "proto"; + +import "gogoproto/gogo.proto"; +import "model.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; + +// Enable gogoprotobuf extensions (https://github.com/gogo/protobuf/blob/master/extensions.md). +// Enable custom Marshal method. +option (gogoproto.marshaler_all) = true; +// Enable custom Unmarshal method. +option (gogoproto.unmarshaler_all) = true; +// Enable custom Size method (Required by Marshal and Unmarshal). +option (gogoproto.sizer_all) = true; +// Enable registration with golang/protobuf for the grpc-gateway. +option (gogoproto.goproto_registration) = true; + +//message WriteDependenciesRequest { +// +//} +// +//message WriteDependenciesResponse { +// +//} + +message GetDependenciesRequest { + google.protobuf.Timestamp end_timestamp = 1 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration lookback = 2 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; +} + +message GetDependenciesSuccess { + repeated bytes dependencies = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.DependencyLink" + ]; +} + +message GetDependenciesResponse { + oneof response { + GetDependenciesSuccess success = 1; + StoragePluginError error = 2; + } +} + +message WriteSpanRequest { + Span span = 1; +} + +message WriteSpanResponse { + oneof response { + EmptyResponse success = 1; + StoragePluginError error = 2; + } +} + +message GetTraceRequest { + bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.TraceID", + (gogoproto.customname) = "TraceID" + ]; +} + +message GetTraceSuccess { + Trace trace = 1; +} + +message GetTraceResponse { + oneof response { + GetTraceSuccess success = 1; + StoragePluginError error = 2; + } +} + +message GetServicesRequest {} + +message GetServicesSuccess { + repeated string services = 1; +} + +message GetServicesResponse { + oneof response { + GetServicesSuccess success = 1; + StoragePluginError error = 2; + } +} + +message GetOperationsRequest { + string service = 1; +} + +message GetOperationsSuccess { + repeated string operations = 1; +} + +message GetOperationsResponse { + oneof response { + GetOperationsSuccess success = 1; + StoragePluginError error = 2; + } +} + +message TraceQueryParameters { + string service_name = 1; + string operation_name = 2; + map tags = 3; + google.protobuf.Timestamp start_time_min = 4 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Timestamp start_time_max = 5 [ + (gogoproto.stdtime) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration duration_min = 6 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + google.protobuf.Duration duration_max = 7 [ + (gogoproto.stdduration) = true, + (gogoproto.nullable) = false + ]; + int32 num_traces = 8; +} + +message FindTracesRequest { + TraceQueryParameters query = 1; +} + +message FindTracesSuccess { + repeated Trace traces = 1; +} + +message FindTracesResponse { + oneof response { + FindTracesSuccess success = 1; + StoragePluginError error = 2; + } +} + +message FindTraceIDsRequest { + TraceQueryParameters query = 1; +} + +message FindTraceIDsSuccess { + repeated bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "github.com/jaegertracing/jaeger/model.TraceID", + (gogoproto.customname) = "TraceIDs" + ]; +} + +message FindTraceIDsResponse { + oneof response { + FindTraceIDsSuccess success = 1; + StoragePluginError error = 2; + } +} + +message EmptyResponse { + +} + +message StoragePluginError { + string message = 1; +} + +service StoragePlugin { + // dependencystore/Writer +// rpc WriteDependencies(WriteDependenciesRequest) returns (WriteDependenciesResponse); + // dependencystore/Reader + rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse); + + // TODO(olivierboucher): make theses available once the POC goes through + // samplingstore/Store +// rpc InsertThroughput(InsertThroughputRequest) returns (InsertThroughputResponse); +// rpc InsertProbabilitiesAndQPS(InsertProbabilitiesAndQPSRequest) returns (InsertProbabilitiesAndQPSResponse); +// rpc GetThroughput(GetThroughputRequest) returns (GetThroughputResponse); +// rpc GetProbabilitiesAndQPS(GetProbabilitiesAndQPSRequest) returns (GetProbabilitiesAndQPSResponse); +// rpc GetLatestProbabilities(GetLatestProbabilitiesRequest) returns (GetLatestProbabilitiesResponse); + + // spanstore/Writer + rpc WriteSpan(WriteSpanRequest) returns (WriteSpanResponse); + + // spanstore/Reader + rpc GetTrace(GetTraceRequest) returns (GetTraceResponse); + rpc GetServices(GetServicesRequest) returns (GetServicesResponse); + rpc GetOperations(GetOperationsRequest) returns (GetOperationsResponse); + rpc FindTraces(FindTracesRequest) returns (FindTracesResponse); + rpc FindTraceIDs(FindTraceIDsRequest) returns (FindTraceIDsResponse); +} \ No newline at end of file diff --git a/plugin/storage/grpc/shared/empty_test.go b/plugin/storage/grpc/shared/empty_test.go new file mode 100644 index 00000000000..5f6014db2d3 --- /dev/null +++ b/plugin/storage/grpc/shared/empty_test.go @@ -0,0 +1,15 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package shared diff --git a/plugin/storage/grpc/shared/grpc.go b/plugin/storage/grpc/shared/grpc.go new file mode 100644 index 00000000000..be0e35e9fd4 --- /dev/null +++ b/plugin/storage/grpc/shared/grpc.go @@ -0,0 +1,335 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package shared + +import ( + "context" + "fmt" + "time" + + "github.com/jaegertracing/jaeger/model" + "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +type GRPCClient struct { + client proto.StoragePluginClient +} + +func (c *GRPCClient) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) { + resp, err := c.client.GetTrace(ctx, &proto.GetTraceRequest{ + TraceID: traceID, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetTraceResponse_Success: + return t.Success.Trace, nil + case *proto.GetTraceResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetServices(ctx context.Context) ([]string, error) { + resp, err := c.client.GetServices(ctx, &proto.GetServicesRequest{}) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetServicesResponse_Success: + return t.Success.Services, nil + case *proto.GetServicesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetOperations(ctx context.Context, service string) ([]string, error) { + resp, err := c.client.GetOperations(ctx, &proto.GetOperationsRequest{ + Service: service, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetOperationsResponse_Success: + return t.Success.Operations, nil + case *proto.GetOperationsResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQueryParameters) ([]*model.Trace, error) { + resp, err := c.client.FindTraces(context.Background(), &proto.FindTracesRequest{ + Query: &proto.TraceQueryParameters{ + ServiceName: query.ServiceName, + OperationName: query.OperationName, + Tags: query.Tags, + StartTimeMin: query.StartTimeMin, + StartTimeMax: query.StartTimeMax, + DurationMin: query.DurationMin, + DurationMax: query.DurationMax, + NumTraces: int32(query.NumTraces), + }, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.FindTracesResponse_Success: + return t.Success.Traces, nil + case *proto.FindTracesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) FindTraceIDs(ctx context.Context, query *spanstore.TraceQueryParameters) ([]model.TraceID, error) { + resp, err := c.client.FindTraceIDs(context.Background(), &proto.FindTraceIDsRequest{ + Query: &proto.TraceQueryParameters{ + ServiceName: query.ServiceName, + OperationName: query.OperationName, + Tags: query.Tags, + StartTimeMin: query.StartTimeMin, + StartTimeMax: query.StartTimeMax, + DurationMin: query.DurationMin, + DurationMax: query.DurationMax, + NumTraces: int32(query.NumTraces), + }, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.FindTraceIDsResponse_Success: + return t.Success.TraceIDs, nil + case *proto.FindTraceIDsResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) WriteSpan(span *model.Span) error { + resp, err := c.client.WriteSpan(context.Background(), &proto.WriteSpanRequest{ + Span: span, + }) + if err != nil { + return fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.WriteSpanResponse_Success: + return nil + case *proto.WriteSpanResponse_Error: + return fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +func (c *GRPCClient) GetDependencies(endTs time.Time, lookback time.Duration) ([]model.DependencyLink, error) { + resp, err := c.client.GetDependencies(context.Background(), &proto.GetDependenciesRequest{ + EndTimestamp: endTs, + Lookback: lookback, + }) + if err != nil { + return nil, fmt.Errorf("grpc error: %s", err) + } + + switch t := resp.Response.(type) { + case *proto.GetDependenciesResponse_Success: + return t.Success.Dependencies, nil + case *proto.GetDependenciesResponse_Error: + return nil, fmt.Errorf("plugin error: %s", t.Error.Message) + default: + panic("unreachable") + } +} + +type GRPCServer struct { + Impl StoragePlugin +} + + +func (s *GRPCServer) GetDependencies(ctx context.Context, r *proto.GetDependenciesRequest) (*proto.GetDependenciesResponse, error) { + deps, err := s.Impl.GetDependencies(r.EndTimestamp, r.Lookback) + if err != nil { + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetDependenciesResponse{ + Response: &proto.GetDependenciesResponse_Success{ + Success: &proto.GetDependenciesSuccess{ + Dependencies: deps, + }, + }, + }, nil +} + +func (s *GRPCServer) WriteSpan(ctx context.Context, r *proto.WriteSpanRequest) (*proto.WriteSpanResponse, error) { + err := s.Impl.WriteSpan(r.Span) + if err != nil { + return &proto.WriteSpanResponse{ + Response: &proto.WriteSpanResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.WriteSpanResponse{ + Response: &proto.WriteSpanResponse_Success{ + Success: &proto.EmptyResponse{}, + }, + }, nil +} + +func (s *GRPCServer) GetTrace(ctx context.Context, r *proto.GetTraceRequest) (*proto.GetTraceResponse, error) { + trace, err := s.Impl.GetTrace(ctx, r.TraceID) + if err != nil { + return &proto.GetTraceResponse{ + Response: &proto.GetTraceResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetTraceResponse{ + Response: &proto.GetTraceResponse_Success{ + Success: &proto.GetTraceSuccess{ + Trace: trace, + }, + }, + }, nil +} + +func (s *GRPCServer) GetServices(ctx context.Context, r *proto.GetServicesRequest) (*proto.GetServicesResponse, error) { + services, err := s.Impl.GetServices(ctx) + if err != nil { + return &proto.GetServicesResponse{ + Response: &proto.GetServicesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetServicesResponse{ + Response: &proto.GetServicesResponse_Success{ + Success: &proto.GetServicesSuccess{ + Services: services, + }, + }, + }, nil +} + +func (s *GRPCServer) GetOperations(ctx context.Context, r *proto.GetOperationsRequest) (*proto.GetOperationsResponse, error) { + operations, err := s.Impl.GetOperations(ctx, r.Service) + if err != nil { + return &proto.GetOperationsResponse{ + Response: &proto.GetOperationsResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.GetOperationsResponse{ + Response: &proto.GetOperationsResponse_Success{ + Success: &proto.GetOperationsSuccess{ + Operations: operations, + }, + }, + }, nil +} + +func (s *GRPCServer) FindTraces(ctx context.Context, r *proto.FindTracesRequest) (*proto.FindTracesResponse, error) { + traces, err := s.Impl.FindTraces(ctx, &spanstore.TraceQueryParameters{ + ServiceName: r.Query.ServiceName, + OperationName: r.Query.OperationName, + Tags: r.Query.Tags, + StartTimeMin: r.Query.StartTimeMin, + StartTimeMax: r.Query.StartTimeMax, + DurationMin: r.Query.DurationMin, + DurationMax: r.Query.DurationMax, + NumTraces: int(r.Query.NumTraces), + }) + if err != nil { + return &proto.FindTracesResponse{ + Response: &proto.FindTracesResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.FindTracesResponse{ + Response: &proto.FindTracesResponse_Success{ + Success: &proto.FindTracesSuccess{ + Traces: traces, + }, + }, + }, nil +} + +func (s *GRPCServer) FindTraceIDs(ctx context.Context, r *proto.FindTraceIDsRequest) (*proto.FindTraceIDsResponse, error) { + traceIDs, err := s.Impl.FindTraceIDs(ctx, &spanstore.TraceQueryParameters{ + ServiceName: r.Query.ServiceName, + OperationName: r.Query.OperationName, + Tags: r.Query.Tags, + StartTimeMin: r.Query.StartTimeMin, + StartTimeMax: r.Query.StartTimeMax, + DurationMin: r.Query.DurationMin, + DurationMax: r.Query.DurationMax, + NumTraces: int(r.Query.NumTraces), + }) + if err != nil { + return &proto.FindTraceIDsResponse{ + Response: &proto.FindTraceIDsResponse_Error{ + Error: &proto.StoragePluginError{ + Message: err.Error(), + }, + }, + }, nil + } + return &proto.FindTraceIDsResponse{ + Response: &proto.FindTraceIDsResponse_Success{ + Success: &proto.FindTraceIDsSuccess{ + TraceIDs: traceIDs, + }, + }, + }, nil +} + + diff --git a/plugin/storage/grpc/shared/interface.go b/plugin/storage/grpc/shared/interface.go new file mode 100644 index 00000000000..9b6ceeaff49 --- /dev/null +++ b/plugin/storage/grpc/shared/interface.go @@ -0,0 +1,64 @@ +// Copyright (c) 2018 The Jaeger Authors. +// +// 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. + +package shared + +import ( + "context" + "github.com/jaegertracing/jaeger/storage/dependencystore" + + "github.com/hashicorp/go-plugin" + "google.golang.org/grpc" + + "github.com/jaegertracing/jaeger/plugin/storage/grpc/proto" + "github.com/jaegertracing/jaeger/storage/spanstore" +) + +// StoragePluginIdentifier is the identifier that is shared by plugin and host. +const StoragePluginIdentifier = "storage_plugin" + +// Handshake is a common handshake that is shared by plugin and host. +var Handshake = plugin.HandshakeConfig{ + MagicCookieKey: "STORAGE_PLUGIN", + MagicCookieValue: "jaeger", +} + +// PluginMap is the map of plugins we can dispense. +var PluginMap = map[string]plugin.Plugin{ + StoragePluginIdentifier: &StorageGRPCPlugin{}, +} + +// StoragePlugin is the interface we're exposing as a plugin. +type StoragePlugin interface { + spanstore.Reader + spanstore.Writer + dependencystore.Reader +} + +// This is the implementation of plugin.GRPCPlugin so we can serve/consume this. +type StorageGRPCPlugin struct { + plugin.Plugin + // Concrete implementation, written in Go. This is only used for plugins + // that are written in Go. + Impl StoragePlugin +} + +func (p *StorageGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error { + proto.RegisterStoragePluginServer(s, &GRPCServer{Impl: p.Impl}) + return nil +} + +func (*StorageGRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { + return &GRPCClient{client: proto.NewStoragePluginClient(c)}, nil +}