diff --git a/Makefile b/Makefile index 667cc1d..4ba6563 100644 --- a/Makefile +++ b/Makefile @@ -102,10 +102,10 @@ install: install_qmstr_client # Installation targets install_qmstr_server: $(QMSTR_SERVER_BINARIES) - install -t $(prefix)/bin $^ + install $^ $(prefix)/bin install_qmstr_client: $(QMSTR_CLIENT_BINARIES) - install -t $(prefix)/bin $^ + install $^ $(prefix)/bin install_qmstr_all: install_qmstr_client install_qmstr_server diff --git a/go.mod b/go.mod index 0e8875f..1f0a91f 100644 --- a/go.mod +++ b/go.mod @@ -9,21 +9,21 @@ require ( github.com/Microsoft/go-winio v0.4.12 // indirect github.com/Sirupsen/logrus v0.0.0-00010101000000-000000000000 // indirect github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb + github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect github.com/cpuguy83/go-md2man v1.0.10 // indirect github.com/creack/pty v1.1.9 // indirect - github.com/dgraph-io/dgo/v2 v2.1.0 + github.com/dgraph-io/dgo/v2 v2.2.0 github.com/docker/distribution v2.7.1+incompatible // indirect github.com/docker/docker v1.13.1 github.com/docker/go-connections v0.4.0 github.com/docker/go-units v0.3.3 // indirect - github.com/envoyproxy/go-control-plane v0.6.9 // indirect + github.com/envoyproxy/go-control-plane v0.7.1 // indirect + github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect github.com/gogo/googleapis v1.1.0 // indirect - github.com/gogo/protobuf v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20191002201903-404acd9df4cc // indirect github.com/golang/mock v1.3.1 // indirect - github.com/golang/protobuf v1.3.2 + github.com/golang/protobuf v1.4.0 github.com/google/btree v1.0.0 // indirect - github.com/google/go-cmp v0.3.1 // indirect github.com/google/pprof v0.0.0-20191022163618-5260658b92d7 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect github.com/hashicorp/go-version v1.1.0 @@ -35,6 +35,7 @@ require ( github.com/opencontainers/go-digest v1.0.0-rc1 // indirect github.com/opencontainers/runc v0.1.1 // indirect github.com/pkg/errors v0.8.1 + github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect github.com/rogpeppe/go-internal v1.5.0 // indirect github.com/sirupsen/logrus v1.4.1 // indirect github.com/spdx/tools-golang v0.0.0-20190418005930-ea86b81b8378 @@ -48,15 +49,13 @@ require ( golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect golang.org/x/mobile v0.0.0-20191002175909-6d0d39b2ca82 // indirect - golang.org/x/net v0.0.0-20191021144547-ec77196f6094 + golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect - golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 // indirect + golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 // indirect golang.org/x/time v0.0.0-20191023065245-6d3f0bb11be5 // indirect golang.org/x/tools v0.0.0-20191022213345-0bbdf54effa2 // indirect - golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect google.golang.org/appengine v1.6.5 // indirect - google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect google.golang.org/grpc v1.23.0 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v2 v2.2.2 diff --git a/go.sum b/go.sum index c3b85ac..5f1efad 100644 --- a/go.sum +++ b/go.sum @@ -45,11 +45,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgraph-io/dgo v0.0.0-20190306204622-95299da439fd h1:qVmopyaVT5uJj0Pw9n922dZcu58AvJ6rGuzi0w1RWfw= github.com/dgraph-io/dgo v0.0.0-20190306204622-95299da439fd/go.mod h1:/3OtwVvGnHiyXL9bWTjZaHQk4cp8rakX6jVBFoykWaA= +github.com/dgraph-io/dgo v1.0.0 h1:DRuI66G+j0XWDOXly4v5PSk2dGkbIopAZIirRjq7lzI= github.com/dgraph-io/dgo/v2 v2.0.0-rc1/go.mod h1:K5FHP4uXUZrqAA8icsTCdg4s7raNdwoRpZ/ygHHvm+4= github.com/dgraph-io/dgo/v2 v2.0.0 h1:TIjOhQMgX2jDI86oOvLisRP3vS2RQu4QyDOSJ5oJkFo= github.com/dgraph-io/dgo/v2 v2.0.0/go.mod h1:R/MTZMGhTo60XSziuKpLXzI1OnVWQCZS5oJjxA8Q1bo= github.com/dgraph-io/dgo/v2 v2.1.0 h1:zm4gygHzZwu11y3VqDG/fDA80xgpSvLMlrhEcb9KfT0= github.com/dgraph-io/dgo/v2 v2.1.0/go.mod h1:R/MTZMGhTo60XSziuKpLXzI1OnVWQCZS5oJjxA8Q1bo= +github.com/dgraph-io/dgo/v2 v2.2.0 h1:qYbm6mEF3wuKiRpgNOldk6PmPbBJFwj6vL7I7dTSdyc= +github.com/dgraph-io/dgo/v2 v2.2.0/go.mod h1:LJCkLxm5fUMcU+yb8gHFjHt7ChgNuz3YnQQ6MQkmscI= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo= @@ -59,9 +62,16 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.7.1/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.8.0/go.mod h1:GSSbY9P1neVhdY7G4wu+IK1rk/dqhiCC/4ExuWJZVuk= +github.com/envoyproxy/go-control-plane v0.8.1/go.mod h1:gf53HlEP0AmznyKjC6le9wyCpVYcDRoZzi+rKat7TdI= +github.com/envoyproxy/go-control-plane v0.8.2/go.mod h1:EWRTAFN6uuDZIa6KOuUfrOMJ7ySgXZ44rVKiTWjKe34= +github.com/envoyproxy/go-control-plane v0.8.3/go.mod h1:EWRTAFN6uuDZIa6KOuUfrOMJ7ySgXZ44rVKiTWjKe34= +github.com/envoyproxy/go-control-plane v0.8.4/go.mod h1:XB9+ce7x+IrsjgIVnRnql0O61gj/np0/bGDfhJI3sCU= github.com/envoyproxy/go-control-plane v0.8.5/go.mod h1:XB9+ce7x+IrsjgIVnRnql0O61gj/np0/bGDfhJI3sCU= +github.com/envoyproxy/go-control-plane v0.8.6/go.mod h1:XB9+ce7x+IrsjgIVnRnql0O61gj/np0/bGDfhJI3sCU= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.0.0-20190405222122-d6164de49109/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= @@ -86,11 +96,19 @@ github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -222,6 +240,8 @@ golang.org/x/net v0.0.0-20190916140828-c8589233b77d h1:mCMDWKhNO37A7GAhOpHPbIw1c golang.org/x/net v0.0.0-20190916140828-c8589233b77d/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191021144547-ec77196f6094 h1:5O4U9trLjNpuhpynaDsqwCk+Tw6seqJz1EbqbnzHrc8= golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5 h1:WQ8q63x+f/zpC8Ac1s9wLElVoHhm32p6tudrU72n1QA= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -254,6 +274,9 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7 h1:HmbHVPwrPEKPGLAcHSrMe6+hqSUlvZU0rab6x5EXfGU= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3 h1:5B6i6EAiSYyejWfvc5Rc9BbI3rzIsrrXfAQBWnYfn+w= +golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -290,6 +313,7 @@ golang.org/x/tools v0.0.0-20191022210528-83d82311fd1f/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191022213345-0bbdf54effa2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= @@ -310,6 +334,7 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8 h1:x913Lq/RebkvUmRSdQ8MNb0GZKn+SR1ESfoetcQSeak= google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c h1:m9avZ3wyOWBR0fLC+qWbMBulk+Jiiqelngssgp8jfIs= google.golang.org/genproto v0.0.0-20190513181449-d00d292a067c/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= @@ -325,6 +350,8 @@ google.golang.org/genproto v0.0.0-20190916214212-f660b8655731 h1:Phvl0+G5t5k/EUF google.golang.org/genproto v0.0.0-20190916214212-f660b8655731/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 h1:4HYDjxeNXAOTv3o1N2tjo8UUSlhQgAD52FVkwxnWgM8= google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0 h1:DlsSIrgEBuZAUFJcta2B5i/lzeHHbnfkNFAfFXLVFYQ= @@ -333,6 +360,14 @@ google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiq google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0 h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/lib/go-qmstr/analysis/analyzer.go b/lib/go-qmstr/analysis/analyzer.go index 7c9dc53..f69aef1 100644 --- a/lib/go-qmstr/analysis/analyzer.go +++ b/lib/go-qmstr/analysis/analyzer.go @@ -1,6 +1,7 @@ package analysis import ( + "encoding/json" "fmt" "log" "os" @@ -9,6 +10,8 @@ import ( goflag "flag" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" + "github.com/QMSTR/qmstr/lib/go-qmstr/config" "github.com/QMSTR/qmstr/lib/go-qmstr/module" "github.com/QMSTR/qmstr/lib/go-qmstr/service" flag "github.com/spf13/pflag" @@ -27,10 +30,15 @@ type AnalyzerModule interface { PostAnalyze() error } +// CountAnalyzers counts the analyzers that run in the current process +var CountAnalyzers int32 + func NewAnalyzer(anaModule AnalyzerModule) *Analyzer { var serviceAddress string var anaID int32 - flag.StringVar(&serviceAddress, "aserv", "localhost:50051", "Analyzer service address") + CountAnalyzers++ + // TODO: Connect to QMSTRADDRESS + flag.StringVar(&serviceAddress, "aserv", "", "connect to analyzer service address") flag.Int32Var(&anaID, "aid", -1, "unique analyzer id") flag.CommandLine.AddGoFlagSet(goflag.CommandLine) flag.Parse() @@ -50,10 +58,14 @@ func (a *Analyzer) RunAnalyzerModule() error { log.Printf("Could not get configuration %v\n", err) return fmt.Errorf("could not get analyzer configuration %v", err) } - - a.name = configResp.Name - cacheDir := configResp.ConfigMap["cachedir"] - outDir := configResp.ConfigMap["outputdir"] + var analyzerConfig *config.Analysis + err = json.Unmarshal([]byte(configResp.AnalyzerConfig), &analyzerConfig) + if err != nil { + return fmt.Errorf("fail unmarshalling analyzer config %v", err) + } + a.name = analyzerConfig.Analyzer + cacheDir := analyzerConfig.Config["cachedir"] + outDir := analyzerConfig.Config["outputdir"] err = os.MkdirAll(cacheDir, os.ModePerm) if err != nil { @@ -65,7 +77,14 @@ func (a *Analyzer) RunAnalyzerModule() error { return fmt.Errorf("failed to create output directory for module %s %v", a.GetModuleName(), err) } - err = a.module.Configure(configResp.ConfigMap) + // Initialize analyzer + _, err = a.CtrlSvcClient.InitModule(context.Background(), &service.InitModuleRequest{ + ModuleName: a.name, ExtraConfig: analyzerConfig.TrustLevel}) + if err != nil { + return fmt.Errorf("%v: %v", err, cli.ReturnCodeServerCommunicationError) + } + + err = a.module.Configure(analyzerConfig.Config) if err != nil { return fmt.Errorf("failed to configure analyzer module %s %v", a.GetModuleName(), err) } @@ -74,5 +93,24 @@ func (a *Analyzer) RunAnalyzerModule() error { if err != nil { return fmt.Errorf("Analysis failed for analyzer module %s %v", a.GetModuleName(), err) } + + msg := fmt.Sprintf("Analyzer %s finished successfully ", a.name) + log.Println(msg) + // Ping master server that the analyzer finished + a.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{Message: msg, DB: true}) + return nil } + +// ReduceAnalyzersCounter is called everytime an analyzer finishes its process. +// When it reaches 0, it sends a signal to close the analysis phase +func ReduceAnalyzersCounter() { + CountAnalyzers-- + if CountAnalyzers == 0 { // all analyzers have finished + // close analysis phase + close(cli.ModulesAreDone) + } + if CountAnalyzers < 0 { + log.Printf("WARNING: Analyzers count cannot be minus") + } +} diff --git a/lib/go-qmstr/cli/phasecontrol.go b/lib/go-qmstr/cli/phasecontrol.go index 4f5f204..e670e24 100644 --- a/lib/go-qmstr/cli/phasecontrol.go +++ b/lib/go-qmstr/cli/phasecontrol.go @@ -1,8 +1,12 @@ package cli import ( + "bufio" + "bytes" "fmt" + "log" "os" + "strings" "golang.org/x/net/context" @@ -10,6 +14,10 @@ import ( "github.com/spf13/cobra" ) +// ModulesAreDone is a signal channel to close +// analysis/reporting phase once modules are done +var ModulesAreDone chan struct{} + var anaCmd = &cobra.Command{ Use: "analyze", Short: "Start analysis on the QMSTR master", @@ -18,6 +26,7 @@ var anaCmd = &cobra.Command{ setUpControlService() startPhase(service.Phase_ANALYSIS) + startAnalyzers() tearDownServer() }, } @@ -30,6 +39,7 @@ var reportCmd = &cobra.Command{ setUpControlService() startPhase(service.Phase_REPORT) + startReporters() tearDownServer() }, } @@ -39,10 +49,12 @@ func init() { rootCmd.AddCommand(reportCmd) } +// start analysis/reporting phase func startPhase(phase service.Phase) { if verbose { go printEvents() } + // switch master server phase resp, err := controlServiceClient.SwitchPhase(context.Background(), &service.SwitchPhaseMessage{Phase: phase}) if err != nil { fmt.Printf("Failed to communicate with qmstr-master server. %v\n", err) @@ -53,3 +65,35 @@ func startPhase(phase service.Phase) { os.Exit(ReturnCodeResponseFalseError) } } + +func startAnalyzers() { + close(PingAnalyzer) // Ping modules to start! + waitModulesToFinish() + + // Close analysis phase + controlServiceClient.ClosePhase(context.Background(), &service.Request{}) +} + +func startReporters() { + close(PingReporter) // Ping modules to start! + waitModulesToFinish() + // No need to close phase +} + +func waitModulesToFinish() { + // wait until all modules have finished + ModulesAreDone = make(chan struct{}) + log.Printf("Waiting for modules to finish.. \n") + <-ModulesAreDone // <-- THIS MAY NOT WORK!!! Select{} + log.Printf("All modules have finished! \n") +} + +func logModuleError(moduleName string, output []byte) { + var buffer bytes.Buffer + buffer.WriteString(fmt.Sprintf("%s failed with:\n", moduleName)) + s := bufio.NewScanner(strings.NewReader(string(output))) + for s.Scan() { + buffer.WriteString(fmt.Sprintf("\t--> %s\n", s.Text())) + } + log.Println(buffer.String()) +} diff --git a/lib/go-qmstr/cli/start.go b/lib/go-qmstr/cli/start.go index 29decaf..23add13 100644 --- a/lib/go-qmstr/cli/start.go +++ b/lib/go-qmstr/cli/start.go @@ -47,9 +47,16 @@ var wait bool var debug bool var seed string +// PingAnalyzer is the channel which pings the analyzers +// to start their processes +var PingAnalyzer chan struct{} + +// PingReporter is the channel which pings the reporters +// to start their processes +var PingReporter chan struct{} + func getConfig() (*config.MasterConfig, error) { var err error - if _, err := os.Stat(configFile); err != nil { return nil, err } @@ -72,6 +79,8 @@ func startMaster(cmd *cobra.Command, args []string) { if err != nil { Log.Fatalf("unable to determine current working directory") } + PingAnalyzer = make(chan struct{}) // initialize analyzers channel + PingReporter = make(chan struct{}) // initialize reporters channel config, err := getConfig() if err != nil { diff --git a/lib/go-qmstr/master/analyze.go b/lib/go-qmstr/master/analyze.go index 6244298..98bba6b 100644 --- a/lib/go-qmstr/master/analyze.go +++ b/lib/go-qmstr/master/analyze.go @@ -1,12 +1,12 @@ package master import ( + "encoding/json" "errors" "fmt" "io" "log" "math/rand" - "os/exec" "path/filepath" "time" @@ -33,40 +33,31 @@ func newAnalysisPhase(masterConfig *config.MasterConfig, db *database.DataBase, func (phase *serverPhaseAnalysis) Activate() error { log.Println("Analysis activated") phase.server.publishEvent(&service.Event{Class: service.EventClass_PHASE, Message: "Activating analysis phase"}) - for idx, anaConfig := range phase.masterConfig.Analysis { - analyzerName := anaConfig.Analyzer + return nil +} - analyzer, err := phase.db.GetAnalyzerByName(analyzerName) - if err != nil { - return err - } - phase.currentAnalyzer = analyzer - src.Seed(phase.currentToken) - phase.currentToken = src.Int63() - phase.currentAnalyzer.TrustLevel = anaConfig.TrustLevel - - log.Printf("Running analyzer %s ...\n", analyzerName) - phase.db.OpenInsertQueue() - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Running analyzer %s", analyzerName)}) - cmd := exec.Command(analyzerName, "--aserv", phase.masterConfig.Server.RPCAddress, "--aid", fmt.Sprintf("%d", idx)) - out, err := cmd.CombinedOutput() - if err != nil { - logModuleError(analyzerName, out) - errMsg := fmt.Sprintf("Analyzer %s failed", analyzerName) - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: errMsg}) - phase.db.CloseInsertQueue() - return errors.New(errMsg) - } - phase.db.CloseInsertQueue() - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Analyzer %s successfully finished", analyzerName)}) - log.Printf("Analyzer %s finished successfully:\n%s\n", analyzerName, out) +func (phase *serverPhaseAnalysis) InitModule(in *service.InitModuleRequest) (*service.Response, error) { + analyzer, err := phase.db.GetAnalyzerByName(in.ModuleName) + if err != nil { + return nil, err } + phase.currentAnalyzer = analyzer + src.Seed(phase.currentToken) + phase.currentToken = src.Int63() + phase.currentAnalyzer.TrustLevel = in.ExtraConfig + + log.Printf("Running analyzer %s ...\n", in.ModuleName) + phase.db.OpenInsertQueue() + phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Running analyzer %s", in.ModuleName)}) + return &service.Response{}, nil +} +func (phase *serverPhaseAnalysis) ClosePhase(in *service.Request) (*service.Response, error) { phase.finished <- nil phase.done = true phase.server.persistPhase() log.Println("Analysis phase finished") - return nil + return &service.Response{}, nil } func (phase *serverPhaseAnalysis) Shutdown() error { @@ -101,8 +92,11 @@ func (phase *serverPhaseAnalysis) GetAnalyzerConfig(in *service.AnalyzerConfigRe config.PathSub = phase.masterConfig.Server.PathSub } phase.currentAnalyzer.PathSub = config.PathSub - return &service.AnalyzerConfigResponse{ConfigMap: config.Config, PathSub: config.PathSub, - Token: phase.currentToken, Name: config.Name}, nil + out, err := json.Marshal(config) + if err != nil { + return nil, err + } + return &service.AnalyzerConfigResponse{AnalyzerConfig: string(out), Token: phase.currentToken}, nil } func (phase *serverPhaseAnalysis) SendInfoNodes(stream service.AnalysisService_SendInfoNodesServer) error { diff --git a/lib/go-qmstr/master/common.go b/lib/go-qmstr/master/common.go index e9655ac..1c95dc1 100644 --- a/lib/go-qmstr/master/common.go +++ b/lib/go-qmstr/master/common.go @@ -21,6 +21,8 @@ type serverPhase interface { getDone() bool getName() string Activate() error + InitModule(*service.InitModuleRequest) (*service.Response, error) + ClosePhase(*service.Request) (*service.Response, error) Shutdown() error getDataBase() (*database.DataBase, error) getError() string @@ -124,6 +126,14 @@ func (gsp *genericServerPhase) GetAnalyzerConfig(in *service.AnalyzerConfigReque return nil, ErrWrongPhase } +func (gsp *genericServerPhase) InitModule(in *service.InitModuleRequest) (*service.Response, error) { + return nil, ErrWrongPhase +} + +func (gsp *genericServerPhase) ClosePhase(*service.Request) (*service.Response, error) { + return nil, ErrWrongPhase +} + func (gsp *genericServerPhase) SendInfoNodes(stream service.AnalysisService_SendInfoNodesServer) error { return ErrWrongPhase } diff --git a/lib/go-qmstr/master/master.go b/lib/go-qmstr/master/master.go index 44085fd..1201afa 100644 --- a/lib/go-qmstr/master/master.go +++ b/lib/go-qmstr/master/master.go @@ -1,14 +1,11 @@ package master import ( - "bufio" - "bytes" "errors" "fmt" "io" "log" "net" - "strings" "sync" "sync/atomic" @@ -285,6 +282,30 @@ func (s *server) switchPhase(requestedPhase service.Phase, done bool) error { return fmt.Errorf("Invalid phase requested %d", requestedPhase) } +// Initialize analyzer/reporter module +func (s *server) InitModule(ctx context.Context, in *service.InitModuleRequest) (*service.Response, error) { + return s.currentPhase.InitModule(in) +} + +func (s *server) ClosePhase(ctx context.Context, in *service.Request) (*service.Response, error) { + return s.currentPhase.ClosePhase(in) +} + +// Shutdown gracefully the analyzer/reporter module +func (s *server) ShutdownModule(ctx context.Context, in *service.ShutdownModuleRequest) (*service.Response, error) { + s.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: in.Message}) + if in.DB == true { + db, err := s.currentPhase.getDataBase() + if err != nil { + // switch to failure phase + s.enterFailureServerPhase(err) + return nil, err + } + db.CloseInsertQueue() + } + return &service.Response{}, nil +} + func (s *server) Log(ctx context.Context, in *service.LogMessage) (*service.LogResponse, error) { log.Printf("REMOTE: %s", string(in.Msg)) return &service.LogResponse{Success: true}, nil @@ -362,16 +383,6 @@ func InitAndRun(masterConfig *config.MasterConfig) (chan error, error) { return masterRun, nil } -func logModuleError(moduleName string, output []byte) { - var buffer bytes.Buffer - buffer.WriteString(fmt.Sprintf("%s failed with:\n", moduleName)) - s := bufio.NewScanner(strings.NewReader(string(output))) - for s.Scan() { - buffer.WriteString(fmt.Sprintf("\t--> %s\n", s.Text())) - } - log.Println(buffer.String()) -} - func (s *server) persistPhase() error { if s.pendingPhaseSwitch != 0 { return errors.New("Can not persist phase while switching") diff --git a/lib/go-qmstr/master/report.go b/lib/go-qmstr/master/report.go index 377bbaa..be9e5d3 100644 --- a/lib/go-qmstr/master/report.go +++ b/lib/go-qmstr/master/report.go @@ -1,10 +1,8 @@ package master import ( - "errors" "fmt" "log" - "os/exec" "path/filepath" "strings" @@ -26,25 +24,15 @@ func newReportPhase(masterConfig *config.MasterConfig, db *database.DataBase, se func (phase *serverPhaseReport) Activate() error { log.Println("Reporting activated") phase.server.publishEvent(&service.Event{Class: service.EventClass_PHASE, Message: "Activating reporting phase"}) - for idx, reporterConfig := range phase.masterConfig.Reporting { - reporterName := reporterConfig.Reporter - - log.Printf("Running reporter %s ...\n", reporterName) - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Running reporter %s", reporterName)}) - cmd := exec.Command(reporterName, "--rserv", phase.masterConfig.Server.RPCAddress, "--rid", fmt.Sprintf("%d", idx)) - out, err := cmd.CombinedOutput() - if err != nil { - logModuleError(reporterName, out) - errMsg := fmt.Sprintf("Reporter %s failed: %v", reporterName, err) - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: errMsg}) - return errors.New(errMsg) - } - phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Reporter %s successfully finished", reporterName)}) - log.Printf("Reporter %s finished successfully:\n%s\n", reporterName, out) - } return nil } +func (phase *serverPhaseReport) InitModule(in *service.InitModuleRequest) (*service.Response, error) { + log.Printf("Running reporter %s ...\n", in.ModuleName) + phase.server.publishEvent(&service.Event{Class: service.EventClass_MODULE, Message: fmt.Sprintf("Running reporter %s", in.ModuleName)}) + return &service.Response{}, nil +} + func (phase *serverPhaseReport) Shutdown() error { return nil } diff --git a/lib/go-qmstr/module/serviceconnection.go b/lib/go-qmstr/module/serviceconnection.go index a3bf8b6..bcf0952 100644 --- a/lib/go-qmstr/module/serviceconnection.go +++ b/lib/go-qmstr/module/serviceconnection.go @@ -2,6 +2,7 @@ package module import ( "log" + "os" "github.com/QMSTR/qmstr/lib/go-qmstr/service" "google.golang.org/grpc" @@ -14,7 +15,14 @@ type MasterClient struct { } func NewMasterClient(serviceAddress string) MasterClient { - conn, err := grpc.Dial(serviceAddress, grpc.WithInsecure(), grpc.WithBlock()) + // Connect to qmstr master instance + if len(serviceAddress) == 0 { + serviceAddress = os.Getenv("QMSTR_MASTER") + } + if len(serviceAddress) == 0 { + log.Fatalf("Error: master address not specified") + } + conn, err := grpc.Dial(serviceAddress, grpc.WithInsecure()) if err != nil { log.Fatalf("Failed to connect to master: %v", err) } diff --git a/lib/go-qmstr/reporting/reporter.go b/lib/go-qmstr/reporting/reporter.go index d6108d2..84d43b0 100644 --- a/lib/go-qmstr/reporting/reporter.go +++ b/lib/go-qmstr/reporting/reporter.go @@ -2,12 +2,14 @@ package reporting import ( "fmt" + "log" "os" "golang.org/x/net/context" goflag "flag" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/module" "github.com/QMSTR/qmstr/lib/go-qmstr/service" flag "github.com/spf13/pflag" @@ -28,18 +30,21 @@ type ReporterModule interface { PostReport() error } +var CountReporters int32 + // NewReporter creates a new reporter. func NewReporter(repModule ReporterModule) *Reporter { var serviceAddress string - var anaID int32 - flag.StringVar(&serviceAddress, "rserv", "localhost:50051", "Reporting service address") - flag.Int32Var(&anaID, "rid", -1, "unique reporter id") + var rprID int32 + CountReporters++ + flag.StringVar(&serviceAddress, "rserv", "", "connect to reporting service address") + flag.Int32Var(&rprID, "rid", -1, "unique reporter id") flag.CommandLine.AddGoFlagSet(goflag.CommandLine) flag.Parse() mc := module.NewMasterClient(serviceAddress) - return &Reporter{MasterClient: mc, id: anaID, module: repModule} + return &Reporter{MasterClient: mc, id: rprID, module: repModule} } // GetModuleName returns the module name @@ -69,6 +74,12 @@ func (r *Reporter) RunReporterModule() error { return fmt.Errorf("failed to create output directory \"%s\" for module %s: %v", outDir, r.GetModuleName(), err) } + // Initialize reporter + _, err = r.CtrlSvcClient.InitModule(context.Background(), &service.InitModuleRequest{ + ModuleName: r.name}) + if err != nil { + return fmt.Errorf("%v: %v", err, cli.ReturnCodeServerCommunicationError) + } err = r.module.Configure(configResp.ConfigMap) if err != nil { return fmt.Errorf("failed to configure reporter module %s: %v", r.GetModuleName(), err) @@ -83,5 +94,23 @@ func (r *Reporter) RunReporterModule() error { return fmt.Errorf("reporter %s failed in PostReport: %v", r.name, err) } + msg := fmt.Sprintf("Reporter %s finished successfully", r.name) + log.Println(msg) + // Ping master server that the reporter finished + r.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{Message: msg, DB: false}) + return nil } + +// ReduceReportersCounter is called everytime a reporter finishes its process. +// When it reaches 0, it sends a signal to close the reporting phase +func ReduceReportersCounter() { + CountReporters-- + if CountReporters == 0 { // all reporters have finished + // close reporting phase + close(cli.ModulesAreDone) + } + if CountReporters < 0 { + log.Printf("WARNING: Reporters count cannot be minus") + } +} diff --git a/lib/go-qmstr/service/analyzerservice.pb.go b/lib/go-qmstr/service/analyzerservice.pb.go index d4f7381..83ea001 100644 --- a/lib/go-qmstr/service/analyzerservice.pb.go +++ b/lib/go-qmstr/service/analyzerservice.pb.go @@ -64,13 +64,11 @@ func (m *AnalyzerConfigRequest) GetAnalyzerID() int32 { } type AnalyzerConfigResponse struct { - ConfigMap map[string]string `protobuf:"bytes,2,rep,name=configMap,proto3" json:"configMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - PathSub []*PathSubstitution `protobuf:"bytes,3,rep,name=pathSub,proto3" json:"pathSub,omitempty"` - Token int64 `protobuf:"varint,4,opt,name=token,proto3" json:"token,omitempty"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AnalyzerConfig string `protobuf:"bytes,1,opt,name=analyzerConfig,proto3" json:"analyzerConfig,omitempty"` + Token int64 `protobuf:"varint,2,opt,name=token,proto3" json:"token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *AnalyzerConfigResponse) Reset() { *m = AnalyzerConfigResponse{} } @@ -98,18 +96,11 @@ func (m *AnalyzerConfigResponse) XXX_DiscardUnknown() { var xxx_messageInfo_AnalyzerConfigResponse proto.InternalMessageInfo -func (m *AnalyzerConfigResponse) GetConfigMap() map[string]string { - if m != nil { - return m.ConfigMap - } - return nil -} - -func (m *AnalyzerConfigResponse) GetPathSub() []*PathSubstitution { +func (m *AnalyzerConfigResponse) GetAnalyzerConfig() string { if m != nil { - return m.PathSub + return m.AnalyzerConfig } - return nil + return "" } func (m *AnalyzerConfigResponse) GetToken() int64 { @@ -119,13 +110,6 @@ func (m *AnalyzerConfigResponse) GetToken() int64 { return 0 } -func (m *AnalyzerConfigResponse) GetName() string { - if m != nil { - return m.Name - } - return "" -} - type InfoNodesMessage struct { Token int64 `protobuf:"varint,1,opt,name=token,proto3" json:"token,omitempty"` Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` @@ -309,7 +293,6 @@ var xxx_messageInfo_DummyRequest proto.InternalMessageInfo func init() { proto.RegisterType((*AnalyzerConfigRequest)(nil), "service.AnalyzerConfigRequest") proto.RegisterType((*AnalyzerConfigResponse)(nil), "service.AnalyzerConfigResponse") - proto.RegisterMapType((map[string]string)(nil), "service.AnalyzerConfigResponse.ConfigMapEntry") proto.RegisterType((*InfoNodesMessage)(nil), "service.InfoNodesMessage") proto.RegisterType((*DiagnosticNodeMessage)(nil), "service.DiagnosticNodeMessage") proto.RegisterType((*SendResponse)(nil), "service.SendResponse") @@ -319,38 +302,33 @@ func init() { func init() { proto.RegisterFile("analyzerservice.proto", fileDescriptor_8bd400d4a2b5e8aa) } var fileDescriptor_8bd400d4a2b5e8aa = []byte{ - // 492 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xdf, 0x6f, 0xd3, 0x30, - 0x10, 0xc7, 0xeb, 0x66, 0x5b, 0xe9, 0x6d, 0x74, 0x9d, 0x45, 0x47, 0xd6, 0x87, 0x51, 0xe5, 0x29, - 0x4f, 0x01, 0x75, 0x0f, 0x20, 0x84, 0x84, 0xd8, 0x3a, 0xa6, 0x49, 0x0c, 0x90, 0x2b, 0x21, 0x5e, - 0xbd, 0xe4, 0x1a, 0xac, 0x36, 0x76, 0x16, 0x3b, 0x93, 0xca, 0x13, 0x12, 0x7f, 0x1b, 0xff, 0x17, - 0xca, 0xef, 0x74, 0x0c, 0xd0, 0xde, 0x7c, 0xe7, 0xbb, 0xcf, 0xf7, 0xce, 0x77, 0x86, 0x11, 0x97, - 0x7c, 0xb5, 0xfe, 0x8e, 0x89, 0xc6, 0xe4, 0x56, 0xf8, 0xe8, 0xc5, 0x89, 0x32, 0x8a, 0xf6, 0x4a, - 0x73, 0xbc, 0x1f, 0x70, 0xc3, 0x23, 0x15, 0xe0, 0xaa, 0xb8, 0x71, 0x5e, 0xc2, 0xe8, 0x5d, 0x99, - 0x72, 0xa6, 0xe4, 0x42, 0x84, 0x0c, 0x6f, 0x52, 0xd4, 0x86, 0x1e, 0x03, 0x54, 0xac, 0xcb, 0x99, - 0x4d, 0x26, 0xc4, 0xdd, 0x66, 0x2d, 0x8f, 0xf3, 0xb3, 0x0b, 0x87, 0x77, 0x33, 0x75, 0xac, 0xa4, - 0x46, 0xfa, 0x01, 0xfa, 0x7e, 0xee, 0xb9, 0xe2, 0xb1, 0xdd, 0x9d, 0x58, 0xee, 0xee, 0xd4, 0xf3, - 0xaa, 0x82, 0xee, 0xcf, 0xf1, 0xce, 0xaa, 0x84, 0x73, 0x69, 0x92, 0x35, 0x6b, 0x00, 0xf4, 0x04, - 0x7a, 0x31, 0x37, 0xdf, 0xe6, 0xe9, 0xb5, 0x6d, 0xe5, 0xac, 0xa3, 0x9a, 0xf5, 0xb9, 0xf0, 0x6b, - 0x23, 0x4c, 0x6a, 0x84, 0x92, 0xac, 0x8a, 0xa4, 0x4f, 0x60, 0xdb, 0xa8, 0x25, 0x4a, 0x7b, 0x6b, - 0x42, 0x5c, 0x8b, 0x15, 0x06, 0xa5, 0xb0, 0x25, 0x79, 0x84, 0xf6, 0xce, 0x84, 0xb8, 0x7d, 0x96, - 0x9f, 0xc7, 0x6f, 0x60, 0xb0, 0xa9, 0x4d, 0x87, 0x60, 0x2d, 0x71, 0x9d, 0xb7, 0xdc, 0x67, 0xd9, - 0x31, 0xa3, 0xdd, 0xf2, 0x55, 0x8a, 0x76, 0x37, 0xf7, 0x15, 0xc6, 0xeb, 0xee, 0x2b, 0xe2, 0x2c, - 0x61, 0x78, 0x29, 0x17, 0xea, 0xa3, 0x0a, 0x50, 0x5f, 0xa1, 0xd6, 0x3c, 0xc4, 0x46, 0x9b, 0xb4, - 0xb5, 0x87, 0x60, 0xa5, 0x22, 0x28, 0x09, 0xd9, 0x91, 0x3e, 0x87, 0xbe, 0x90, 0x0b, 0x25, 0xb3, - 0xdc, 0xb2, 0xb5, 0x83, 0xba, 0xb5, 0x8a, 0xca, 0x9a, 0x18, 0xe7, 0x07, 0x81, 0xd1, 0x4c, 0xf0, - 0x50, 0x2a, 0x6d, 0x84, 0x9f, 0xdd, 0x3e, 0x54, 0xf2, 0x2d, 0x0c, 0x82, 0x1a, 0x90, 0x41, 0x6d, - 0x6b, 0x42, 0xdc, 0xdd, 0xe9, 0xd3, 0x5a, 0x77, 0x93, 0xcf, 0xee, 0x84, 0x3b, 0x2e, 0xec, 0xcd, - 0x51, 0x06, 0xf5, 0xa8, 0x6d, 0xe8, 0xe9, 0xd4, 0xf7, 0x51, 0xeb, 0x5c, 0xfa, 0x11, 0xab, 0x4c, - 0x67, 0x00, 0x7b, 0xb3, 0x34, 0x8a, 0xd6, 0xe5, 0x3e, 0x4d, 0x7f, 0x75, 0x61, 0x3f, 0x9f, 0xbd, - 0x16, 0x7a, 0x5e, 0x88, 0xd1, 0x2f, 0x70, 0x70, 0x81, 0x66, 0x73, 0x23, 0xe8, 0xf1, 0x5f, 0x57, - 0x25, 0x07, 0x8d, 0x9f, 0xfd, 0x67, 0x95, 0x9c, 0x0e, 0x3d, 0x87, 0xc7, 0x59, 0x95, 0xf5, 0x64, - 0xe8, 0xd1, 0x1f, 0xef, 0x5a, 0x4d, 0x6b, 0x3c, 0xaa, 0xaf, 0xda, 0x8d, 0x39, 0x1d, 0x97, 0xd0, - 0x4f, 0x40, 0x33, 0xdf, 0xe6, 0x93, 0xb4, 0xea, 0xbb, 0x77, 0x16, 0xff, 0x02, 0x9e, 0x02, 0xbd, - 0x40, 0x33, 0x57, 0x69, 0xe2, 0xe3, 0x7b, 0xb1, 0xc2, 0xa2, 0xb8, 0x26, 0xa1, 0xfd, 0x60, 0xe3, - 0x66, 0x17, 0xaa, 0x50, 0xa7, 0xf3, 0x82, 0x9c, 0xda, 0x70, 0xa8, 0x92, 0xd0, 0xbb, 0x89, 0xb4, - 0x49, 0xbc, 0x30, 0x89, 0xfd, 0x2a, 0xec, 0x6b, 0xe7, 0x7a, 0x27, 0xff, 0xd3, 0x27, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0xff, 0x8c, 0x0d, 0x77, 0x06, 0x04, 0x00, 0x00, + // 407 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xf5, 0xd6, 0x2a, 0x25, 0xd3, 0x92, 0xb6, 0x2b, 0x5c, 0x8c, 0x0f, 0xc5, 0xda, 0x03, 0xf2, + 0xc9, 0xa0, 0x70, 0xe0, 0x88, 0x28, 0x81, 0x2a, 0x07, 0x40, 0xda, 0x48, 0x11, 0x57, 0x63, 0x4f, + 0xac, 0x55, 0xe2, 0xdd, 0xc4, 0xbb, 0x46, 0x0a, 0x27, 0xfe, 0x1c, 0xff, 0x0b, 0xd9, 0x8e, 0xbf, + 0x42, 0x40, 0xea, 0xcd, 0x33, 0xf3, 0xde, 0x9b, 0xf1, 0x7b, 0x36, 0x38, 0x91, 0x8c, 0xd6, 0xbb, + 0x9f, 0x98, 0x6b, 0xcc, 0x7f, 0x88, 0x18, 0xc3, 0x4d, 0xae, 0x8c, 0xa2, 0x67, 0xfb, 0xd2, 0xbb, + 0x4c, 0x22, 0x13, 0x65, 0x2a, 0xc1, 0x75, 0x3d, 0x61, 0x6f, 0xc1, 0x79, 0xbf, 0xa7, 0x7c, 0x50, + 0x72, 0x29, 0x52, 0x8e, 0xdb, 0x02, 0xb5, 0xa1, 0xb7, 0x00, 0x8d, 0xd6, 0x6c, 0xea, 0x12, 0x9f, + 0x04, 0xa7, 0xbc, 0xd7, 0x61, 0x0b, 0xb8, 0x39, 0x24, 0xea, 0x8d, 0x92, 0x1a, 0xe9, 0x4b, 0x18, + 0x47, 0x83, 0x49, 0xc5, 0x1e, 0xf1, 0x83, 0x2e, 0x7d, 0x0a, 0xa7, 0x46, 0xad, 0x50, 0xba, 0x27, + 0x3e, 0x09, 0x6c, 0x5e, 0x17, 0x6c, 0x05, 0x57, 0x33, 0xb9, 0x54, 0x5f, 0x54, 0x82, 0xfa, 0x33, + 0x6a, 0x1d, 0xa5, 0xd8, 0x21, 0x49, 0x0f, 0x49, 0xaf, 0xc0, 0x2e, 0x44, 0x52, 0xb1, 0x47, 0xbc, + 0x7c, 0xa4, 0xaf, 0x60, 0x24, 0xe4, 0x52, 0xc9, 0x92, 0xeb, 0xda, 0xbe, 0x1d, 0x9c, 0x4f, 0xae, + 0xc3, 0xc6, 0x89, 0x46, 0x95, 0x77, 0x18, 0xf6, 0x8b, 0x80, 0x33, 0x15, 0x51, 0x2a, 0x95, 0x36, + 0x22, 0x2e, 0xa7, 0x0f, 0x5d, 0xf9, 0x0e, 0xc6, 0x49, 0x2b, 0x50, 0x8a, 0xba, 0xb6, 0x4f, 0x82, + 0xf3, 0xc9, 0xb3, 0x76, 0xef, 0x50, 0x9f, 0x1f, 0xc0, 0x59, 0x00, 0x17, 0x73, 0x94, 0x49, 0xeb, + 0x9e, 0x0b, 0x67, 0xba, 0x88, 0x63, 0xd4, 0xba, 0x5a, 0xfd, 0x98, 0x37, 0x25, 0x1b, 0xc3, 0xc5, + 0xb4, 0xc8, 0xb2, 0xdd, 0x3e, 0xa1, 0xc9, 0xef, 0x13, 0xb8, 0xac, 0x22, 0xd0, 0x42, 0xcf, 0xeb, + 0x65, 0x74, 0x01, 0xd7, 0xf7, 0x68, 0x86, 0xc1, 0xd0, 0xdb, 0xf6, 0x96, 0xa3, 0x51, 0x7b, 0x2f, + 0xfe, 0x39, 0xaf, 0x6f, 0x62, 0x16, 0xfd, 0x08, 0x4f, 0xca, 0x2b, 0xdb, 0x64, 0xe8, 0xf3, 0xbf, + 0x7c, 0x6d, 0xd2, 0xf2, 0x9c, 0x76, 0xd4, 0x7f, 0x31, 0x66, 0x05, 0x84, 0x7e, 0x05, 0x5a, 0xf6, + 0x86, 0x96, 0xf4, 0xee, 0x3b, 0x9a, 0xc5, 0xff, 0x04, 0xef, 0x80, 0xde, 0xa3, 0x99, 0xab, 0x22, + 0x8f, 0xf1, 0x93, 0x58, 0x63, 0x7d, 0x5c, 0x47, 0xe8, 0x1b, 0xe6, 0x75, 0xdf, 0x42, 0x03, 0x65, + 0xd6, 0x6b, 0x72, 0xe7, 0xc2, 0x8d, 0xca, 0xd3, 0x70, 0x9b, 0x69, 0x93, 0x87, 0x69, 0xbe, 0x89, + 0x1b, 0xd8, 0x37, 0xeb, 0xfb, 0xa3, 0xea, 0x2f, 0x79, 0xf3, 0x27, 0x00, 0x00, 0xff, 0xff, 0x2e, + 0x37, 0x55, 0x7a, 0x58, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/lib/go-qmstr/service/controlservice.pb.go b/lib/go-qmstr/service/controlservice.pb.go index 8e1c5ce..682537b 100644 --- a/lib/go-qmstr/service/controlservice.pb.go +++ b/lib/go-qmstr/service/controlservice.pb.go @@ -548,6 +548,162 @@ func (m *ExportResponse) GetSuccess() bool { return false } +type InitModuleRequest struct { + ModuleName string `protobuf:"bytes,1,opt,name=moduleName,proto3" json:"moduleName,omitempty"` + ExtraConfig int64 `protobuf:"varint,2,opt,name=extraConfig,proto3" json:"extraConfig,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InitModuleRequest) Reset() { *m = InitModuleRequest{} } +func (m *InitModuleRequest) String() string { return proto.CompactTextString(m) } +func (*InitModuleRequest) ProtoMessage() {} +func (*InitModuleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_931c7f2b376aa187, []int{12} +} + +func (m *InitModuleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InitModuleRequest.Unmarshal(m, b) +} +func (m *InitModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InitModuleRequest.Marshal(b, m, deterministic) +} +func (m *InitModuleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InitModuleRequest.Merge(m, src) +} +func (m *InitModuleRequest) XXX_Size() int { + return xxx_messageInfo_InitModuleRequest.Size(m) +} +func (m *InitModuleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InitModuleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_InitModuleRequest proto.InternalMessageInfo + +func (m *InitModuleRequest) GetModuleName() string { + if m != nil { + return m.ModuleName + } + return "" +} + +func (m *InitModuleRequest) GetExtraConfig() int64 { + if m != nil { + return m.ExtraConfig + } + return 0 +} + +type Request struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_931c7f2b376aa187, []int{13} +} + +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (m *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(m, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +type Response struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { + return fileDescriptor_931c7f2b376aa187, []int{14} +} + +func (m *Response) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Response.Unmarshal(m, b) +} +func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Response.Marshal(b, m, deterministic) +} +func (m *Response) XXX_Merge(src proto.Message) { + xxx_messageInfo_Response.Merge(m, src) +} +func (m *Response) XXX_Size() int { + return xxx_messageInfo_Response.Size(m) +} +func (m *Response) XXX_DiscardUnknown() { + xxx_messageInfo_Response.DiscardUnknown(m) +} + +var xxx_messageInfo_Response proto.InternalMessageInfo + +type ShutdownModuleRequest struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + DB bool `protobuf:"varint,2,opt,name=dB,proto3" json:"dB,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ShutdownModuleRequest) Reset() { *m = ShutdownModuleRequest{} } +func (m *ShutdownModuleRequest) String() string { return proto.CompactTextString(m) } +func (*ShutdownModuleRequest) ProtoMessage() {} +func (*ShutdownModuleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_931c7f2b376aa187, []int{15} +} + +func (m *ShutdownModuleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ShutdownModuleRequest.Unmarshal(m, b) +} +func (m *ShutdownModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ShutdownModuleRequest.Marshal(b, m, deterministic) +} +func (m *ShutdownModuleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ShutdownModuleRequest.Merge(m, src) +} +func (m *ShutdownModuleRequest) XXX_Size() int { + return xxx_messageInfo_ShutdownModuleRequest.Size(m) +} +func (m *ShutdownModuleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ShutdownModuleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ShutdownModuleRequest proto.InternalMessageInfo + +func (m *ShutdownModuleRequest) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *ShutdownModuleRequest) GetDB() bool { + if m != nil { + return m.DB + } + return false +} + func init() { proto.RegisterType((*LogMessage)(nil), "service.LogMessage") proto.RegisterType((*LogResponse)(nil), "service.LogResponse") @@ -561,52 +717,63 @@ func init() { proto.RegisterType((*EventMessage)(nil), "service.EventMessage") proto.RegisterType((*ExportRequest)(nil), "service.ExportRequest") proto.RegisterType((*ExportResponse)(nil), "service.ExportResponse") + proto.RegisterType((*InitModuleRequest)(nil), "service.InitModuleRequest") + proto.RegisterType((*Request)(nil), "service.Request") + proto.RegisterType((*Response)(nil), "service.Response") + proto.RegisterType((*ShutdownModuleRequest)(nil), "service.ShutdownModuleRequest") } func init() { proto.RegisterFile("controlservice.proto", fileDescriptor_931c7f2b376aa187) } var fileDescriptor_931c7f2b376aa187 = []byte{ - // 629 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5d, 0x4f, 0xdb, 0x3c, - 0x14, 0xc7, 0x5b, 0x68, 0x79, 0x39, 0x85, 0xf0, 0x60, 0x0a, 0x4f, 0x94, 0x21, 0xc4, 0xbc, 0x69, - 0xeb, 0x26, 0xad, 0x9a, 0x3a, 0xed, 0x62, 0x6f, 0x12, 0x1b, 0x30, 0xc4, 0xc4, 0x26, 0x96, 0xee, - 0x62, 0xb7, 0x26, 0xf5, 0x8c, 0x45, 0x88, 0x83, 0xed, 0xc0, 0xbe, 0xca, 0xbe, 0xc3, 0x3e, 0xe4, - 0x14, 0x27, 0x4e, 0x9c, 0x95, 0x8a, 0xdd, 0xd9, 0xe7, 0xfc, 0xfd, 0xf3, 0x39, 0xce, 0xff, 0x04, - 0xfa, 0x91, 0x48, 0xb4, 0x14, 0xb1, 0xa2, 0xf2, 0x9a, 0x47, 0x74, 0x98, 0x4a, 0xa1, 0x05, 0x5a, - 0x2c, 0xb7, 0xc1, 0xda, 0x84, 0x68, 0x72, 0x29, 0x26, 0x34, 0x2e, 0x32, 0x78, 0x07, 0xe0, 0x44, - 0xb0, 0xcf, 0x54, 0x29, 0xc2, 0x28, 0xfa, 0x0f, 0xe6, 0x2f, 0x15, 0xf3, 0xdb, 0xbb, 0xed, 0xc1, - 0x4a, 0x98, 0x2f, 0xf1, 0x63, 0xe8, 0x9d, 0x08, 0x16, 0x52, 0x95, 0x8a, 0x44, 0x51, 0xe4, 0xc3, - 0xa2, 0xca, 0xa2, 0x88, 0x2a, 0x65, 0x44, 0x4b, 0xa1, 0xdd, 0xe2, 0xfb, 0xd0, 0xfb, 0x9a, 0x71, - 0x6d, 0x49, 0x08, 0x3a, 0x17, 0x3c, 0x8e, 0x4b, 0x95, 0x59, 0xe3, 0x01, 0xac, 0xe4, 0x92, 0x7f, - 0x80, 0xbd, 0x06, 0x34, 0xbe, 0xe1, 0x3a, 0x3a, 0x3f, 0x3d, 0x27, 0x8a, 0x5a, 0xe6, 0x43, 0xe8, - 0xa6, 0xf9, 0xde, 0xa8, 0xbd, 0x91, 0x37, 0xb4, 0x4d, 0x1a, 0x55, 0x58, 0x24, 0xf1, 0x21, 0x6c, - 0x38, 0x67, 0xef, 0xbe, 0x0c, 0xf5, 0xa1, 0x4b, 0xa5, 0x14, 0xd2, 0x9f, 0xdb, 0x6d, 0x0f, 0x96, - 0xc3, 0x62, 0x83, 0x23, 0x40, 0x47, 0x54, 0x7f, 0xe4, 0x31, 0xfd, 0x22, 0x26, 0x55, 0x09, 0xcf, - 0x60, 0xe9, 0x47, 0x19, 0x32, 0x98, 0xde, 0x68, 0xbd, 0xaa, 0xc2, 0x6a, 0xc3, 0x4a, 0x82, 0x76, - 0x00, 0xb2, 0x84, 0x5f, 0x65, 0xc5, 0x81, 0x39, 0x73, 0xaf, 0x13, 0xc1, 0xef, 0x60, 0x75, 0xac, - 0x89, 0xce, 0x94, 0xe5, 0xf7, 0xdd, 0x16, 0x97, 0xca, 0x96, 0xd0, 0x16, 0x2c, 0x28, 0xd3, 0x52, - 0x89, 0x28, 0x77, 0xf8, 0x77, 0x1b, 0xbc, 0xe2, 0x7c, 0xd5, 0x66, 0x03, 0xb0, 0x6c, 0x01, 0x03, - 0x58, 0x34, 0x8b, 0xe3, 0x03, 0x43, 0x98, 0x7e, 0x3b, 0x9b, 0x46, 0xdb, 0xb0, 0x5c, 0xc0, 0x79, - 0xc2, 0xfc, 0x79, 0x73, 0x5b, 0x1d, 0xa8, 0x9f, 0xaa, 0xe3, 0x3c, 0x15, 0x7a, 0x04, 0x5e, 0x4a, - 0x93, 0x09, 0x4f, 0xd8, 0x71, 0xa2, 0xa8, 0xd4, 0xca, 0xef, 0xee, 0xb6, 0x07, 0x9d, 0xf0, 0xaf, - 0x28, 0x7e, 0x05, 0x2b, 0x87, 0xd7, 0x34, 0xa9, 0x3c, 0xf2, 0x04, 0xba, 0x51, 0x4c, 0xca, 0x0f, - 0xe2, 0x8d, 0x36, 0xaa, 0x9a, 0x8c, 0x6a, 0x3f, 0x4f, 0x85, 0x85, 0x02, 0x3f, 0x80, 0xd5, 0xc3, - 0x9f, 0xa9, 0x90, 0x3a, 0xa4, 0x57, 0x19, 0x55, 0x3a, 0xf7, 0xd7, 0x0d, 0xe1, 0xda, 0xfa, 0x2b, - 0x5f, 0xe3, 0xa7, 0xe0, 0x59, 0xd1, 0x5d, 0x1f, 0x7d, 0xf4, 0xab, 0x0b, 0xde, 0x7e, 0x31, 0x2a, - 0xe3, 0xe2, 0x56, 0x34, 0x82, 0xf9, 0x13, 0xc1, 0x50, 0x5d, 0x46, 0x3d, 0x18, 0x41, 0xdf, 0x0d, - 0x5a, 0x3c, 0x6e, 0xa1, 0x97, 0xd0, 0xc9, 0x2d, 0x8d, 0xea, 0xbc, 0x33, 0x04, 0xc1, 0x66, 0x23, - 0xea, 0x1c, 0xfb, 0x04, 0x3d, 0xc7, 0xa3, 0xe8, 0x5e, 0xa5, 0x9b, 0x76, 0x7d, 0xb0, 0x7d, 0x5b, - 0xd2, 0x61, 0xed, 0x81, 0x77, 0x44, 0xf5, 0x29, 0x89, 0x2e, 0x08, 0x2b, 0x5c, 0x57, 0x17, 0xe3, - 0x44, 0x83, 0x5b, 0xa3, 0xb8, 0xf5, 0xbc, 0x8d, 0xf6, 0x60, 0xbd, 0x26, 0x7c, 0x23, 0x92, 0x51, - 0xad, 0x66, 0x40, 0xa6, 0xdd, 0x6e, 0x08, 0xef, 0xa1, 0xe7, 0x0c, 0x8b, 0xd3, 0xcf, 0xf4, 0x08, - 0xcd, 0x42, 0x1c, 0x9b, 0x22, 0x0e, 0x38, 0x61, 0x89, 0x50, 0x9a, 0x47, 0x06, 0xf4, 0x7f, 0xa5, - 0x6d, 0x26, 0x82, 0x59, 0x09, 0x83, 0x7a, 0x03, 0x0b, 0xc5, 0x54, 0xa0, 0xad, 0xfa, 0xed, 0xdc, - 0x31, 0x73, 0x8e, 0x37, 0xc7, 0x07, 0xb7, 0xd0, 0x5b, 0x58, 0x1b, 0x67, 0x67, 0x2a, 0x92, 0xfc, - 0x8c, 0x1a, 0x1f, 0x2a, 0xb4, 0xd9, 0x34, 0xa6, 0x85, 0x78, 0xcd, 0xb0, 0xb9, 0x7a, 0xdf, 0x5a, - 0x70, 0x9c, 0x90, 0x54, 0x9d, 0x0b, 0xed, 0x94, 0xd0, 0x30, 0xb0, 0x53, 0x42, 0xd3, 0xb3, 0xb8, - 0xf5, 0xc1, 0x87, 0x2d, 0x21, 0xd9, 0xf0, 0xea, 0x52, 0x69, 0x39, 0x64, 0x32, 0x8d, 0xac, 0xf4, - 0x7b, 0xeb, 0x6c, 0xc1, 0xfc, 0xb6, 0x5f, 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0x88, 0x5d, 0x39, - 0x5d, 0xe8, 0x05, 0x00, 0x00, + // 750 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xdd, 0x4e, 0xdb, 0x4a, + 0x10, 0xce, 0xff, 0xcf, 0x04, 0x0c, 0x2c, 0x81, 0x13, 0xf9, 0xa0, 0x28, 0x67, 0x4f, 0xd5, 0xa6, + 0x95, 0x1a, 0x55, 0x41, 0xbd, 0xe8, 0x0f, 0x12, 0x10, 0x52, 0x94, 0x0a, 0x10, 0x75, 0x5a, 0xa9, + 0xb7, 0xc6, 0x5e, 0x1c, 0x0b, 0xc7, 0x1b, 0xbc, 0x6b, 0xe0, 0xa1, 0xfa, 0x38, 0x7d, 0xa0, 0xca, + 0x6b, 0xaf, 0xbd, 0x6e, 0x42, 0xe9, 0x9d, 0x77, 0xe6, 0x9b, 0x6f, 0x66, 0xbe, 0xdd, 0x19, 0x43, + 0xdb, 0xa2, 0x3e, 0x0f, 0xa8, 0xc7, 0x48, 0x70, 0xe7, 0x5a, 0x64, 0xb0, 0x08, 0x28, 0xa7, 0xa8, + 0x9e, 0x1c, 0xf5, 0x0d, 0xdb, 0xe4, 0xe6, 0x9c, 0xda, 0xc4, 0x8b, 0x3d, 0xb8, 0x0b, 0x70, 0x46, + 0x9d, 0x73, 0xc2, 0x98, 0xe9, 0x10, 0xb4, 0x09, 0xe5, 0x39, 0x73, 0x3a, 0xc5, 0x5e, 0xb1, 0xbf, + 0x66, 0x44, 0x9f, 0xf8, 0x05, 0xb4, 0xce, 0xa8, 0x63, 0x10, 0xb6, 0xa0, 0x3e, 0x23, 0xa8, 0x03, + 0x75, 0x16, 0x5a, 0x16, 0x61, 0x4c, 0x80, 0x1a, 0x86, 0x3c, 0xe2, 0xff, 0xa0, 0xf5, 0x25, 0x74, + 0xb9, 0x64, 0x42, 0x50, 0xb9, 0x71, 0x3d, 0x2f, 0x41, 0x89, 0x6f, 0xdc, 0x87, 0xb5, 0x08, 0xf2, + 0x17, 0x64, 0xef, 0x01, 0x4d, 0xef, 0x5d, 0x6e, 0xcd, 0x2e, 0x67, 0x26, 0x23, 0x92, 0xf3, 0x19, + 0x54, 0x17, 0xd1, 0x59, 0xa0, 0xb5, 0xa1, 0x36, 0x90, 0x4d, 0x0a, 0x94, 0x11, 0x3b, 0xf1, 0x18, + 0xb6, 0x95, 0xd8, 0xa7, 0x93, 0xa1, 0x36, 0x54, 0x49, 0x10, 0xd0, 0xa0, 0x53, 0xea, 0x15, 0xfb, + 0x4d, 0x23, 0x3e, 0x60, 0x0b, 0xd0, 0x29, 0xe1, 0x9f, 0x5c, 0x8f, 0x5c, 0x50, 0x3b, 0x2d, 0xe1, + 0x35, 0x34, 0xae, 0x13, 0x93, 0xa0, 0x69, 0x0d, 0xb7, 0xd2, 0x2a, 0x24, 0xd6, 0x48, 0x21, 0xa8, + 0x0b, 0x10, 0xfa, 0xee, 0x6d, 0x18, 0x07, 0x94, 0x44, 0x5e, 0xc5, 0x82, 0x0f, 0x60, 0x7d, 0xca, + 0x4d, 0x1e, 0x32, 0xc9, 0xdf, 0x56, 0x5b, 0x6c, 0x24, 0x2d, 0xa1, 0x5d, 0xa8, 0x31, 0xd1, 0x52, + 0x42, 0x91, 0x9c, 0xf0, 0x8f, 0x22, 0x68, 0x71, 0x7c, 0xda, 0x66, 0x8e, 0xa0, 0x29, 0x09, 0xfa, + 0x50, 0x17, 0x1f, 0x93, 0x13, 0xc1, 0xb0, 0xac, 0x9d, 0x74, 0xa3, 0x3d, 0x68, 0xc6, 0xe4, 0xae, + 0xef, 0x74, 0xca, 0x22, 0x5b, 0x66, 0xc8, 0xa4, 0xaa, 0x28, 0x52, 0xa1, 0xe7, 0xa0, 0x2d, 0x88, + 0x6f, 0xbb, 0xbe, 0x33, 0xf1, 0x19, 0x09, 0x38, 0xeb, 0x54, 0x7b, 0xc5, 0x7e, 0xc5, 0xf8, 0xcd, + 0x8a, 0xdf, 0xc1, 0xda, 0xf8, 0x8e, 0xf8, 0xe9, 0x1b, 0x79, 0x09, 0x55, 0xcb, 0x33, 0x93, 0x0b, + 0xd1, 0x86, 0xdb, 0x69, 0x4d, 0x02, 0x35, 0x8a, 0x5c, 0x46, 0x8c, 0xc0, 0xff, 0xc3, 0xfa, 0xf8, + 0x61, 0x41, 0x03, 0x6e, 0x90, 0xdb, 0x90, 0x30, 0x1e, 0xbd, 0xaf, 0x7b, 0xd3, 0xe5, 0xf2, 0x7d, + 0x45, 0xdf, 0xf8, 0x15, 0x68, 0x12, 0xf4, 0xe4, 0x0b, 0xfb, 0x06, 0x5b, 0x13, 0xdf, 0xe5, 0xe7, + 0xd4, 0x0e, 0x3d, 0x22, 0x49, 0xbb, 0x00, 0x73, 0x61, 0xb8, 0x30, 0xe7, 0x52, 0x41, 0xc5, 0x82, + 0x7a, 0xd0, 0x22, 0x0f, 0x3c, 0x30, 0x47, 0xd4, 0xbf, 0x76, 0x1d, 0x21, 0x65, 0xd9, 0x50, 0x4d, + 0xb8, 0x09, 0xf5, 0x84, 0x0c, 0x03, 0x34, 0x64, 0x1d, 0xf8, 0x08, 0x76, 0xa6, 0xb3, 0x90, 0xdb, + 0xf4, 0xde, 0xcf, 0x67, 0xec, 0x40, 0x7d, 0x1e, 0xab, 0x91, 0xa4, 0x93, 0x47, 0xa4, 0x41, 0xc9, + 0x3e, 0x4e, 0xee, 0xbb, 0x64, 0x1f, 0x0f, 0x7f, 0xd6, 0x40, 0x1b, 0xc5, 0xb3, 0x3d, 0x8d, 0x65, + 0x42, 0x43, 0x28, 0x9f, 0x51, 0x07, 0x65, 0xba, 0x65, 0x93, 0xac, 0xb7, 0x55, 0x63, 0x5a, 0x47, + 0x01, 0xbd, 0x85, 0x4a, 0x34, 0x83, 0x28, 0xf3, 0x2b, 0x53, 0xab, 0xef, 0xe4, 0xac, 0x4a, 0xd8, + 0x67, 0x68, 0x29, 0x43, 0x85, 0xfe, 0x4d, 0x71, 0xcb, 0x63, 0xaa, 0xef, 0xad, 0x72, 0x2a, 0x5c, + 0x07, 0x00, 0x99, 0xf4, 0x48, 0x4f, 0xd1, 0x4b, 0xf7, 0xa1, 0x67, 0xb3, 0xa5, 0x84, 0x8f, 0x41, + 0xcb, 0x6b, 0x89, 0xba, 0x59, 0xc2, 0x55, 0x22, 0xaf, 0xa6, 0xd9, 0x07, 0x18, 0x79, 0x94, 0x91, + 0xb8, 0xa1, 0x4d, 0x05, 0xf2, 0x87, 0xa0, 0x43, 0xd0, 0x4e, 0x09, 0xbf, 0x34, 0xad, 0x1b, 0xd3, + 0x89, 0x27, 0x3c, 0xd3, 0x51, 0xb1, 0xea, 0x2b, 0xad, 0xb8, 0xf0, 0xa6, 0x88, 0x0e, 0x61, 0x2b, + 0x63, 0xf8, 0x6a, 0x06, 0x0e, 0xe1, 0xec, 0x11, 0x92, 0xe5, 0xcd, 0x22, 0x18, 0x8e, 0xa0, 0xa5, + 0x2c, 0x26, 0xe5, 0x2a, 0x96, 0xd7, 0xd5, 0x63, 0x14, 0x13, 0x51, 0xc4, 0x89, 0x6b, 0x3a, 0x3e, + 0x65, 0xdc, 0xb5, 0x04, 0xd1, 0x3f, 0x29, 0x36, 0xef, 0xd0, 0x1f, 0x73, 0x08, 0xaa, 0x0f, 0x50, + 0x8b, 0x37, 0x10, 0xda, 0xcd, 0x6e, 0x41, 0x5d, 0x69, 0x4a, 0x78, 0x7e, 0x55, 0xe1, 0x02, 0xfa, + 0x08, 0x1b, 0xd3, 0xf0, 0x8a, 0x59, 0x81, 0x7b, 0x45, 0xc4, 0xcc, 0x33, 0xb4, 0x93, 0x5f, 0x02, + 0x92, 0x44, 0xcb, 0x9b, 0x45, 0xea, 0x91, 0x1c, 0xf7, 0xa9, 0x6f, 0x2e, 0xd8, 0x8c, 0x72, 0xa5, + 0x84, 0xdc, 0xb2, 0x50, 0x4a, 0xc8, 0xef, 0x07, 0x5c, 0x38, 0xee, 0xc0, 0x2e, 0x0d, 0x9c, 0xc1, + 0xed, 0x9c, 0xf1, 0x60, 0xe0, 0x04, 0x0b, 0x4b, 0x42, 0xbf, 0x17, 0xae, 0x6a, 0xe2, 0x17, 0xb9, + 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x33, 0xa8, 0xa1, 0x54, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -624,6 +791,9 @@ type ControlServiceClient interface { Log(ctx context.Context, in *LogMessage, opts ...grpc.CallOption) (*LogResponse, error) Quit(ctx context.Context, in *QuitMessage, opts ...grpc.CallOption) (*QuitResponse, error) SwitchPhase(ctx context.Context, in *SwitchPhaseMessage, opts ...grpc.CallOption) (*SwitchPhaseResponse, error) + InitModule(ctx context.Context, in *InitModuleRequest, opts ...grpc.CallOption) (*Response, error) + ShutdownModule(ctx context.Context, in *ShutdownModuleRequest, opts ...grpc.CallOption) (*Response, error) + ClosePhase(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) GetPackageNode(ctx context.Context, in *PackageNode, opts ...grpc.CallOption) (ControlService_GetPackageNodeClient, error) GetPackageTargets(ctx context.Context, in *PackageNode, opts ...grpc.CallOption) (ControlService_GetPackageTargetsClient, error) GetFileNode(ctx context.Context, in *GetFileNodeMessage, opts ...grpc.CallOption) (ControlService_GetFileNodeClient, error) @@ -668,6 +838,33 @@ func (c *controlServiceClient) SwitchPhase(ctx context.Context, in *SwitchPhaseM return out, nil } +func (c *controlServiceClient) InitModule(ctx context.Context, in *InitModuleRequest, opts ...grpc.CallOption) (*Response, error) { + out := new(Response) + err := c.cc.Invoke(ctx, "/service.ControlService/InitModule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlServiceClient) ShutdownModule(ctx context.Context, in *ShutdownModuleRequest, opts ...grpc.CallOption) (*Response, error) { + out := new(Response) + err := c.cc.Invoke(ctx, "/service.ControlService/ShutdownModule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlServiceClient) ClosePhase(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { + out := new(Response) + err := c.cc.Invoke(ctx, "/service.ControlService/ClosePhase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *controlServiceClient) GetPackageNode(ctx context.Context, in *PackageNode, opts ...grpc.CallOption) (ControlService_GetPackageNodeClient, error) { stream, err := c.cc.NewStream(ctx, &_ControlService_serviceDesc.Streams[0], "/service.ControlService/GetPackageNode", opts...) if err != nil { @@ -851,6 +1048,9 @@ type ControlServiceServer interface { Log(context.Context, *LogMessage) (*LogResponse, error) Quit(context.Context, *QuitMessage) (*QuitResponse, error) SwitchPhase(context.Context, *SwitchPhaseMessage) (*SwitchPhaseResponse, error) + InitModule(context.Context, *InitModuleRequest) (*Response, error) + ShutdownModule(context.Context, *ShutdownModuleRequest) (*Response, error) + ClosePhase(context.Context, *Request) (*Response, error) GetPackageNode(*PackageNode, ControlService_GetPackageNodeServer) error GetPackageTargets(*PackageNode, ControlService_GetPackageTargetsServer) error GetFileNode(*GetFileNodeMessage, ControlService_GetFileNodeServer) error @@ -873,6 +1073,15 @@ func (*UnimplementedControlServiceServer) Quit(ctx context.Context, req *QuitMes func (*UnimplementedControlServiceServer) SwitchPhase(ctx context.Context, req *SwitchPhaseMessage) (*SwitchPhaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SwitchPhase not implemented") } +func (*UnimplementedControlServiceServer) InitModule(ctx context.Context, req *InitModuleRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitModule not implemented") +} +func (*UnimplementedControlServiceServer) ShutdownModule(ctx context.Context, req *ShutdownModuleRequest) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method ShutdownModule not implemented") +} +func (*UnimplementedControlServiceServer) ClosePhase(ctx context.Context, req *Request) (*Response, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClosePhase not implemented") +} func (*UnimplementedControlServiceServer) GetPackageNode(req *PackageNode, srv ControlService_GetPackageNodeServer) error { return status.Errorf(codes.Unimplemented, "method GetPackageNode not implemented") } @@ -953,6 +1162,60 @@ func _ControlService_SwitchPhase_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _ControlService_InitModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InitModuleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServiceServer).InitModule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/service.ControlService/InitModule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServiceServer).InitModule(ctx, req.(*InitModuleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControlService_ShutdownModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ShutdownModuleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServiceServer).ShutdownModule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/service.ControlService/ShutdownModule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServiceServer).ShutdownModule(ctx, req.(*ShutdownModuleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ControlService_ClosePhase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Request) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServiceServer).ClosePhase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/service.ControlService/ClosePhase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServiceServer).ClosePhase(ctx, req.(*Request)) + } + return interceptor(ctx, in, info, handler) +} + func _ControlService_GetPackageNode_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(PackageNode) if err := stream.RecvMsg(m); err != nil { @@ -1110,6 +1373,18 @@ var _ControlService_serviceDesc = grpc.ServiceDesc{ MethodName: "SwitchPhase", Handler: _ControlService_SwitchPhase_Handler, }, + { + MethodName: "InitModule", + Handler: _ControlService_InitModule_Handler, + }, + { + MethodName: "ShutdownModule", + Handler: _ControlService_ShutdownModule_Handler, + }, + { + MethodName: "ClosePhase", + Handler: _ControlService_ClosePhase_Handler, + }, { MethodName: "Status", Handler: _ControlService_Status_Handler, diff --git a/lib/java-qmstr/src/main/grpc/org/qmstr/grpc/service/ControlServiceGrpc.java b/lib/java-qmstr/src/main/grpc/org/qmstr/grpc/service/ControlServiceGrpc.java index aea1d9f..8594c01 100644 --- a/lib/java-qmstr/src/main/grpc/org/qmstr/grpc/service/ControlServiceGrpc.java +++ b/lib/java-qmstr/src/main/grpc/org/qmstr/grpc/service/ControlServiceGrpc.java @@ -123,6 +123,102 @@ org.qmstr.grpc.service.Controlservice.SwitchPhaseResponse> getSwitchPhaseMethod( return getSwitchPhaseMethod; } + private static volatile io.grpc.MethodDescriptor getInitModuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InitModule", + requestType = org.qmstr.grpc.service.Controlservice.InitModuleRequest.class, + responseType = org.qmstr.grpc.service.Controlservice.Response.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getInitModuleMethod() { + io.grpc.MethodDescriptor getInitModuleMethod; + if ((getInitModuleMethod = ControlServiceGrpc.getInitModuleMethod) == null) { + synchronized (ControlServiceGrpc.class) { + if ((getInitModuleMethod = ControlServiceGrpc.getInitModuleMethod) == null) { + ControlServiceGrpc.getInitModuleMethod = getInitModuleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "service.ControlService", "InitModule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.InitModuleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.Response.getDefaultInstance())) + .setSchemaDescriptor(new ControlServiceMethodDescriptorSupplier("InitModule")) + .build(); + } + } + } + return getInitModuleMethod; + } + + private static volatile io.grpc.MethodDescriptor getShutdownModuleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ShutdownModule", + requestType = org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.class, + responseType = org.qmstr.grpc.service.Controlservice.Response.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getShutdownModuleMethod() { + io.grpc.MethodDescriptor getShutdownModuleMethod; + if ((getShutdownModuleMethod = ControlServiceGrpc.getShutdownModuleMethod) == null) { + synchronized (ControlServiceGrpc.class) { + if ((getShutdownModuleMethod = ControlServiceGrpc.getShutdownModuleMethod) == null) { + ControlServiceGrpc.getShutdownModuleMethod = getShutdownModuleMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "service.ControlService", "ShutdownModule")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.Response.getDefaultInstance())) + .setSchemaDescriptor(new ControlServiceMethodDescriptorSupplier("ShutdownModule")) + .build(); + } + } + } + return getShutdownModuleMethod; + } + + private static volatile io.grpc.MethodDescriptor getClosePhaseMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ClosePhase", + requestType = org.qmstr.grpc.service.Controlservice.Request.class, + responseType = org.qmstr.grpc.service.Controlservice.Response.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getClosePhaseMethod() { + io.grpc.MethodDescriptor getClosePhaseMethod; + if ((getClosePhaseMethod = ControlServiceGrpc.getClosePhaseMethod) == null) { + synchronized (ControlServiceGrpc.class) { + if ((getClosePhaseMethod = ControlServiceGrpc.getClosePhaseMethod) == null) { + ControlServiceGrpc.getClosePhaseMethod = getClosePhaseMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "service.ControlService", "ClosePhase")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.Request.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.qmstr.grpc.service.Controlservice.Response.getDefaultInstance())) + .setSchemaDescriptor(new ControlServiceMethodDescriptorSupplier("ClosePhase")) + .build(); + } + } + } + return getClosePhaseMethod; + } + private static volatile io.grpc.MethodDescriptor getGetPackageNodeMethod; @@ -395,6 +491,27 @@ public void switchPhase(org.qmstr.grpc.service.Controlservice.SwitchPhaseMessage asyncUnimplementedUnaryCall(getSwitchPhaseMethod(), responseObserver); } + /** + */ + public void initModule(org.qmstr.grpc.service.Controlservice.InitModuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getInitModuleMethod(), responseObserver); + } + + /** + */ + public void shutdownModule(org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getShutdownModuleMethod(), responseObserver); + } + + /** + */ + public void closePhase(org.qmstr.grpc.service.Controlservice.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getClosePhaseMethod(), responseObserver); + } + /** */ public void getPackageNode(org.qmstr.grpc.service.Datamodel.PackageNode request, @@ -467,6 +584,27 @@ public void exportSnapshot(org.qmstr.grpc.service.Controlservice.ExportRequest r org.qmstr.grpc.service.Controlservice.SwitchPhaseMessage, org.qmstr.grpc.service.Controlservice.SwitchPhaseResponse>( this, METHODID_SWITCH_PHASE))) + .addMethod( + getInitModuleMethod(), + asyncUnaryCall( + new MethodHandlers< + org.qmstr.grpc.service.Controlservice.InitModuleRequest, + org.qmstr.grpc.service.Controlservice.Response>( + this, METHODID_INIT_MODULE))) + .addMethod( + getShutdownModuleMethod(), + asyncUnaryCall( + new MethodHandlers< + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest, + org.qmstr.grpc.service.Controlservice.Response>( + this, METHODID_SHUTDOWN_MODULE))) + .addMethod( + getClosePhaseMethod(), + asyncUnaryCall( + new MethodHandlers< + org.qmstr.grpc.service.Controlservice.Request, + org.qmstr.grpc.service.Controlservice.Response>( + this, METHODID_CLOSE_PHASE))) .addMethod( getGetPackageNodeMethod(), asyncServerStreamingCall( @@ -562,6 +700,30 @@ public void switchPhase(org.qmstr.grpc.service.Controlservice.SwitchPhaseMessage getChannel().newCall(getSwitchPhaseMethod(), getCallOptions()), request, responseObserver); } + /** + */ + public void initModule(org.qmstr.grpc.service.Controlservice.InitModuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getInitModuleMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void shutdownModule(org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getShutdownModuleMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void closePhase(org.qmstr.grpc.service.Controlservice.Request request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getClosePhaseMethod(), getCallOptions()), request, responseObserver); + } + /** */ public void getPackageNode(org.qmstr.grpc.service.Datamodel.PackageNode request, @@ -658,6 +820,27 @@ public org.qmstr.grpc.service.Controlservice.SwitchPhaseResponse switchPhase(org getChannel(), getSwitchPhaseMethod(), getCallOptions(), request); } + /** + */ + public org.qmstr.grpc.service.Controlservice.Response initModule(org.qmstr.grpc.service.Controlservice.InitModuleRequest request) { + return blockingUnaryCall( + getChannel(), getInitModuleMethod(), getCallOptions(), request); + } + + /** + */ + public org.qmstr.grpc.service.Controlservice.Response shutdownModule(org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest request) { + return blockingUnaryCall( + getChannel(), getShutdownModuleMethod(), getCallOptions(), request); + } + + /** + */ + public org.qmstr.grpc.service.Controlservice.Response closePhase(org.qmstr.grpc.service.Controlservice.Request request) { + return blockingUnaryCall( + getChannel(), getClosePhaseMethod(), getCallOptions(), request); + } + /** */ public java.util.Iterator getPackageNode( @@ -755,6 +938,30 @@ public com.google.common.util.concurrent.ListenableFuture initModule( + org.qmstr.grpc.service.Controlservice.InitModuleRequest request) { + return futureUnaryCall( + getChannel().newCall(getInitModuleMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture shutdownModule( + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest request) { + return futureUnaryCall( + getChannel().newCall(getShutdownModuleMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture closePhase( + org.qmstr.grpc.service.Controlservice.Request request) { + return futureUnaryCall( + getChannel().newCall(getClosePhaseMethod(), getCallOptions()), request); + } + /** */ public com.google.common.util.concurrent.ListenableFuture status( @@ -775,13 +982,16 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -812,6 +1022,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.switchPhase((org.qmstr.grpc.service.Controlservice.SwitchPhaseMessage) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_INIT_MODULE: + serviceImpl.initModule((org.qmstr.grpc.service.Controlservice.InitModuleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SHUTDOWN_MODULE: + serviceImpl.shutdownModule((org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CLOSE_PHASE: + serviceImpl.closePhase((org.qmstr.grpc.service.Controlservice.Request) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_GET_PACKAGE_NODE: serviceImpl.getPackageNode((org.qmstr.grpc.service.Datamodel.PackageNode) request, (io.grpc.stub.StreamObserver) responseObserver); @@ -904,6 +1126,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getLogMethod()) .addMethod(getQuitMethod()) .addMethod(getSwitchPhaseMethod()) + .addMethod(getInitModuleMethod()) + .addMethod(getShutdownModuleMethod()) + .addMethod(getClosePhaseMethod()) .addMethod(getGetPackageNodeMethod()) .addMethod(getGetPackageTargetsMethod()) .addMethod(getGetFileNodeMethod()) diff --git a/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Analyzerservice.java b/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Analyzerservice.java index 8157809..b21e7af 100644 --- a/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Analyzerservice.java +++ b/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Analyzerservice.java @@ -470,77 +470,19 @@ public interface AnalyzerConfigResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * map<string, string> configMap = 2; + * string analyzerConfig = 1; */ - int getConfigMapCount(); + java.lang.String getAnalyzerConfig(); /** - * map<string, string> configMap = 2; + * string analyzerConfig = 1; */ - boolean containsConfigMap( - java.lang.String key); - /** - * Use {@link #getConfigMapMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getConfigMap(); - /** - * map<string, string> configMap = 2; - */ - java.util.Map - getConfigMapMap(); - /** - * map<string, string> configMap = 2; - */ - - java.lang.String getConfigMapOrDefault( - java.lang.String key, - java.lang.String defaultValue); - /** - * map<string, string> configMap = 2; - */ - - java.lang.String getConfigMapOrThrow( - java.lang.String key); - - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - java.util.List - getPathSubList(); - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - org.qmstr.grpc.service.Datamodel.PathSubstitution getPathSub(int index); - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - int getPathSubCount(); - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - java.util.List - getPathSubOrBuilderList(); - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder getPathSubOrBuilder( - int index); + com.google.protobuf.ByteString + getAnalyzerConfigBytes(); /** - * int64 token = 4; + * int64 token = 2; */ long getToken(); - - /** - * string name = 6; - */ - java.lang.String getName(); - /** - * string name = 6; - */ - com.google.protobuf.ByteString - getNameBytes(); } /** * Protobuf type {@code service.AnalyzerConfigResponse} @@ -555,9 +497,8 @@ private AnalyzerConfigResponse(com.google.protobuf.GeneratedMessageV3.Builder super(builder); } private AnalyzerConfigResponse() { - pathSub_ = java.util.Collections.emptyList(); + analyzerConfig_ = ""; token_ = 0L; - name_ = ""; } @java.lang.Override @@ -591,37 +532,15 @@ private AnalyzerConfigResponse( } break; } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - configMap_ = com.google.protobuf.MapField.newMapField( - ConfigMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - configMap__ = input.readMessage( - ConfigMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - configMap_.getMutableMap().put( - configMap__.getKey(), configMap__.getValue()); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - pathSub_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - pathSub_.add( - input.readMessage(org.qmstr.grpc.service.Datamodel.PathSubstitution.parser(), extensionRegistry)); - break; - } - case 32: { + case 10: { + java.lang.String s = input.readStringRequireUtf8(); - token_ = input.readInt64(); + analyzerConfig_ = s; break; } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); + case 16: { - name_ = s; + token_ = input.readInt64(); break; } } @@ -632,9 +551,6 @@ private AnalyzerConfigResponse( throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - pathSub_ = java.util.Collections.unmodifiableList(pathSub_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -644,17 +560,6 @@ private AnalyzerConfigResponse( return org.qmstr.grpc.service.Analyzerservice.internal_static_service_AnalyzerConfigResponse_descriptor; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetConfigMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.qmstr.grpc.service.Analyzerservice.internal_static_service_AnalyzerConfigResponse_fieldAccessorTable @@ -662,161 +567,49 @@ protected com.google.protobuf.MapField internalGetMapField( org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse.class, org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse.Builder.class); } - private int bitField0_; - public static final int CONFIGMAP_FIELD_NUMBER = 2; - private static final class ConfigMapDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - org.qmstr.grpc.service.Analyzerservice.internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> configMap_; - private com.google.protobuf.MapField - internalGetConfigMap() { - if (configMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigMapDefaultEntryHolder.defaultEntry); - } - return configMap_; - } - - public int getConfigMapCount() { - return internalGetConfigMap().getMap().size(); - } - /** - * map<string, string> configMap = 2; - */ - - public boolean containsConfigMap( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetConfigMap().getMap().containsKey(key); - } - /** - * Use {@link #getConfigMapMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getConfigMap() { - return getConfigMapMap(); - } - /** - * map<string, string> configMap = 2; - */ - - public java.util.Map getConfigMapMap() { - return internalGetConfigMap().getMap(); - } - /** - * map<string, string> configMap = 2; - */ - - public java.lang.String getConfigMapOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetConfigMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> configMap = 2; - */ - - public java.lang.String getConfigMapOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetConfigMap().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int PATHSUB_FIELD_NUMBER = 3; - private java.util.List pathSub_; + public static final int ANALYZERCONFIG_FIELD_NUMBER = 1; + private volatile java.lang.Object analyzerConfig_; /** - * repeated .service.PathSubstitution pathSub = 3; + * string analyzerConfig = 1; */ - public java.util.List getPathSubList() { - return pathSub_; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public java.util.List - getPathSubOrBuilderList() { - return pathSub_; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public int getPathSubCount() { - return pathSub_.size(); - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitution getPathSub(int index) { - return pathSub_.get(index); - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder getPathSubOrBuilder( - int index) { - return pathSub_.get(index); - } - - public static final int TOKEN_FIELD_NUMBER = 4; - private long token_; - /** - * int64 token = 4; - */ - public long getToken() { - return token_; - } - - public static final int NAME_FIELD_NUMBER = 6; - private volatile java.lang.Object name_; - /** - * string name = 6; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getAnalyzerConfig() { + java.lang.Object ref = analyzerConfig_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + analyzerConfig_ = s; return s; } } /** - * string name = 6; + * string analyzerConfig = 1; */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getAnalyzerConfigBytes() { + java.lang.Object ref = analyzerConfig_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + analyzerConfig_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int TOKEN_FIELD_NUMBER = 2; + private long token_; + /** + * int64 token = 2; + */ + public long getToken() { + return token_; + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -829,20 +622,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetConfigMap(), - ConfigMapDefaultEntryHolder.defaultEntry, - 2); - for (int i = 0; i < pathSub_.size(); i++) { - output.writeMessage(3, pathSub_.get(i)); + if (!getAnalyzerConfigBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analyzerConfig_); } if (token_ != 0L) { - output.writeInt64(4, token_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_); + output.writeInt64(2, token_); } unknownFields.writeTo(output); } @@ -852,26 +636,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (java.util.Map.Entry entry - : internalGetConfigMap().getMap().entrySet()) { - com.google.protobuf.MapEntry - configMap__ = ConfigMapDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, configMap__); - } - for (int i = 0; i < pathSub_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, pathSub_.get(i)); + if (!getAnalyzerConfigBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, analyzerConfig_); } if (token_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, token_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_); + .computeInt64Size(2, token_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -889,14 +659,10 @@ public boolean equals(final java.lang.Object obj) { org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse other = (org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse) obj; boolean result = true; - result = result && internalGetConfigMap().equals( - other.internalGetConfigMap()); - result = result && getPathSubList() - .equals(other.getPathSubList()); + result = result && getAnalyzerConfig() + .equals(other.getAnalyzerConfig()); result = result && (getToken() == other.getToken()); - result = result && getName() - .equals(other.getName()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -908,19 +674,11 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetConfigMap().getMap().isEmpty()) { - hash = (37 * hash) + CONFIGMAP_FIELD_NUMBER; - hash = (53 * hash) + internalGetConfigMap().hashCode(); - } - if (getPathSubCount() > 0) { - hash = (37 * hash) + PATHSUB_FIELD_NUMBER; - hash = (53 * hash) + getPathSubList().hashCode(); - } + hash = (37 * hash) + ANALYZERCONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAnalyzerConfig().hashCode(); hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getToken()); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1026,28 +784,6 @@ public static final class Builder extends return org.qmstr.grpc.service.Analyzerservice.internal_static_service_AnalyzerConfigResponse_descriptor; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 2: - return internalGetConfigMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 2: - return internalGetMutableConfigMap(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.qmstr.grpc.service.Analyzerservice.internal_static_service_AnalyzerConfigResponse_fieldAccessorTable @@ -1068,21 +804,13 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getPathSubFieldBuilder(); } } public Builder clear() { super.clear(); - internalGetMutableConfigMap().clear(); - if (pathSubBuilder_ == null) { - pathSub_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - pathSubBuilder_.clear(); - } - token_ = 0L; + analyzerConfig_ = ""; - name_ = ""; + token_ = 0L; return this; } @@ -1106,22 +834,8 @@ public org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse build() { public org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse buildPartial() { org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse result = new org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.configMap_ = internalGetConfigMap(); - result.configMap_.makeImmutable(); - if (pathSubBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - pathSub_ = java.util.Collections.unmodifiableList(pathSub_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.pathSub_ = pathSub_; - } else { - result.pathSub_ = pathSubBuilder_.build(); - } + result.analyzerConfig_ = analyzerConfig_; result.token_ = token_; - result.name_ = name_; - result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -1163,41 +877,13 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse other) { if (other == org.qmstr.grpc.service.Analyzerservice.AnalyzerConfigResponse.getDefaultInstance()) return this; - internalGetMutableConfigMap().mergeFrom( - other.internalGetConfigMap()); - if (pathSubBuilder_ == null) { - if (!other.pathSub_.isEmpty()) { - if (pathSub_.isEmpty()) { - pathSub_ = other.pathSub_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePathSubIsMutable(); - pathSub_.addAll(other.pathSub_); - } - onChanged(); - } - } else { - if (!other.pathSub_.isEmpty()) { - if (pathSubBuilder_.isEmpty()) { - pathSubBuilder_.dispose(); - pathSubBuilder_ = null; - pathSub_ = other.pathSub_; - bitField0_ = (bitField0_ & ~0x00000002); - pathSubBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPathSubFieldBuilder() : null; - } else { - pathSubBuilder_.addAllMessages(other.pathSub_); - } - } + if (!other.getAnalyzerConfig().isEmpty()) { + analyzerConfig_ = other.analyzerConfig_; + onChanged(); } if (other.getToken() != 0L) { setToken(other.getToken()); } - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1224,462 +910,98 @@ public Builder mergeFrom( } return this; } - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> configMap_; - private com.google.protobuf.MapField - internalGetConfigMap() { - if (configMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ConfigMapDefaultEntryHolder.defaultEntry); - } - return configMap_; - } - private com.google.protobuf.MapField - internalGetMutableConfigMap() { - onChanged();; - if (configMap_ == null) { - configMap_ = com.google.protobuf.MapField.newMapField( - ConfigMapDefaultEntryHolder.defaultEntry); - } - if (!configMap_.isMutable()) { - configMap_ = configMap_.copy(); - } - return configMap_; - } - - public int getConfigMapCount() { - return internalGetConfigMap().getMap().size(); - } - /** - * map<string, string> configMap = 2; - */ - - public boolean containsConfigMap( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetConfigMap().getMap().containsKey(key); - } - /** - * Use {@link #getConfigMapMap()} instead. - */ - @java.lang.Deprecated - public java.util.Map getConfigMap() { - return getConfigMapMap(); - } - /** - * map<string, string> configMap = 2; - */ - - public java.util.Map getConfigMapMap() { - return internalGetConfigMap().getMap(); - } - /** - * map<string, string> configMap = 2; - */ - - public java.lang.String getConfigMapOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetConfigMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> configMap = 2; - */ - - public java.lang.String getConfigMapOrThrow( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - java.util.Map map = - internalGetConfigMap().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearConfigMap() { - internalGetMutableConfigMap().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> configMap = 2; - */ - - public Builder removeConfigMap( - java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutableConfigMap().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableConfigMap() { - return internalGetMutableConfigMap().getMutableMap(); - } - /** - * map<string, string> configMap = 2; - */ - public Builder putConfigMap( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableConfigMap().getMutableMap() - .put(key, value); - return this; - } - /** - * map<string, string> configMap = 2; - */ - - public Builder putAllConfigMap( - java.util.Map values) { - internalGetMutableConfigMap().getMutableMap() - .putAll(values); - return this; - } - - private java.util.List pathSub_ = - java.util.Collections.emptyList(); - private void ensurePathSubIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - pathSub_ = new java.util.ArrayList(pathSub_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - org.qmstr.grpc.service.Datamodel.PathSubstitution, org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder, org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder> pathSubBuilder_; - - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public java.util.List getPathSubList() { - if (pathSubBuilder_ == null) { - return java.util.Collections.unmodifiableList(pathSub_); - } else { - return pathSubBuilder_.getMessageList(); - } - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public int getPathSubCount() { - if (pathSubBuilder_ == null) { - return pathSub_.size(); - } else { - return pathSubBuilder_.getCount(); - } - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitution getPathSub(int index) { - if (pathSubBuilder_ == null) { - return pathSub_.get(index); - } else { - return pathSubBuilder_.getMessage(index); - } - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder setPathSub( - int index, org.qmstr.grpc.service.Datamodel.PathSubstitution value) { - if (pathSubBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathSubIsMutable(); - pathSub_.set(index, value); - onChanged(); - } else { - pathSubBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder setPathSub( - int index, org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder builderForValue) { - if (pathSubBuilder_ == null) { - ensurePathSubIsMutable(); - pathSub_.set(index, builderForValue.build()); - onChanged(); - } else { - pathSubBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder addPathSub(org.qmstr.grpc.service.Datamodel.PathSubstitution value) { - if (pathSubBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathSubIsMutable(); - pathSub_.add(value); - onChanged(); - } else { - pathSubBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder addPathSub( - int index, org.qmstr.grpc.service.Datamodel.PathSubstitution value) { - if (pathSubBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePathSubIsMutable(); - pathSub_.add(index, value); - onChanged(); - } else { - pathSubBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder addPathSub( - org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder builderForValue) { - if (pathSubBuilder_ == null) { - ensurePathSubIsMutable(); - pathSub_.add(builderForValue.build()); - onChanged(); - } else { - pathSubBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder addPathSub( - int index, org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder builderForValue) { - if (pathSubBuilder_ == null) { - ensurePathSubIsMutable(); - pathSub_.add(index, builderForValue.build()); - onChanged(); - } else { - pathSubBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder addAllPathSub( - java.lang.Iterable values) { - if (pathSubBuilder_ == null) { - ensurePathSubIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pathSub_); - onChanged(); - } else { - pathSubBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder clearPathSub() { - if (pathSubBuilder_ == null) { - pathSub_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - pathSubBuilder_.clear(); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public Builder removePathSub(int index) { - if (pathSubBuilder_ == null) { - ensurePathSubIsMutable(); - pathSub_.remove(index); - onChanged(); - } else { - pathSubBuilder_.remove(index); - } - return this; - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder getPathSubBuilder( - int index) { - return getPathSubFieldBuilder().getBuilder(index); - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder getPathSubOrBuilder( - int index) { - if (pathSubBuilder_ == null) { - return pathSub_.get(index); } else { - return pathSubBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public java.util.List - getPathSubOrBuilderList() { - if (pathSubBuilder_ != null) { - return pathSubBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(pathSub_); - } - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder addPathSubBuilder() { - return getPathSubFieldBuilder().addBuilder( - org.qmstr.grpc.service.Datamodel.PathSubstitution.getDefaultInstance()); - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder addPathSubBuilder( - int index) { - return getPathSubFieldBuilder().addBuilder( - index, org.qmstr.grpc.service.Datamodel.PathSubstitution.getDefaultInstance()); - } - /** - * repeated .service.PathSubstitution pathSub = 3; - */ - public java.util.List - getPathSubBuilderList() { - return getPathSubFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - org.qmstr.grpc.service.Datamodel.PathSubstitution, org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder, org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder> - getPathSubFieldBuilder() { - if (pathSubBuilder_ == null) { - pathSubBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - org.qmstr.grpc.service.Datamodel.PathSubstitution, org.qmstr.grpc.service.Datamodel.PathSubstitution.Builder, org.qmstr.grpc.service.Datamodel.PathSubstitutionOrBuilder>( - pathSub_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - pathSub_ = null; - } - return pathSubBuilder_; - } - - private long token_ ; - /** - * int64 token = 4; - */ - public long getToken() { - return token_; - } - /** - * int64 token = 4; - */ - public Builder setToken(long value) { - - token_ = value; - onChanged(); - return this; - } - /** - * int64 token = 4; - */ - public Builder clearToken() { - - token_ = 0L; - onChanged(); - return this; - } - private java.lang.Object name_ = ""; + private java.lang.Object analyzerConfig_ = ""; /** - * string name = 6; + * string analyzerConfig = 1; */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getAnalyzerConfig() { + java.lang.Object ref = analyzerConfig_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + analyzerConfig_ = s; return s; } else { return (java.lang.String) ref; } } /** - * string name = 6; + * string analyzerConfig = 1; */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getAnalyzerConfigBytes() { + java.lang.Object ref = analyzerConfig_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + analyzerConfig_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * string name = 6; + * string analyzerConfig = 1; */ - public Builder setName( + public Builder setAnalyzerConfig( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + analyzerConfig_ = value; onChanged(); return this; } /** - * string name = 6; + * string analyzerConfig = 1; */ - public Builder clearName() { + public Builder clearAnalyzerConfig() { - name_ = getDefaultInstance().getName(); + analyzerConfig_ = getDefaultInstance().getAnalyzerConfig(); onChanged(); return this; } /** - * string name = 6; + * string analyzerConfig = 1; */ - public Builder setNameBytes( + public Builder setAnalyzerConfigBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + analyzerConfig_ = value; + onChanged(); + return this; + } + + private long token_ ; + /** + * int64 token = 2; + */ + public long getToken() { + return token_; + } + /** + * int64 token = 2; + */ + public Builder setToken(long value) { + + token_ = value; + onChanged(); + return this; + } + /** + * int64 token = 2; + */ + public Builder clearToken() { + + token_ = 0L; onChanged(); return this; } @@ -4325,11 +3647,6 @@ public org.qmstr.grpc.service.Analyzerservice.DummyRequest getDefaultInstanceFor private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_service_AnalyzerConfigResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_service_InfoNodesMessage_descriptor; private static final @@ -4361,27 +3678,23 @@ public org.qmstr.grpc.service.Analyzerservice.DummyRequest getDefaultInstanceFor java.lang.String[] descriptorData = { "\n\025analyzerservice.proto\022\007service\032\017datamo" + "del.proto\"+\n\025AnalyzerConfigRequest\022\022\n\nan" + - "alyzerID\030\001 \001(\005\"\326\001\n\026AnalyzerConfigRespons" + - "e\022A\n\tconfigMap\030\002 \003(\0132..service.AnalyzerC" + - "onfigResponse.ConfigMapEntry\022*\n\007pathSub\030" + - "\003 \003(\0132\031.service.PathSubstitution\022\r\n\005toke" + - "n\030\004 \001(\003\022\014\n\004name\030\006 \001(\t\0320\n\016ConfigMapEntry\022" + - "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020InfoN" + - "odesMessage\022\r\n\005token\030\001 \001(\003\022\013\n\003uid\030\002 \001(\t\022" + - "$\n\tinfonodes\030\003 \003(\0132\021.service.InfoNode\"d\n" + - "\025DiagnosticNodeMessage\022\r\n\005token\030\001 \001(\003\022\013\n" + - "\003uid\030\002 \001(\t\022/\n\016diagnosticnode\030\003 \001(\0132\027.ser" + - "vice.DiagnosticNode\"\037\n\014SendResponse\022\017\n\007s" + - "uccess\030\001 \001(\010\"\016\n\014DummyRequest2\305\002\n\017Analysi" + - "sService\022V\n\021GetAnalyzerConfig\022\036.service." + - "AnalyzerConfigRequest\032\037.service.Analyzer" + - "ConfigResponse\"\000\022E\n\rSendInfoNodes\022\031.serv" + - "ice.InfoNodesMessage\032\025.service.SendRespo" + - "nse\"\000(\001\022O\n\022SendDiagnosticNode\022\036.service." + - "DiagnosticNodeMessage\032\025.service.SendResp" + - "onse\"\000(\001\022B\n\022GetSourceFileNodes\022\025.service" + - ".DummyRequest\032\021.service.FileNode\"\0000\001B\030\n\026" + - "org.qmstr.grpc.serviceX\000b\006proto3" + "alyzerID\030\001 \001(\005\"?\n\026AnalyzerConfigResponse" + + "\022\026\n\016analyzerConfig\030\001 \001(\t\022\r\n\005token\030\002 \001(\003\"" + + "T\n\020InfoNodesMessage\022\r\n\005token\030\001 \001(\003\022\013\n\003ui" + + "d\030\002 \001(\t\022$\n\tinfonodes\030\003 \003(\0132\021.service.Inf" + + "oNode\"d\n\025DiagnosticNodeMessage\022\r\n\005token\030" + + "\001 \001(\003\022\013\n\003uid\030\002 \001(\t\022/\n\016diagnosticnode\030\003 \001" + + "(\0132\027.service.DiagnosticNode\"\037\n\014SendRespo" + + "nse\022\017\n\007success\030\001 \001(\010\"\016\n\014DummyRequest2\305\002\n" + + "\017AnalysisService\022V\n\021GetAnalyzerConfig\022\036." + + "service.AnalyzerConfigRequest\032\037.service." + + "AnalyzerConfigResponse\"\000\022E\n\rSendInfoNode" + + "s\022\031.service.InfoNodesMessage\032\025.service.S" + + "endResponse\"\000(\001\022O\n\022SendDiagnosticNode\022\036." + + "service.DiagnosticNodeMessage\032\025.service." + + "SendResponse\"\000(\001\022B\n\022GetSourceFileNodes\022\025" + + ".service.DummyRequest\032\021.service.FileNode" + + "\"\0000\001B\030\n\026org.qmstr.grpc.serviceX\000b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -4407,13 +3720,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_service_AnalyzerConfigResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_service_AnalyzerConfigResponse_descriptor, - new java.lang.String[] { "ConfigMap", "PathSub", "Token", "Name", }); - internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_descriptor = - internal_static_service_AnalyzerConfigResponse_descriptor.getNestedTypes().get(0); - internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_service_AnalyzerConfigResponse_ConfigMapEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); + new java.lang.String[] { "AnalyzerConfig", "Token", }); internal_static_service_InfoNodesMessage_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_service_InfoNodesMessage_fieldAccessorTable = new diff --git a/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Controlservice.java b/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Controlservice.java index a375276..e902d98 100644 --- a/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Controlservice.java +++ b/lib/java-qmstr/src/main/java/org/qmstr/grpc/service/Controlservice.java @@ -6321,6 +6321,1958 @@ public org.qmstr.grpc.service.Controlservice.ExportResponse getDefaultInstanceFo } + public interface InitModuleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:service.InitModuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string moduleName = 1; + */ + java.lang.String getModuleName(); + /** + * string moduleName = 1; + */ + com.google.protobuf.ByteString + getModuleNameBytes(); + + /** + * int64 extraConfig = 2; + */ + long getExtraConfig(); + } + /** + * Protobuf type {@code service.InitModuleRequest} + */ + public static final class InitModuleRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:service.InitModuleRequest) + InitModuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use InitModuleRequest.newBuilder() to construct. + private InitModuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InitModuleRequest() { + moduleName_ = ""; + extraConfig_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InitModuleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + moduleName_ = s; + break; + } + case 16: { + + extraConfig_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_InitModuleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_InitModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.InitModuleRequest.class, org.qmstr.grpc.service.Controlservice.InitModuleRequest.Builder.class); + } + + public static final int MODULENAME_FIELD_NUMBER = 1; + private volatile java.lang.Object moduleName_; + /** + * string moduleName = 1; + */ + public java.lang.String getModuleName() { + java.lang.Object ref = moduleName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moduleName_ = s; + return s; + } + } + /** + * string moduleName = 1; + */ + public com.google.protobuf.ByteString + getModuleNameBytes() { + java.lang.Object ref = moduleName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moduleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRACONFIG_FIELD_NUMBER = 2; + private long extraConfig_; + /** + * int64 extraConfig = 2; + */ + public long getExtraConfig() { + return extraConfig_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getModuleNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, moduleName_); + } + if (extraConfig_ != 0L) { + output.writeInt64(2, extraConfig_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getModuleNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, moduleName_); + } + if (extraConfig_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, extraConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.qmstr.grpc.service.Controlservice.InitModuleRequest)) { + return super.equals(obj); + } + org.qmstr.grpc.service.Controlservice.InitModuleRequest other = (org.qmstr.grpc.service.Controlservice.InitModuleRequest) obj; + + boolean result = true; + result = result && getModuleName() + .equals(other.getModuleName()); + result = result && (getExtraConfig() + == other.getExtraConfig()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODULENAME_FIELD_NUMBER; + hash = (53 * hash) + getModuleName().hashCode(); + hash = (37 * hash) + EXTRACONFIG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExtraConfig()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.qmstr.grpc.service.Controlservice.InitModuleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code service.InitModuleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:service.InitModuleRequest) + org.qmstr.grpc.service.Controlservice.InitModuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_InitModuleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_InitModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.InitModuleRequest.class, org.qmstr.grpc.service.Controlservice.InitModuleRequest.Builder.class); + } + + // Construct using org.qmstr.grpc.service.Controlservice.InitModuleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + moduleName_ = ""; + + extraConfig_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_InitModuleRequest_descriptor; + } + + public org.qmstr.grpc.service.Controlservice.InitModuleRequest getDefaultInstanceForType() { + return org.qmstr.grpc.service.Controlservice.InitModuleRequest.getDefaultInstance(); + } + + public org.qmstr.grpc.service.Controlservice.InitModuleRequest build() { + org.qmstr.grpc.service.Controlservice.InitModuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.qmstr.grpc.service.Controlservice.InitModuleRequest buildPartial() { + org.qmstr.grpc.service.Controlservice.InitModuleRequest result = new org.qmstr.grpc.service.Controlservice.InitModuleRequest(this); + result.moduleName_ = moduleName_; + result.extraConfig_ = extraConfig_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.qmstr.grpc.service.Controlservice.InitModuleRequest) { + return mergeFrom((org.qmstr.grpc.service.Controlservice.InitModuleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.qmstr.grpc.service.Controlservice.InitModuleRequest other) { + if (other == org.qmstr.grpc.service.Controlservice.InitModuleRequest.getDefaultInstance()) return this; + if (!other.getModuleName().isEmpty()) { + moduleName_ = other.moduleName_; + onChanged(); + } + if (other.getExtraConfig() != 0L) { + setExtraConfig(other.getExtraConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.qmstr.grpc.service.Controlservice.InitModuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.qmstr.grpc.service.Controlservice.InitModuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object moduleName_ = ""; + /** + * string moduleName = 1; + */ + public java.lang.String getModuleName() { + java.lang.Object ref = moduleName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moduleName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string moduleName = 1; + */ + public com.google.protobuf.ByteString + getModuleNameBytes() { + java.lang.Object ref = moduleName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moduleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string moduleName = 1; + */ + public Builder setModuleName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + moduleName_ = value; + onChanged(); + return this; + } + /** + * string moduleName = 1; + */ + public Builder clearModuleName() { + + moduleName_ = getDefaultInstance().getModuleName(); + onChanged(); + return this; + } + /** + * string moduleName = 1; + */ + public Builder setModuleNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + moduleName_ = value; + onChanged(); + return this; + } + + private long extraConfig_ ; + /** + * int64 extraConfig = 2; + */ + public long getExtraConfig() { + return extraConfig_; + } + /** + * int64 extraConfig = 2; + */ + public Builder setExtraConfig(long value) { + + extraConfig_ = value; + onChanged(); + return this; + } + /** + * int64 extraConfig = 2; + */ + public Builder clearExtraConfig() { + + extraConfig_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:service.InitModuleRequest) + } + + // @@protoc_insertion_point(class_scope:service.InitModuleRequest) + private static final org.qmstr.grpc.service.Controlservice.InitModuleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.qmstr.grpc.service.Controlservice.InitModuleRequest(); + } + + public static org.qmstr.grpc.service.Controlservice.InitModuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public InitModuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InitModuleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.qmstr.grpc.service.Controlservice.InitModuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:service.Request) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code service.Request} + */ + public static final class Request extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:service.Request) + RequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use Request.newBuilder() to construct. + private Request(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Request() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Request( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Request_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.Request.class, org.qmstr.grpc.service.Controlservice.Request.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.qmstr.grpc.service.Controlservice.Request)) { + return super.equals(obj); + } + org.qmstr.grpc.service.Controlservice.Request other = (org.qmstr.grpc.service.Controlservice.Request) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Request parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Request parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Request parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.qmstr.grpc.service.Controlservice.Request prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code service.Request} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:service.Request) + org.qmstr.grpc.service.Controlservice.RequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Request_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Request_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.Request.class, org.qmstr.grpc.service.Controlservice.Request.Builder.class); + } + + // Construct using org.qmstr.grpc.service.Controlservice.Request.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Request_descriptor; + } + + public org.qmstr.grpc.service.Controlservice.Request getDefaultInstanceForType() { + return org.qmstr.grpc.service.Controlservice.Request.getDefaultInstance(); + } + + public org.qmstr.grpc.service.Controlservice.Request build() { + org.qmstr.grpc.service.Controlservice.Request result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.qmstr.grpc.service.Controlservice.Request buildPartial() { + org.qmstr.grpc.service.Controlservice.Request result = new org.qmstr.grpc.service.Controlservice.Request(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.qmstr.grpc.service.Controlservice.Request) { + return mergeFrom((org.qmstr.grpc.service.Controlservice.Request)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.qmstr.grpc.service.Controlservice.Request other) { + if (other == org.qmstr.grpc.service.Controlservice.Request.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.qmstr.grpc.service.Controlservice.Request parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.qmstr.grpc.service.Controlservice.Request) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:service.Request) + } + + // @@protoc_insertion_point(class_scope:service.Request) + private static final org.qmstr.grpc.service.Controlservice.Request DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.qmstr.grpc.service.Controlservice.Request(); + } + + public static org.qmstr.grpc.service.Controlservice.Request getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Request parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Request(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.qmstr.grpc.service.Controlservice.Request getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:service.Response) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code service.Response} + */ + public static final class Response extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:service.Response) + ResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Response.newBuilder() to construct. + private Response(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Response() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Response( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Response_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.Response.class, org.qmstr.grpc.service.Controlservice.Response.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.qmstr.grpc.service.Controlservice.Response)) { + return super.equals(obj); + } + org.qmstr.grpc.service.Controlservice.Response other = (org.qmstr.grpc.service.Controlservice.Response) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Response parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Response parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.Response parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.qmstr.grpc.service.Controlservice.Response prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code service.Response} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:service.Response) + org.qmstr.grpc.service.Controlservice.ResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Response_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Response_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.Response.class, org.qmstr.grpc.service.Controlservice.Response.Builder.class); + } + + // Construct using org.qmstr.grpc.service.Controlservice.Response.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_Response_descriptor; + } + + public org.qmstr.grpc.service.Controlservice.Response getDefaultInstanceForType() { + return org.qmstr.grpc.service.Controlservice.Response.getDefaultInstance(); + } + + public org.qmstr.grpc.service.Controlservice.Response build() { + org.qmstr.grpc.service.Controlservice.Response result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.qmstr.grpc.service.Controlservice.Response buildPartial() { + org.qmstr.grpc.service.Controlservice.Response result = new org.qmstr.grpc.service.Controlservice.Response(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.qmstr.grpc.service.Controlservice.Response) { + return mergeFrom((org.qmstr.grpc.service.Controlservice.Response)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.qmstr.grpc.service.Controlservice.Response other) { + if (other == org.qmstr.grpc.service.Controlservice.Response.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.qmstr.grpc.service.Controlservice.Response parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.qmstr.grpc.service.Controlservice.Response) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:service.Response) + } + + // @@protoc_insertion_point(class_scope:service.Response) + private static final org.qmstr.grpc.service.Controlservice.Response DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.qmstr.grpc.service.Controlservice.Response(); + } + + public static org.qmstr.grpc.service.Controlservice.Response getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Response parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Response(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.qmstr.grpc.service.Controlservice.Response getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ShutdownModuleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:service.ShutdownModuleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string message = 1; + */ + java.lang.String getMessage(); + /** + * string message = 1; + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + * bool dB = 2; + */ + boolean getDB(); + } + /** + * Protobuf type {@code service.ShutdownModuleRequest} + */ + public static final class ShutdownModuleRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:service.ShutdownModuleRequest) + ShutdownModuleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ShutdownModuleRequest.newBuilder() to construct. + private ShutdownModuleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ShutdownModuleRequest() { + message_ = ""; + dB_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ShutdownModuleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + case 16: { + + dB_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_ShutdownModuleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_ShutdownModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.class, org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object message_; + /** + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DB_FIELD_NUMBER = 2; + private boolean dB_; + /** + * bool dB = 2; + */ + public boolean getDB() { + return dB_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (dB_ != false) { + output.writeBool(2, dB_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (dB_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, dB_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest)) { + return super.equals(obj); + } + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest other = (org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest) obj; + + boolean result = true; + result = result && getMessage() + .equals(other.getMessage()); + result = result && (getDB() + == other.getDB()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + DB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDB()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code service.ShutdownModuleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:service.ShutdownModuleRequest) + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_ShutdownModuleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_ShutdownModuleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.class, org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.Builder.class); + } + + // Construct using org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + message_ = ""; + + dB_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.qmstr.grpc.service.Controlservice.internal_static_service_ShutdownModuleRequest_descriptor; + } + + public org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest getDefaultInstanceForType() { + return org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.getDefaultInstance(); + } + + public org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest build() { + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest buildPartial() { + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest result = new org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest(this); + result.message_ = message_; + result.dB_ = dB_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest) { + return mergeFrom((org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest other) { + if (other == org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (other.getDB() != false) { + setDB(other.getDB()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object message_ = ""; + /** + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string message = 1; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * string message = 1; + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * string message = 1; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private boolean dB_ ; + /** + * bool dB = 2; + */ + public boolean getDB() { + return dB_; + } + /** + * bool dB = 2; + */ + public Builder setDB(boolean value) { + + dB_ = value; + onChanged(); + return this; + } + /** + * bool dB = 2; + */ + public Builder clearDB() { + + dB_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:service.ShutdownModuleRequest) + } + + // @@protoc_insertion_point(class_scope:service.ShutdownModuleRequest) + private static final org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest(); + } + + public static org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ShutdownModuleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ShutdownModuleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public org.qmstr.grpc.service.Controlservice.ShutdownModuleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_service_LogMessage_descriptor; private static final @@ -6381,6 +8333,26 @@ public org.qmstr.grpc.service.Controlservice.ExportResponse getDefaultInstanceFo private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_service_ExportResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_service_InitModuleRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_service_InitModuleRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_service_Request_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_service_Request_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_service_Response_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_service_Response_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_service_ShutdownModuleRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_service_ShutdownModuleRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -6406,24 +8378,32 @@ public org.qmstr.grpc.service.Controlservice.ExportResponse getDefaultInstanceFo "ts\030\005 \001(\004\"2\n\014EventMessage\022\"\n\005class\030\001 \001(\0162" + "\023.service.EventClass\"\035\n\rExportRequest\022\014\n" + "\004wait\030\001 \001(\010\"!\n\016ExportResponse\022\017\n\007success" + - "\030\001 \001(\0102\231\005\n\016ControlService\0222\n\003Log\022\023.servi" + - "ce.LogMessage\032\024.service.LogResponse\"\000\0225\n" + - "\004Quit\022\024.service.QuitMessage\032\025.service.Qu" + - "itResponse\"\000\022J\n\013SwitchPhase\022\033.service.Sw" + - "itchPhaseMessage\032\034.service.SwitchPhaseRe" + - "sponse\"\000\022@\n\016GetPackageNode\022\024.service.Pac" + - "kageNode\032\024.service.PackageNode\"\0000\001\022@\n\021Ge" + - "tPackageTargets\022\024.service.PackageNode\032\021." + - "service.FileNode\"\0000\001\022A\n\013GetFileNode\022\033.se" + - "rvice.GetFileNodeMessage\032\021.service.FileN" + - "ode\"\0000\001\022I\n\021GetDiagnosticNode\022\027.service.D" + - "iagnosticNode\032\027.service.DiagnosticNode\"\000" + - "0\001\022;\n\006Status\022\026.service.StatusMessage\032\027.s" + - "ervice.StatusResponse\"\000\022<\n\017SubscribeEven" + - "ts\022\025.service.EventMessage\032\016.service.Even" + - "t\"\0000\001\022C\n\016ExportSnapshot\022\026.service.Export" + - "Request\032\027.service.ExportResponse\"\000B\030\n\026or" + - "g.qmstr.grpc.serviceX\000b\006proto3" + "\030\001 \001(\010\"<\n\021InitModuleRequest\022\022\n\nmoduleNam" + + "e\030\001 \001(\t\022\023\n\013extraConfig\030\002 \001(\003\"\t\n\007Request\"" + + "\n\n\010Response\"4\n\025ShutdownModuleRequest\022\017\n\007" + + "message\030\001 \001(\t\022\n\n\002dB\030\002 \001(\0102\324\006\n\016ControlSer" + + "vice\0222\n\003Log\022\023.service.LogMessage\032\024.servi" + + "ce.LogResponse\"\000\0225\n\004Quit\022\024.service.QuitM" + + "essage\032\025.service.QuitResponse\"\000\022J\n\013Switc" + + "hPhase\022\033.service.SwitchPhaseMessage\032\034.se" + + "rvice.SwitchPhaseResponse\"\000\022=\n\nInitModul" + + "e\022\032.service.InitModuleRequest\032\021.service." + + "Response\"\000\022E\n\016ShutdownModule\022\036.service.S" + + "hutdownModuleRequest\032\021.service.Response\"" + + "\000\0223\n\nClosePhase\022\020.service.Request\032\021.serv" + + "ice.Response\"\000\022@\n\016GetPackageNode\022\024.servi" + + "ce.PackageNode\032\024.service.PackageNode\"\0000\001" + + "\022@\n\021GetPackageTargets\022\024.service.PackageN" + + "ode\032\021.service.FileNode\"\0000\001\022A\n\013GetFileNod" + + "e\022\033.service.GetFileNodeMessage\032\021.service" + + ".FileNode\"\0000\001\022I\n\021GetDiagnosticNode\022\027.ser" + + "vice.DiagnosticNode\032\027.service.Diagnostic" + + "Node\"\0000\001\022;\n\006Status\022\026.service.StatusMessa" + + "ge\032\027.service.StatusResponse\"\000\022<\n\017Subscri" + + "beEvents\022\025.service.EventMessage\032\016.servic" + + "e.Event\"\0000\001\022C\n\016ExportSnapshot\022\026.service." + + "ExportRequest\032\027.service.ExportResponse\"\000" + + "B\030\n\026org.qmstr.grpc.serviceX\000b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -6510,6 +8490,30 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_service_ExportResponse_descriptor, new java.lang.String[] { "Success", }); + internal_static_service_InitModuleRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_service_InitModuleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_service_InitModuleRequest_descriptor, + new java.lang.String[] { "ModuleName", "ExtraConfig", }); + internal_static_service_Request_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_service_Request_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_service_Request_descriptor, + new java.lang.String[] { }); + internal_static_service_Response_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_service_Response_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_service_Response_descriptor, + new java.lang.String[] { }); + internal_static_service_ShutdownModuleRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_service_ShutdownModuleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_service_ShutdownModuleRequest_descriptor, + new java.lang.String[] { "Message", "DB", }); org.qmstr.grpc.service.Datamodel.getDescriptor(); } diff --git a/lib/pyqmstr/qmstr/service/analyzerservice_pb2.py b/lib/pyqmstr/qmstr/service/analyzerservice_pb2.py index 9048ced..b664b2f 100644 --- a/lib/pyqmstr/qmstr/service/analyzerservice_pb2.py +++ b/lib/pyqmstr/qmstr/service/analyzerservice_pb2.py @@ -21,7 +21,7 @@ package='service', syntax='proto3', serialized_options=_b('\n\026org.qmstr.grpc.service'), - serialized_pb=_b('\n\x15\x61nalyzerservice.proto\x12\x07service\x1a\x0f\x64\x61tamodel.proto\"+\n\x15\x41nalyzerConfigRequest\x12\x12\n\nanalyzerID\x18\x01 \x01(\x05\"\xd6\x01\n\x16\x41nalyzerConfigResponse\x12\x41\n\tconfigMap\x18\x02 \x03(\x0b\x32..service.AnalyzerConfigResponse.ConfigMapEntry\x12*\n\x07pathSub\x18\x03 \x03(\x0b\x32\x19.service.PathSubstitution\x12\r\n\x05token\x18\x04 \x01(\x03\x12\x0c\n\x04name\x18\x06 \x01(\t\x1a\x30\n\x0e\x43onfigMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"T\n\x10InfoNodesMessage\x12\r\n\x05token\x18\x01 \x01(\x03\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12$\n\tinfonodes\x18\x03 \x03(\x0b\x32\x11.service.InfoNode\"d\n\x15\x44iagnosticNodeMessage\x12\r\n\x05token\x18\x01 \x01(\x03\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12/\n\x0e\x64iagnosticnode\x18\x03 \x01(\x0b\x32\x17.service.DiagnosticNode\"\x1f\n\x0cSendResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x0e\n\x0c\x44ummyRequest2\xc5\x02\n\x0f\x41nalysisService\x12V\n\x11GetAnalyzerConfig\x12\x1e.service.AnalyzerConfigRequest\x1a\x1f.service.AnalyzerConfigResponse\"\x00\x12\x45\n\rSendInfoNodes\x12\x19.service.InfoNodesMessage\x1a\x15.service.SendResponse\"\x00(\x01\x12O\n\x12SendDiagnosticNode\x12\x1e.service.DiagnosticNodeMessage\x1a\x15.service.SendResponse\"\x00(\x01\x12\x42\n\x12GetSourceFileNodes\x12\x15.service.DummyRequest\x1a\x11.service.FileNode\"\x00\x30\x01\x42\x18\n\x16org.qmstr.grpc.serviceX\x00\x62\x06proto3') + serialized_pb=_b('\n\x15\x61nalyzerservice.proto\x12\x07service\x1a\x0f\x64\x61tamodel.proto\"+\n\x15\x41nalyzerConfigRequest\x12\x12\n\nanalyzerID\x18\x01 \x01(\x05\"?\n\x16\x41nalyzerConfigResponse\x12\x16\n\x0e\x61nalyzerConfig\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\x03\"T\n\x10InfoNodesMessage\x12\r\n\x05token\x18\x01 \x01(\x03\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12$\n\tinfonodes\x18\x03 \x03(\x0b\x32\x11.service.InfoNode\"d\n\x15\x44iagnosticNodeMessage\x12\r\n\x05token\x18\x01 \x01(\x03\x12\x0b\n\x03uid\x18\x02 \x01(\t\x12/\n\x0e\x64iagnosticnode\x18\x03 \x01(\x0b\x32\x17.service.DiagnosticNode\"\x1f\n\x0cSendResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x0e\n\x0c\x44ummyRequest2\xc5\x02\n\x0f\x41nalysisService\x12V\n\x11GetAnalyzerConfig\x12\x1e.service.AnalyzerConfigRequest\x1a\x1f.service.AnalyzerConfigResponse\"\x00\x12\x45\n\rSendInfoNodes\x12\x19.service.InfoNodesMessage\x1a\x15.service.SendResponse\"\x00(\x01\x12O\n\x12SendDiagnosticNode\x12\x1e.service.DiagnosticNodeMessage\x1a\x15.service.SendResponse\"\x00(\x01\x12\x42\n\x12GetSourceFileNodes\x12\x15.service.DummyRequest\x1a\x11.service.FileNode\"\x00\x30\x01\x42\x18\n\x16org.qmstr.grpc.serviceX\x00\x62\x06proto3') , dependencies=[datamodel__pb2.DESCRIPTOR,]) @@ -59,43 +59,6 @@ ) -_ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY = _descriptor.Descriptor( - name='ConfigMapEntry', - full_name='service.AnalyzerConfigResponse.ConfigMapEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='service.AnalyzerConfigResponse.ConfigMapEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='service.AnalyzerConfigResponse.ConfigMapEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=263, - serialized_end=311, -) - _ANALYZERCONFIGRESPONSE = _descriptor.Descriptor( name='AnalyzerConfigResponse', full_name='service.AnalyzerConfigResponse', @@ -104,37 +67,23 @@ containing_type=None, fields=[ _descriptor.FieldDescriptor( - name='configMap', full_name='service.AnalyzerConfigResponse.configMap', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='pathSub', full_name='service.AnalyzerConfigResponse.pathSub', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], + name='analyzerConfig', full_name='service.AnalyzerConfigResponse.analyzerConfig', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='token', full_name='service.AnalyzerConfigResponse.token', index=2, - number=4, type=3, cpp_type=2, label=1, + name='token', full_name='service.AnalyzerConfigResponse.token', index=1, + number=2, type=3, cpp_type=2, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='name', full_name='service.AnalyzerConfigResponse.name', index=3, - number=6, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], - nested_types=[_ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY, ], + nested_types=[], enum_types=[ ], serialized_options=None, @@ -143,8 +92,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=97, - serialized_end=311, + serialized_start=96, + serialized_end=159, ) @@ -188,8 +137,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=313, - serialized_end=397, + serialized_start=161, + serialized_end=245, ) @@ -233,8 +182,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=399, - serialized_end=499, + serialized_start=247, + serialized_end=347, ) @@ -264,8 +213,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=501, - serialized_end=532, + serialized_start=349, + serialized_end=380, ) @@ -288,13 +237,10 @@ extension_ranges=[], oneofs=[ ], - serialized_start=534, - serialized_end=548, + serialized_start=382, + serialized_end=396, ) -_ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY.containing_type = _ANALYZERCONFIGRESPONSE -_ANALYZERCONFIGRESPONSE.fields_by_name['configMap'].message_type = _ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY -_ANALYZERCONFIGRESPONSE.fields_by_name['pathSub'].message_type = datamodel__pb2._PATHSUBSTITUTION _INFONODESMESSAGE.fields_by_name['infonodes'].message_type = datamodel__pb2._INFONODE _DIAGNOSTICNODEMESSAGE.fields_by_name['diagnosticnode'].message_type = datamodel__pb2._DIAGNOSTICNODE DESCRIPTOR.message_types_by_name['AnalyzerConfigRequest'] = _ANALYZERCONFIGREQUEST @@ -313,19 +259,11 @@ _sym_db.RegisterMessage(AnalyzerConfigRequest) AnalyzerConfigResponse = _reflection.GeneratedProtocolMessageType('AnalyzerConfigResponse', (_message.Message,), dict( - - ConfigMapEntry = _reflection.GeneratedProtocolMessageType('ConfigMapEntry', (_message.Message,), dict( - DESCRIPTOR = _ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY, - __module__ = 'analyzerservice_pb2' - # @@protoc_insertion_point(class_scope:service.AnalyzerConfigResponse.ConfigMapEntry) - )) - , DESCRIPTOR = _ANALYZERCONFIGRESPONSE, __module__ = 'analyzerservice_pb2' # @@protoc_insertion_point(class_scope:service.AnalyzerConfigResponse) )) _sym_db.RegisterMessage(AnalyzerConfigResponse) -_sym_db.RegisterMessage(AnalyzerConfigResponse.ConfigMapEntry) InfoNodesMessage = _reflection.GeneratedProtocolMessageType('InfoNodesMessage', (_message.Message,), dict( DESCRIPTOR = _INFONODESMESSAGE, @@ -357,7 +295,6 @@ DESCRIPTOR._options = None -_ANALYZERCONFIGRESPONSE_CONFIGMAPENTRY._options = None _ANALYSISSERVICE = _descriptor.ServiceDescriptor( name='AnalysisService', @@ -365,8 +302,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=551, - serialized_end=876, + serialized_start=399, + serialized_end=724, methods=[ _descriptor.MethodDescriptor( name='GetAnalyzerConfig', diff --git a/lib/pyqmstr/qmstr/service/controlservice_pb2.py b/lib/pyqmstr/qmstr/service/controlservice_pb2.py index b37e325..773b776 100644 --- a/lib/pyqmstr/qmstr/service/controlservice_pb2.py +++ b/lib/pyqmstr/qmstr/service/controlservice_pb2.py @@ -21,7 +21,7 @@ package='service', syntax='proto3', serialized_options=_b('\n\026org.qmstr.grpc.service'), - serialized_pb=_b('\n\x14\x63ontrolservice.proto\x12\x07service\x1a\x0f\x64\x61tamodel.proto\"\x19\n\nLogMessage\x12\x0b\n\x03msg\x18\x01 \x01(\x0c\"\x1e\n\x0bLogResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x1b\n\x0bQuitMessage\x12\x0c\n\x04kill\x18\x01 \x01(\x08\"\x1f\n\x0cQuitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"3\n\x12SwitchPhaseMessage\x12\x1d\n\x05phase\x18\x01 \x01(\x0e\x32\x0e.service.Phase\"5\n\x13SwitchPhaseResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"M\n\x12GetFileNodeMessage\x12#\n\x08\x66ileNode\x18\x01 \x01(\x0b\x32\x11.service.FileNode\x12\x12\n\nuniqueNode\x18\x02 \x01(\x08\".\n\rStatusMessage\x12\r\n\x05phase\x18\x01 \x01(\x08\x12\x0e\n\x06switch\x18\x02 \x01(\x08\"z\n\x0eStatusResponse\x12\r\n\x05phase\x18\x01 \x01(\t\x12\x1f\n\x07phaseID\x18\x02 \x01(\x0e\x32\x0e.service.Phase\x12\x11\n\tswitching\x18\x03 \x01(\x08\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x16\n\x0ependingInserts\x18\x05 \x01(\x04\"2\n\x0c\x45ventMessage\x12\"\n\x05\x63lass\x18\x01 \x01(\x0e\x32\x13.service.EventClass\"\x1d\n\rExportRequest\x12\x0c\n\x04wait\x18\x01 \x01(\x08\"!\n\x0e\x45xportResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x32\x99\x05\n\x0e\x43ontrolService\x12\x32\n\x03Log\x12\x13.service.LogMessage\x1a\x14.service.LogResponse\"\x00\x12\x35\n\x04Quit\x12\x14.service.QuitMessage\x1a\x15.service.QuitResponse\"\x00\x12J\n\x0bSwitchPhase\x12\x1b.service.SwitchPhaseMessage\x1a\x1c.service.SwitchPhaseResponse\"\x00\x12@\n\x0eGetPackageNode\x12\x14.service.PackageNode\x1a\x14.service.PackageNode\"\x00\x30\x01\x12@\n\x11GetPackageTargets\x12\x14.service.PackageNode\x1a\x11.service.FileNode\"\x00\x30\x01\x12\x41\n\x0bGetFileNode\x12\x1b.service.GetFileNodeMessage\x1a\x11.service.FileNode\"\x00\x30\x01\x12I\n\x11GetDiagnosticNode\x12\x17.service.DiagnosticNode\x1a\x17.service.DiagnosticNode\"\x00\x30\x01\x12;\n\x06Status\x12\x16.service.StatusMessage\x1a\x17.service.StatusResponse\"\x00\x12<\n\x0fSubscribeEvents\x12\x15.service.EventMessage\x1a\x0e.service.Event\"\x00\x30\x01\x12\x43\n\x0e\x45xportSnapshot\x12\x16.service.ExportRequest\x1a\x17.service.ExportResponse\"\x00\x42\x18\n\x16org.qmstr.grpc.serviceX\x00\x62\x06proto3') + serialized_pb=_b('\n\x14\x63ontrolservice.proto\x12\x07service\x1a\x0f\x64\x61tamodel.proto\"\x19\n\nLogMessage\x12\x0b\n\x03msg\x18\x01 \x01(\x0c\"\x1e\n\x0bLogResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x1b\n\x0bQuitMessage\x12\x0c\n\x04kill\x18\x01 \x01(\x08\"\x1f\n\x0cQuitResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"3\n\x12SwitchPhaseMessage\x12\x1d\n\x05phase\x18\x01 \x01(\x0e\x32\x0e.service.Phase\"5\n\x13SwitchPhaseResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"M\n\x12GetFileNodeMessage\x12#\n\x08\x66ileNode\x18\x01 \x01(\x0b\x32\x11.service.FileNode\x12\x12\n\nuniqueNode\x18\x02 \x01(\x08\".\n\rStatusMessage\x12\r\n\x05phase\x18\x01 \x01(\x08\x12\x0e\n\x06switch\x18\x02 \x01(\x08\"z\n\x0eStatusResponse\x12\r\n\x05phase\x18\x01 \x01(\t\x12\x1f\n\x07phaseID\x18\x02 \x01(\x0e\x32\x0e.service.Phase\x12\x11\n\tswitching\x18\x03 \x01(\x08\x12\r\n\x05\x65rror\x18\x04 \x01(\t\x12\x16\n\x0ependingInserts\x18\x05 \x01(\x04\"2\n\x0c\x45ventMessage\x12\"\n\x05\x63lass\x18\x01 \x01(\x0e\x32\x13.service.EventClass\"\x1d\n\rExportRequest\x12\x0c\n\x04wait\x18\x01 \x01(\x08\"!\n\x0e\x45xportResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"<\n\x11InitModuleRequest\x12\x12\n\nmoduleName\x18\x01 \x01(\t\x12\x13\n\x0b\x65xtraConfig\x18\x02 \x01(\x03\"\t\n\x07Request\"\n\n\x08Response\"4\n\x15ShutdownModuleRequest\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\n\n\x02\x64\x42\x18\x02 \x01(\x08\x32\xd4\x06\n\x0e\x43ontrolService\x12\x32\n\x03Log\x12\x13.service.LogMessage\x1a\x14.service.LogResponse\"\x00\x12\x35\n\x04Quit\x12\x14.service.QuitMessage\x1a\x15.service.QuitResponse\"\x00\x12J\n\x0bSwitchPhase\x12\x1b.service.SwitchPhaseMessage\x1a\x1c.service.SwitchPhaseResponse\"\x00\x12=\n\nInitModule\x12\x1a.service.InitModuleRequest\x1a\x11.service.Response\"\x00\x12\x45\n\x0eShutdownModule\x12\x1e.service.ShutdownModuleRequest\x1a\x11.service.Response\"\x00\x12\x33\n\nClosePhase\x12\x10.service.Request\x1a\x11.service.Response\"\x00\x12@\n\x0eGetPackageNode\x12\x14.service.PackageNode\x1a\x14.service.PackageNode\"\x00\x30\x01\x12@\n\x11GetPackageTargets\x12\x14.service.PackageNode\x1a\x11.service.FileNode\"\x00\x30\x01\x12\x41\n\x0bGetFileNode\x12\x1b.service.GetFileNodeMessage\x1a\x11.service.FileNode\"\x00\x30\x01\x12I\n\x11GetDiagnosticNode\x12\x17.service.DiagnosticNode\x1a\x17.service.DiagnosticNode\"\x00\x30\x01\x12;\n\x06Status\x12\x16.service.StatusMessage\x1a\x17.service.StatusResponse\"\x00\x12<\n\x0fSubscribeEvents\x12\x15.service.EventMessage\x1a\x0e.service.Event\"\x00\x30\x01\x12\x43\n\x0e\x45xportSnapshot\x12\x16.service.ExportRequest\x1a\x17.service.ExportResponse\"\x00\x42\x18\n\x16org.qmstr.grpc.serviceX\x00\x62\x06proto3') , dependencies=[datamodel__pb2.DESCRIPTOR,]) @@ -448,6 +448,130 @@ serialized_end=646, ) + +_INITMODULEREQUEST = _descriptor.Descriptor( + name='InitModuleRequest', + full_name='service.InitModuleRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='moduleName', full_name='service.InitModuleRequest.moduleName', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='extraConfig', full_name='service.InitModuleRequest.extraConfig', index=1, + number=2, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=648, + serialized_end=708, +) + + +_REQUEST = _descriptor.Descriptor( + name='Request', + full_name='service.Request', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=710, + serialized_end=719, +) + + +_RESPONSE = _descriptor.Descriptor( + name='Response', + full_name='service.Response', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=721, + serialized_end=731, +) + + +_SHUTDOWNMODULEREQUEST = _descriptor.Descriptor( + name='ShutdownModuleRequest', + full_name='service.ShutdownModuleRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='message', full_name='service.ShutdownModuleRequest.message', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='dB', full_name='service.ShutdownModuleRequest.dB', index=1, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=733, + serialized_end=785, +) + _SWITCHPHASEMESSAGE.fields_by_name['phase'].enum_type = datamodel__pb2._PHASE _GETFILENODEMESSAGE.fields_by_name['fileNode'].message_type = datamodel__pb2._FILENODE _STATUSRESPONSE.fields_by_name['phaseID'].enum_type = datamodel__pb2._PHASE @@ -464,6 +588,10 @@ DESCRIPTOR.message_types_by_name['EventMessage'] = _EVENTMESSAGE DESCRIPTOR.message_types_by_name['ExportRequest'] = _EXPORTREQUEST DESCRIPTOR.message_types_by_name['ExportResponse'] = _EXPORTRESPONSE +DESCRIPTOR.message_types_by_name['InitModuleRequest'] = _INITMODULEREQUEST +DESCRIPTOR.message_types_by_name['Request'] = _REQUEST +DESCRIPTOR.message_types_by_name['Response'] = _RESPONSE +DESCRIPTOR.message_types_by_name['ShutdownModuleRequest'] = _SHUTDOWNMODULEREQUEST _sym_db.RegisterFileDescriptor(DESCRIPTOR) LogMessage = _reflection.GeneratedProtocolMessageType('LogMessage', (_message.Message,), dict( @@ -550,6 +678,34 @@ )) _sym_db.RegisterMessage(ExportResponse) +InitModuleRequest = _reflection.GeneratedProtocolMessageType('InitModuleRequest', (_message.Message,), dict( + DESCRIPTOR = _INITMODULEREQUEST, + __module__ = 'controlservice_pb2' + # @@protoc_insertion_point(class_scope:service.InitModuleRequest) + )) +_sym_db.RegisterMessage(InitModuleRequest) + +Request = _reflection.GeneratedProtocolMessageType('Request', (_message.Message,), dict( + DESCRIPTOR = _REQUEST, + __module__ = 'controlservice_pb2' + # @@protoc_insertion_point(class_scope:service.Request) + )) +_sym_db.RegisterMessage(Request) + +Response = _reflection.GeneratedProtocolMessageType('Response', (_message.Message,), dict( + DESCRIPTOR = _RESPONSE, + __module__ = 'controlservice_pb2' + # @@protoc_insertion_point(class_scope:service.Response) + )) +_sym_db.RegisterMessage(Response) + +ShutdownModuleRequest = _reflection.GeneratedProtocolMessageType('ShutdownModuleRequest', (_message.Message,), dict( + DESCRIPTOR = _SHUTDOWNMODULEREQUEST, + __module__ = 'controlservice_pb2' + # @@protoc_insertion_point(class_scope:service.ShutdownModuleRequest) + )) +_sym_db.RegisterMessage(ShutdownModuleRequest) + DESCRIPTOR._options = None @@ -559,8 +715,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=649, - serialized_end=1314, + serialized_start=788, + serialized_end=1640, methods=[ _descriptor.MethodDescriptor( name='Log', @@ -589,10 +745,37 @@ output_type=_SWITCHPHASERESPONSE, serialized_options=None, ), + _descriptor.MethodDescriptor( + name='InitModule', + full_name='service.ControlService.InitModule', + index=3, + containing_service=None, + input_type=_INITMODULEREQUEST, + output_type=_RESPONSE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name='ShutdownModule', + full_name='service.ControlService.ShutdownModule', + index=4, + containing_service=None, + input_type=_SHUTDOWNMODULEREQUEST, + output_type=_RESPONSE, + serialized_options=None, + ), + _descriptor.MethodDescriptor( + name='ClosePhase', + full_name='service.ControlService.ClosePhase', + index=5, + containing_service=None, + input_type=_REQUEST, + output_type=_RESPONSE, + serialized_options=None, + ), _descriptor.MethodDescriptor( name='GetPackageNode', full_name='service.ControlService.GetPackageNode', - index=3, + index=6, containing_service=None, input_type=datamodel__pb2._PACKAGENODE, output_type=datamodel__pb2._PACKAGENODE, @@ -601,7 +784,7 @@ _descriptor.MethodDescriptor( name='GetPackageTargets', full_name='service.ControlService.GetPackageTargets', - index=4, + index=7, containing_service=None, input_type=datamodel__pb2._PACKAGENODE, output_type=datamodel__pb2._FILENODE, @@ -610,7 +793,7 @@ _descriptor.MethodDescriptor( name='GetFileNode', full_name='service.ControlService.GetFileNode', - index=5, + index=8, containing_service=None, input_type=_GETFILENODEMESSAGE, output_type=datamodel__pb2._FILENODE, @@ -619,7 +802,7 @@ _descriptor.MethodDescriptor( name='GetDiagnosticNode', full_name='service.ControlService.GetDiagnosticNode', - index=6, + index=9, containing_service=None, input_type=datamodel__pb2._DIAGNOSTICNODE, output_type=datamodel__pb2._DIAGNOSTICNODE, @@ -628,7 +811,7 @@ _descriptor.MethodDescriptor( name='Status', full_name='service.ControlService.Status', - index=7, + index=10, containing_service=None, input_type=_STATUSMESSAGE, output_type=_STATUSRESPONSE, @@ -637,7 +820,7 @@ _descriptor.MethodDescriptor( name='SubscribeEvents', full_name='service.ControlService.SubscribeEvents', - index=8, + index=11, containing_service=None, input_type=_EVENTMESSAGE, output_type=datamodel__pb2._EVENT, @@ -646,7 +829,7 @@ _descriptor.MethodDescriptor( name='ExportSnapshot', full_name='service.ControlService.ExportSnapshot', - index=9, + index=12, containing_service=None, input_type=_EXPORTREQUEST, output_type=_EXPORTRESPONSE, diff --git a/lib/pyqmstr/qmstr/service/controlservice_pb2_grpc.py b/lib/pyqmstr/qmstr/service/controlservice_pb2_grpc.py index 469cac5..325e280 100644 --- a/lib/pyqmstr/qmstr/service/controlservice_pb2_grpc.py +++ b/lib/pyqmstr/qmstr/service/controlservice_pb2_grpc.py @@ -30,6 +30,21 @@ def __init__(self, channel): request_serializer=controlservice__pb2.SwitchPhaseMessage.SerializeToString, response_deserializer=controlservice__pb2.SwitchPhaseResponse.FromString, ) + self.InitModule = channel.unary_unary( + '/service.ControlService/InitModule', + request_serializer=controlservice__pb2.InitModuleRequest.SerializeToString, + response_deserializer=controlservice__pb2.Response.FromString, + ) + self.ShutdownModule = channel.unary_unary( + '/service.ControlService/ShutdownModule', + request_serializer=controlservice__pb2.ShutdownModuleRequest.SerializeToString, + response_deserializer=controlservice__pb2.Response.FromString, + ) + self.ClosePhase = channel.unary_unary( + '/service.ControlService/ClosePhase', + request_serializer=controlservice__pb2.Request.SerializeToString, + response_deserializer=controlservice__pb2.Response.FromString, + ) self.GetPackageNode = channel.unary_stream( '/service.ControlService/GetPackageNode', request_serializer=datamodel__pb2.PackageNode.SerializeToString, @@ -92,6 +107,27 @@ def SwitchPhase(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def InitModule(self, request, context): + # missing associated documentation comment in .proto file + pass + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ShutdownModule(self, request, context): + # missing associated documentation comment in .proto file + pass + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ClosePhase(self, request, context): + # missing associated documentation comment in .proto file + pass + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def GetPackageNode(self, request, context): # missing associated documentation comment in .proto file pass @@ -159,6 +195,21 @@ def add_ControlServiceServicer_to_server(servicer, server): request_deserializer=controlservice__pb2.SwitchPhaseMessage.FromString, response_serializer=controlservice__pb2.SwitchPhaseResponse.SerializeToString, ), + 'InitModule': grpc.unary_unary_rpc_method_handler( + servicer.InitModule, + request_deserializer=controlservice__pb2.InitModuleRequest.FromString, + response_serializer=controlservice__pb2.Response.SerializeToString, + ), + 'ShutdownModule': grpc.unary_unary_rpc_method_handler( + servicer.ShutdownModule, + request_deserializer=controlservice__pb2.ShutdownModuleRequest.FromString, + response_serializer=controlservice__pb2.Response.SerializeToString, + ), + 'ClosePhase': grpc.unary_unary_rpc_method_handler( + servicer.ClosePhase, + request_deserializer=controlservice__pb2.Request.FromString, + response_serializer=controlservice__pb2.Response.SerializeToString, + ), 'GetPackageNode': grpc.unary_stream_rpc_method_handler( servicer.GetPackageNode, request_deserializer=datamodel__pb2.PackageNode.FromString, diff --git a/modules/analyzers/scancode-analyzer/main.go b/modules/analyzers/scancode-analyzer/main.go index 14d415b..29f92d1 100644 --- a/modules/analyzers/scancode-analyzer/main.go +++ b/modules/analyzers/scancode-analyzer/main.go @@ -11,11 +11,13 @@ import ( "regexp" "runtime" "strconv" + "sync" "syscall" "golang.org/x/net/context" "github.com/QMSTR/qmstr/lib/go-qmstr/analysis" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/module" "github.com/QMSTR/qmstr/lib/go-qmstr/service" @@ -29,12 +31,27 @@ type ScancodeAnalyzer struct { scanData interface{} } +var wg sync.WaitGroup + func main() { analyzer := analysis.NewAnalyzer(&ScancodeAnalyzer{}) - if err := analyzer.RunAnalyzerModule(); err != nil { - log.Printf("%v failed: %v\n", analyzer.GetModuleName(), err) - os.Exit(master.ReturnAnalyzerFailed) - } + log.Printf("Scancode analyzer was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingAnalyzer // wait for the analysis phase to start + log.Printf("Scancode analyzer starts the analysis") + if err := analyzer.RunAnalyzerModule(); err != nil { + msg := fmt.Sprintf("Analyzer %v failed: %v\n", analyzer.GetModuleName(), err) + log.Printf(msg) + analyzer.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: true}) + os.Exit(master.ReturnAnalyzerFailed) + } + analysis.ReduceAnalyzersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Analyzer scancode finished") } func (scanalyzer *ScancodeAnalyzer) Configure(configMap map[string]string) error { @@ -74,7 +91,6 @@ func (scanalyzer *ScancodeAnalyzer) Analyze(masterClient *module.MasterClient, t log.Printf("failed getting source file nodes %v", err) return err } - infoNodeMsgs := []*service.InfoNodesMessage{} for { diff --git a/modules/analyzers/spdx-identifier-analyzer/main.go b/modules/analyzers/spdx-identifier-analyzer/main.go index 29dade2..0e6894c 100644 --- a/modules/analyzers/spdx-identifier-analyzer/main.go +++ b/modules/analyzers/spdx-identifier-analyzer/main.go @@ -9,14 +9,19 @@ import ( "os" "path/filepath" "regexp" + "sync" "github.com/QMSTR/qmstr/lib/go-qmstr/analysis" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/module" "github.com/QMSTR/qmstr/lib/go-qmstr/service" ) -var spdxPattern = regexp.MustCompile(`SPDX-License-Identifier: (.+)\s*`) +var ( + spdxPattern = regexp.MustCompile(`SPDX-License-Identifier: (.+)\s*`) + wg sync.WaitGroup +) type SpdxAnalyzer struct { basedir string @@ -24,10 +29,23 @@ type SpdxAnalyzer struct { func main() { analyzer := analysis.NewAnalyzer(&SpdxAnalyzer{}) - if err := analyzer.RunAnalyzerModule(); err != nil { - log.Printf("%v failed: %v\n", analyzer.GetModuleName(), err) - os.Exit(master.ReturnAnalyzerFailed) - } + log.Printf("Spdx identifier was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingAnalyzer // wait for the analysis phase to start + log.Printf("Spdx identifier analyzer starts the analysis") + if err := analyzer.RunAnalyzerModule(); err != nil { + msg := fmt.Sprintf("Analyzer %v failed: %v\n", analyzer.GetModuleName(), err) + log.Printf(msg) + analyzer.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: true}) + os.Exit(master.ReturnAnalyzerFailed) + } + analysis.ReduceAnalyzersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Spdx identifier finished") } func (spdxalizer *SpdxAnalyzer) Configure(configMap map[string]string) error { diff --git a/modules/analyzers/test-analyzer/main.go b/modules/analyzers/test-analyzer/main.go index 08bdf29..5b26114 100644 --- a/modules/analyzers/test-analyzer/main.go +++ b/modules/analyzers/test-analyzer/main.go @@ -5,12 +5,16 @@ import ( "log" "os" "strings" + "sync" "testing" "github.com/QMSTR/qmstr/lib/go-qmstr/analysis" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/module" + "github.com/QMSTR/qmstr/lib/go-qmstr/service" "github.com/QMSTR/qmstr/lib/go-qmstr/tester" + "golang.org/x/net/context" ) const ( @@ -22,6 +26,7 @@ var ( tests []string testfunction func(*testing.T) expectedTargets []string + wg sync.WaitGroup ) type TestAnalyzer struct{} @@ -29,10 +34,22 @@ type TestAnalyzer struct{} func main() { fmt.Println("This is the testalyzer") analyzer := analysis.NewAnalyzer(&TestAnalyzer{}) - if err := analyzer.RunAnalyzerModule(); err != nil { - log.Printf("%v failed: %v\n", analyzer.GetModuleName(), err) - os.Exit(master.ReturnAnalyzerFailed) - } + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingAnalyzer // wait for the analysis phase to start + log.Printf("Test analyzer starts the analysis") + if err := analyzer.RunAnalyzerModule(); err != nil { + msg := fmt.Sprintf("Analyzer %v failed: %v\n", analyzer.GetModuleName(), err) + log.Printf(msg) + analyzer.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: true}) + os.Exit(master.ReturnAnalyzerFailed) + } + analysis.ReduceAnalyzersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Analyzer test finished") } func (testanalyzer *TestAnalyzer) Configure(configMap map[string]string) error { diff --git a/modules/reporters/console-reporter/main.go b/modules/reporters/console-reporter/main.go index 3fe428f..51982ec 100644 --- a/modules/reporters/console-reporter/main.go +++ b/modules/reporters/console-reporter/main.go @@ -1,18 +1,37 @@ package main import ( + "context" + "fmt" "log" "os" + "sync" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/reporting" + "github.com/QMSTR/qmstr/lib/go-qmstr/service" ) +var wg sync.WaitGroup + func main() { reporter := reporting.NewReporter(&ConsoleReporter{}) - if err := reporter.RunReporterModule(); err != nil { - log.Printf("%v failed: %v\n", ModuleName, err) - os.Exit(master.ReturnReporterFailed) - } - log.Printf("%v completed successfully\n", ModuleName) + log.Printf("Console reporter was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingReporter // wait for the reporting phase to start + log.Printf("Console reporter starts the reporting\n") + if err := reporter.RunReporterModule(); err != nil { + msg := fmt.Sprintf("%v failed: %v\n", reporter.GetModuleName(), err) + log.Printf(msg) + reporter.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: false}) + os.Exit(master.ReturnReporterFailed) + } + reporting.ReduceReportersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Console reporter finished") } diff --git a/modules/reporters/package-manifest-reporter/main.go b/modules/reporters/package-manifest-reporter/main.go index db11d08..4370222 100644 --- a/modules/reporters/package-manifest-reporter/main.go +++ b/modules/reporters/package-manifest-reporter/main.go @@ -1,18 +1,37 @@ package main import ( + "context" + "fmt" "log" "os" + "sync" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/reporting" + "github.com/QMSTR/qmstr/lib/go-qmstr/service" ) +var wg sync.WaitGroup + func main() { reporter := reporting.NewReporter(&PkgManifestReporter{}) - if err := reporter.RunReporterModule(); err != nil { - log.Printf("%v failed: %v\n", ModuleName, err) - os.Exit(master.ReturnReporterFailed) - } - log.Printf("%v completed successfully\n", ModuleName) + log.Printf("Package manifest reporter was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingReporter // wait for the reporting phase to start + log.Printf("Package manifest reporter starts the reporting\n") + if err := reporter.RunReporterModule(); err != nil { + msg := fmt.Sprintf("%v failed: %v\n", reporter.GetModuleName(), err) + log.Printf(msg) + reporter.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: false}) + os.Exit(master.ReturnReporterFailed) + } + reporting.ReduceReportersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Package manifest reporter finished") } diff --git a/modules/reporters/qmstr-reporter-html/main.go b/modules/reporters/qmstr-reporter-html/main.go index 9bec874..e4b9f5e 100644 --- a/modules/reporters/qmstr-reporter-html/main.go +++ b/modules/reporters/qmstr-reporter-html/main.go @@ -1,18 +1,37 @@ package main import ( + "context" + "fmt" "log" "os" + "sync" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/reporting" + "github.com/QMSTR/qmstr/lib/go-qmstr/service" ) +var wg sync.WaitGroup + func main() { reporter := reporting.NewReporter(&HTMLReporter{Keep: false}) - if err := reporter.RunReporterModule(); err != nil { - log.Printf("%v failed: %v\n", ModuleName, err) - os.Exit(master.ReturnReporterFailed) - } - log.Printf("%v completed successfully\n", ModuleName) + log.Printf("Html reporter was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingReporter // wait for the reporting phase to start + log.Printf("Html reporter starts the reporting\n") + if err := reporter.RunReporterModule(); err != nil { + msg := fmt.Sprintf("%v failed: %v\n", reporter.GetModuleName(), err) + log.Printf(msg) + reporter.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: false}) + os.Exit(master.ReturnReporterFailed) + } + reporting.ReduceReportersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Html reporter finished") } diff --git a/modules/reporters/test-reporter/main.go b/modules/reporters/test-reporter/main.go index 778b1a4..9eeb6a3 100644 --- a/modules/reporters/test-reporter/main.go +++ b/modules/reporters/test-reporter/main.go @@ -5,8 +5,10 @@ import ( "fmt" "log" "os" + "sync" "testing" + "github.com/QMSTR/qmstr/lib/go-qmstr/cli" "github.com/QMSTR/qmstr/lib/go-qmstr/master" "github.com/QMSTR/qmstr/lib/go-qmstr/module" "github.com/QMSTR/qmstr/lib/go-qmstr/reporting" @@ -16,16 +18,30 @@ import ( type TestReporter struct{} -var testprojectNode *service.ProjectNode +var ( + testprojectNode *service.ProjectNode + wg sync.WaitGroup +) func main() { reporter := reporting.NewReporter(&TestReporter{}) - if err := reporter.RunReporterModule(); err != nil { - log.Printf("%v failed: %v\n", reporter.GetModuleName(), err) - os.Exit(master.ReturnReporterFailed) - } - log.Printf("%v completed successfully\n", reporter.GetModuleName()) - + log.Printf("Test reporter was initialized") + wg.Add(1) + go func() { + defer wg.Done() + <-cli.PingReporter // wait for the reporting phase to start + log.Printf("Test reporter starts the reporting\n") + if err := reporter.RunReporterModule(); err != nil { + msg := fmt.Sprintf("%v failed: %v\n", reporter.GetModuleName(), err) + log.Printf(msg) + reporter.CtrlSvcClient.ShutdownModule(context.Background(), &service.ShutdownModuleRequest{ + Message: msg, DB: false}) + os.Exit(master.ReturnReporterFailed) + } + reporting.ReduceReportersCounter() + }() + wg.Wait() // Waits until the goroutine is done + log.Printf("Test reporter finished") } // Configure sets up the working directory for this reporting run. diff --git a/proto/analyzerservice.proto b/proto/analyzerservice.proto index 2a6a654..ec3002f 100644 --- a/proto/analyzerservice.proto +++ b/proto/analyzerservice.proto @@ -9,10 +9,8 @@ message AnalyzerConfigRequest { } message AnalyzerConfigResponse { - map configMap = 2; - repeated PathSubstitution pathSub = 3; - int64 token = 4; - string name = 6; + string analyzerConfig = 1; + int64 token = 2; } message InfoNodesMessage { diff --git a/proto/controlservice.proto b/proto/controlservice.proto index cadb9c2..d77a796 100644 --- a/proto/controlservice.proto +++ b/proto/controlservice.proto @@ -59,10 +59,29 @@ message ExportResponse { bool success = 1; } +message InitModuleRequest { + string moduleName = 1; + int64 extraConfig = 2; +} + +message Request { +} + +message Response { +} + +message ShutdownModuleRequest { + string message = 1; + bool dB = 2; +} + service ControlService { rpc Log(LogMessage) returns (LogResponse) {} rpc Quit(QuitMessage) returns (QuitResponse) {} rpc SwitchPhase(SwitchPhaseMessage) returns (SwitchPhaseResponse) {} + rpc InitModule(InitModuleRequest) returns (Response) {} + rpc ShutdownModule(ShutdownModuleRequest) returns (Response) {} + rpc ClosePhase(Request) returns (Response) {} rpc GetPackageNode(PackageNode) returns (stream PackageNode) {} rpc GetPackageTargets(PackageNode) returns (stream FileNode) {} rpc GetFileNode(GetFileNodeMessage) returns (stream FileNode) {}