From 9b56b20ca4eaa306af222cc7b2d23a1d2aa2fb0d Mon Sep 17 00:00:00 2001 From: Aleksandr Rogozin Date: Tue, 8 Oct 2019 04:58:26 -0400 Subject: [PATCH] Modified checkKey field type to match generated proto3 go code (#28) This PR updates key field type in checkKey to match generated code for proto3 syntax. --- Gopkg.lock | 414 ++++++++++++---- Gopkg.toml | 59 ++- Makefile | 2 +- e2e/api/api_test.go | 6 +- reconciler/healthchecks/healthchecks.go | 10 +- types/types.pb.go | 599 ++++++++++++++++-------- 6 files changed, 788 insertions(+), 302 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index eba4681..a6fcdb9 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -2,54 +2,86 @@ [[projects]] - branch = "master" + digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" name = "github.com/beorn7/perks" packages = ["quantile"] - revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" + pruneopts = "UT" + revision = "37c8de3658fcb183f997c4e13e8337516ab753e6" + version = "v1.0.1" [[projects]] + digest = "1:c1100fc71e23b6a32b2c68a5202a848fd13811d5a10b12edb8019c3667d1cd9a" name = "github.com/cenkalti/backoff" packages = ["."] - revision = "61153c768f31ee5f130071d08fc82b85208528de" - version = "v1.1.0" + pruneopts = "UT" + revision = "4b4cebaf850ec58f1bb1fec5bdebdf8501c2bc3f" + version = "v3.0.0" [[projects]] + digest = "1:949d204b96ab9aadf6c19fee79ffc347966dc02d0fcd8219b8e2861f96d009dc" name = "github.com/coreos/etcd" packages = [ "client", - "pkg/pathutil", - "pkg/srv", - "pkg/types", - "version" + "clientv3", ] - revision = "c23606781f63d09917a1e7abfcefeb337a9608ea" - version = "v3.3.0" + pruneopts = "UT" + revision = "a14579fbfb1a000439a40abf71862df51b0a2136" + version = "v3.4.1" [[projects]] + digest = "1:05ffeeed3f0f05520de0679f6aa3219ffee69cfd6d9fb6c194879d4c818ad670" name = "github.com/coreos/go-semver" packages = ["semver"] - revision = "8ab6407b697782a06568d4b7f1db25550ec2e4c6" - version = "v0.2.0" + pruneopts = "UT" + revision = "e214231b295a8ea9479f11b70b35d5acf3556d9b" + version = "v0.3.0" [[projects]] + digest = "1:bcf36df8d43860bfde913d008301aef27c6e9a303582118a837c4a34c0d18167" + name = "github.com/coreos/go-systemd" + packages = ["journal"] + pruneopts = "UT" + revision = "e64a0ec8b42a61e2a9801dc1d0abe539dea79197" + version = "v20" + +[[projects]] + digest = "1:39ff4d4d6baca1ac63c6a03404b761d664be14a71bb5a4aca8fef643d0f66fef" + name = "github.com/coreos/pkg" + packages = ["capnslog"] + pruneopts = "UT" + revision = "97fdf19511ea361ae1c100dd393cc47f8dcfa1e1" + version = "v4" + +[[projects]] + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" + pruneopts = "UT" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" [[projects]] branch = "master" + digest = "1:38759a7698b5d21692ff77b56fa1365fa8e2918cd70ec5941394874b3b066006" name = "github.com/docker/libnetwork" packages = ["ipvs"] - revision = "5c1218c956c99f3365711974e300087810c31379" + pruneopts = "UT" + revision = "0025177e3dabbe0de151be0957dcaff149d43536" [[projects]] + digest = "1:877b9eedd8a92d456a213fe85fb8c6d178cb2bc499e86ec5b7f0bcc05d121e54" name = "github.com/gogo/protobuf" - packages = ["proto"] - revision = "1adfc126b41513cc696b209667c8656ea7aac67c" - version = "v1.0.0" + packages = [ + "gogoproto", + "proto", + "protoc-gen-gogo/descriptor", + ] + pruneopts = "UT" + revision = "0ca988a254f991240804bf9821f3450d87ccbb1b" + version = "v1.3.0" [[projects]] + digest = "1:05b2bdbb1b29940f164076cbe1c359935ecf4ad12d536832b94275c67d4d0241" name = "github.com/golang/protobuf" packages = [ "proto", @@ -58,30 +90,92 @@ "ptypes/duration", "ptypes/empty", "ptypes/timestamp", - "ptypes/wrappers" + "ptypes/wrappers", ] - revision = "925541529c1fa6821df4e44ce2723319eb2be768" - version = "v1.0.0" + pruneopts = "UT" + revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" + version = "v1.3.2" [[projects]] + digest = "1:582b704bebaa06b48c29b0cec224a6058a09c86883aaddabde889cd1a5f73e1b" + name = "github.com/google/uuid" + packages = ["."] + pruneopts = "UT" + revision = "0cd6bf5da1e1c83f8b45653022c74f71af0538a4" + version = "v1.1.1" + +[[projects]] + branch = "master" + digest = "1:59392ed8afb901aab4287d4894df8191722e34f3957716f4350c8c133ce99046" + name = "github.com/hpcloud/tail" + packages = [ + ".", + "ratelimiter", + "util", + "watch", + "winfile", + ] + pruneopts = "UT" + revision = "a1dbeea552b7c8df4b542c66073e393de198a800" + +[[projects]] + digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" name = "github.com/inconshreveable/mousetrap" packages = ["."] + pruneopts = "UT" revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" version = "v1.0" [[projects]] + digest = "1:709cd2a2c29cc9b89732f6c24846bbb9d6270f28ef5ef2128cc73bd0d6d7bff9" + name = "github.com/json-iterator/go" + packages = ["."] + pruneopts = "UT" + revision = "27518f6661eba504be5a7a9a9f6d9460d892ade3" + version = "v1.1.7" + +[[projects]] + digest = "1:31e761d97c76151dde79e9d28964a812c46efc5baee4085b86f68f0c654450de" + name = "github.com/konsorten/go-windows-terminal-sequences" + packages = ["."] + pruneopts = "UT" + revision = "f55edac94c9bbba5d6182a4be46d86a2c9b5b50e" + version = "v1.0.2" + +[[projects]] + digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] - revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" - version = "v1.0.0" + pruneopts = "UT" + revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + version = "v1.0.1" [[projects]] - branch = "master" + digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" + name = "github.com/modern-go/concurrent" + packages = ["."] + pruneopts = "UT" + revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" + version = "1.0.3" + +[[projects]] + digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855" + name = "github.com/modern-go/reflect2" + packages = ["."] + pruneopts = "UT" + revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" + version = "1.0.1" + +[[projects]] + digest = "1:96df5bdca983e4b8c62682af5b67100b187d582ac6db0968d8af52e84138d1e6" name = "github.com/onrik/logrus" packages = ["filename"] - revision = "6a64e23a4923a8d0d4db2806dcf3e55af1e48f61" + pruneopts = "UT" + revision = "94ad747c51752e8dfa69cfd0335b8c76bf1ae592" + version = "v0.4.1" [[projects]] + digest = "1:0c84de0c9ef9924db2bc8ed3b18960ea4ee549c6b04d0b386c0e3043ccb11243" name = "github.com/onsi/ginkgo" packages = [ ".", @@ -102,12 +196,14 @@ "reporters/stenographer", "reporters/stenographer/support/go-colorable", "reporters/stenographer/support/go-isatty", - "types" + "types", ] - revision = "9eda700730cba42af70d53180f9dcce9266bc2bc" - version = "v1.4.0" + pruneopts = "UT" + revision = "974566c482abc93ffd3df6f4626e79076c7ed290" + version = "v1.10.1" [[projects]] + digest = "1:5a9c247f0da47393b38eb20b53077be9e25452d8b2de1fdfec857233a18c503c" name = "github.com/onsi/gomega" packages = [ ".", @@ -121,140 +217,229 @@ "matchers/support/goraph/edge", "matchers/support/goraph/node", "matchers/support/goraph/util", - "types" + "types", ] - revision = "003f63b7f4cff3fc95357005358af2de0f5fe152" - version = "v1.3.0" + pruneopts = "UT" + revision = "bdebf9e0ece900259084cfa4121b97ce1a540939" + version = "v1.7.0" [[projects]] + digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" name = "github.com/pmezard/go-difflib" packages = ["difflib"] + pruneopts = "UT" revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" [[projects]] + digest = "1:eb04f69c8991e52eff33c428bd729e04208bf03235be88e4df0d88497c6861b9" name = "github.com/prometheus/client_golang" packages = [ "prometheus", - "prometheus/promhttp" + "prometheus/internal", + "prometheus/promhttp", ] - revision = "c5b7fccd204277076155f10851dad72b76a49317" - version = "v0.8.0" + pruneopts = "UT" + revision = "170205fb58decfd011f1550d4cfb737230d7ae4f" + version = "v1.1.0" [[projects]] branch = "master" + digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] - revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c" + pruneopts = "UT" + revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" [[projects]] - branch = "master" + digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" name = "github.com/prometheus/common" packages = [ "expfmt", "internal/bitbucket.org/ww/goautoneg", - "model" + "model", ] - revision = "89604d197083d4781071d3c65855d24ecfb0a563" + pruneopts = "UT" + revision = "287d3e634a1e550c9e463dd7e5a75a422c614505" + version = "v0.7.0" [[projects]] - branch = "master" + digest = "1:a210815b437763623ecca8eb91e6a0bf4f2d6773c5a6c9aec0e28f19e5fd6deb" name = "github.com/prometheus/procfs" packages = [ ".", + "internal/fs", "internal/util", - "nfs", - "xfs" ] - revision = "cb4147076ac75738c9a7d279075a253c0cc5acbd" + pruneopts = "UT" + revision = "499c85531f756d1129edd26485a5f73871eeb308" + version = "v0.0.5" [[projects]] + digest = "1:04457f9f6f3ffc5fea48e71d62f2ca256637dee0a04d710288e27e05c8b41976" name = "github.com/sirupsen/logrus" packages = ["."] - revision = "d682213848ed68c0a260ca37d6dd5ace8423f5ba" - version = "v1.0.4" + pruneopts = "UT" + revision = "839c75faf7f98a33d445d181f3018b5c3409a45e" + version = "v1.4.2" + +[[projects]] + digest = "1:11c3244c927c07982227f49ce56c8c9a579f6ea4ed1db1da2ecefca14d9693bf" + name = "github.com/sky-uk/merlin" + packages = [ + "ipvs", + "reconciler", + "reconciler/healthchecks", + "server", + "store", + "types", + ] + pruneopts = "UT" + revision = "049e76fcc1901f5b797fd03a06c6f65246ce6609" + version = "0.2.1" [[projects]] + digest = "1:e096613fb7cf34743d49af87d197663cfccd61876e2219853005a57baedfa562" name = "github.com/spf13/cobra" packages = ["."] - revision = "a1f051bc3eba734da4772d60e2d677f47cf93ef4" - version = "v0.0.2" + pruneopts = "UT" + revision = "f2b07da1e2c38d5f12845a4f607e2e1018cbb1f5" + version = "v0.0.5" [[projects]] + digest = "1:524b71991fc7d9246cc7dc2d9e0886ccb97648091c63e30eef619e6862c955dd" name = "github.com/spf13/pflag" packages = ["."] - revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" - version = "v1.0.0" + pruneopts = "UT" + revision = "2e9d26c8c37aae03e3f9d4e90b7116f5accb7cab" + version = "v1.0.5" [[projects]] + digest = "1:ac83cf90d08b63ad5f7e020ef480d319ae890c208f8524622a2f3136e2686b02" name = "github.com/stretchr/objx" packages = ["."] - revision = "facf9a85c22f48d2f52f2380e4efce1768749a89" - version = "v0.1" + pruneopts = "UT" + revision = "477a77ecc69700c7cdeb1fa9e129548e1c1c393c" + version = "v0.1.1" [[projects]] + digest = "1:ad527ce5c6b2426790449db7663fe53f8bb647f9387295406794c8be001238da" name = "github.com/stretchr/testify" packages = [ "assert", - "mock" + "mock", ] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" + pruneopts = "UT" + revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" + version = "v1.4.0" + +[[projects]] + digest = "1:60421394503c8f85259c66188a6de17d8dd41e31e6655efe91e9f1d37ce8b8a5" + name = "github.com/vishvananda/netlink" + packages = ["nl"] + pruneopts = "UT" + revision = "a2ad57a690f3caf3015351d2d6e1c0b95c349752" + version = "v1.0.0" [[projects]] - name = "github.com/ugorji/go" - packages = ["codec"] - revision = "9831f2c3ac1068a78f50999a30db84270f647af6" - version = "v1.1" + branch = "master" + digest = "1:b405c6b13f8f88fde0aab3e5c566554fc7c2c5579dc5de603a188d4e44db2712" + name = "github.com/vishvananda/netns" + packages = ["."] + pruneopts = "UT" + revision = "7109fa855b0ff1ebef7fbd2f6aa613e8db7cfbc0" [[projects]] - name = "github.com/vishvananda/netlink" + digest = "1:fae870b8df16b220bf5ac73140c9bf72fb7aafbc170952364702f0793bb5a6d2" + name = "go.etcd.io/etcd" packages = [ - ".", - "nl" + "auth/authpb", + "clientv3/balancer", + "clientv3/balancer/connectivity", + "clientv3/balancer/picker", + "clientv3/balancer/resolver/endpoint", + "clientv3/credentials", + "etcdserver/api/v3rpc/rpctypes", + "etcdserver/etcdserverpb", + "mvcc/mvccpb", + "pkg/logutil", + "pkg/pathutil", + "pkg/srv", + "pkg/systemd", + "pkg/types", + "raft", + "raft/confchange", + "raft/quorum", + "raft/raftpb", + "raft/tracker", + "version", ] - revision = "b2de5d10e38ecce8607e6b438b6d174f389a004e" + pruneopts = "UT" + revision = "a14579fbfb1a000439a40abf71862df51b0a2136" + version = "v3.4.1" [[projects]] - branch = "master" - name = "github.com/vishvananda/netns" + digest = "1:777e729b475d3895c7229552aa10076f0d177daf37c0a72258006d046d329960" + name = "go.uber.org/atomic" packages = ["."] - revision = "be1fbeda19366dea804f00efff2dd73a1642fdcc" + pruneopts = "UT" + revision = "4e336646b2ef9fc6e47be8e21594178f98e5ebcf" + version = "v1.2.0" [[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - revision = "1875d0a70c90e57f11972aefd42276df65e895b9" + digest = "1:60bf2a5e347af463c42ed31a493d817f8a72f102543060ed992754e689805d1a" + name = "go.uber.org/multierr" + packages = ["."] + pruneopts = "UT" + revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a" + version = "v1.1.0" + +[[projects]] + digest = "1:676160e6a4722b08e0e26b11521d575c2cb2b6f0c679e1ee6178c5d8dee51e5e" + name = "go.uber.org/zap" + packages = [ + ".", + "buffer", + "internal/bufferpool", + "internal/color", + "internal/exit", + "zapcore", + ] + pruneopts = "UT" + revision = "27376062155ad36be76b0f12cf1572a221d3a48c" + version = "v1.10.0" [[projects]] branch = "master" + digest = "1:6185d6cc6e822b8a71e2d331a0165e3e2fac00b78f17f8d723a6018df75301c0" name = "golang.org/x/net" packages = [ "context", "html", "html/atom", "html/charset", + "http/httpguts", "http2", "http2/hpack", "idna", "internal/timeseries", - "lex/httplex", - "trace" + "trace", ] - revision = "2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1" + pruneopts = "UT" + revision = "c5a3c61f89f3ed696ec36b629ef1b97541165225" [[projects]] - branch = "master" + digest = "1:9208ed04c8d837cca0d37a3f54a2e6933ddcc1bf3c2c3ce7b6ad8a0065e69a1f" name = "golang.org/x/sys" packages = [ "unix", - "windows" + "windows", ] - revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd" + pruneopts = "UT" + revision = "d455e41777fca6e8a5a79e34a14b8368bc11d9ba" [[projects]] - branch = "master" + digest = "1:28deae5fe892797ff37a317b5bcda96d11d1c90dadd89f1337651df3bc4c586e" name = "golang.org/x/text" packages = [ "collate", @@ -271,6 +456,8 @@ "encoding/unicode", "internal/colltab", "internal/gen", + "internal/language", + "internal/language/compact", "internal/tag", "internal/triegen", "internal/ucd", @@ -282,30 +469,46 @@ "unicode/bidi", "unicode/cldr", "unicode/norm", - "unicode/rangetable" + "unicode/rangetable", ] - revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" + pruneopts = "UT" + revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" + version = "v0.3.2" [[projects]] branch = "master" + digest = "1:583a0c80f5e3a9343d33aea4aead1e1afcc0043db66fdf961ddd1fe8cd3a4faf" name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] - revision = "2b5a72b8730b0b16380010cfe5286c42108d88e7" + pruneopts = "UT" + revision = "20e1ac93f88cf06d2b1defb90b9e9e126c7dfff6" [[projects]] + digest = "1:6cd77d0b616d2dcebd363dfecba593f27b0151fc82cdb5fbfb96c5a7cfbc95b5" name = "google.golang.org/grpc" packages = [ ".", "balancer", "balancer/base", "balancer/roundrobin", + "binarylog/grpc_binarylog_v1", "codes", "connectivity", "credentials", + "credentials/internal", "encoding", - "grpclb/grpc_lb_v1/messages", + "encoding/proto", "grpclog", "internal", + "internal/backoff", + "internal/balancerload", + "internal/binarylog", + "internal/channelz", + "internal/envconfig", + "internal/grpcrand", + "internal/grpcsync", + "internal/syscall", + "internal/transport", "keepalive", "metadata", "naming", @@ -313,23 +516,64 @@ "resolver", "resolver/dns", "resolver/passthrough", + "serviceconfig", "stats", "status", "tap", - "transport" ] - revision = "6b51017f791ae1cfbec89c52efdf444b13b550ef" - version = "v1.9.2" + pruneopts = "UT" + revision = "f6d0f9ee430895e87ef1ceb5ac8f39725bafceef" + version = "v1.24.0" + +[[projects]] + digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd" + name = "gopkg.in/fsnotify/fsnotify.v1" + packages = ["."] + pruneopts = "UT" + revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" + version = "v1.4.7" [[projects]] - branch = "v2" + digest = "1:3c839a777de0e6da035c9de900b60cbec463b0a89351192c1ea083eaf9e0fce0" + name = "gopkg.in/tomb.v1" + packages = ["."] + pruneopts = "UT" + revision = "c131134a1947e9afd9cecfe11f4c6dff0732ae58" + +[[projects]] + digest = "1:1033856ca84153217fda9f527e1c02e11b636e28ad2ab19f2ea4a06e4abbe8e1" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" + pruneopts = "UT" + revision = "bb4e33bf68bf89cad44d386192cbed201f35b241" + version = "v2.2.3" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "41ebad0811a4c0bb6127dabb4c6f8416e0a238cb59bd014e2ba7bbabe801ecdf" + input-imports = [ + "github.com/cenkalti/backoff", + "github.com/coreos/etcd/client", + "github.com/coreos/etcd/clientv3", + "github.com/docker/libnetwork/ipvs", + "github.com/gogo/protobuf/proto", + "github.com/golang/protobuf/proto", + "github.com/golang/protobuf/ptypes", + "github.com/golang/protobuf/ptypes/duration", + "github.com/golang/protobuf/ptypes/empty", + "github.com/golang/protobuf/ptypes/wrappers", + "github.com/onrik/logrus/filename", + "github.com/onsi/ginkgo", + "github.com/onsi/ginkgo/extensions/table", + "github.com/onsi/gomega", + "github.com/prometheus/client_golang/prometheus/promhttp", + "github.com/sirupsen/logrus", + "github.com/spf13/cobra", + "github.com/spf13/pflag", + "github.com/stretchr/testify/mock", + "google.golang.org/grpc", + "google.golang.org/grpc/codes", + "google.golang.org/grpc/status", + ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 444a5e0..a409221 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,6 +1,6 @@ # Gopkg.toml example # -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html # for detailed Gopkg.toml documentation. # # required = ["github.com/user/thing/cmd/thing"] @@ -24,54 +24,63 @@ # go-tests = true # unused-packages = true -# To constrain the version for docker/libnetwork. -required = ["github.com/vishvananda/netlink"] -# See https://github.com/docker/libnetwork/blob/master/vendor.conf. [[constraint]] - name = "github.com/vishvananda/netlink" - revision = "b2de5d10e38ecce8607e6b438b6d174f389a004e" + name = "github.com/cenkalti/backoff" + version = "3.0.0" + +[[constraint]] + name = "github.com/coreos/etcd" + version = "3.4.1" [[constraint]] - name = "github.com/docker/libnetwork" branch = "master" + name = "github.com/docker/libnetwork" [[constraint]] - name = "github.com/sirupsen/logrus" - version = "1.0.4" + name = "github.com/gogo/protobuf" + version = "1.3.0" [[constraint]] name = "github.com/golang/protobuf" - version = "1.0.0" + version = "1.3.2" [[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.1" + name = "github.com/onrik/logrus" + version = "0.4.1" [[constraint]] - branch = "master" - name = "golang.org/x/net" + name = "github.com/onsi/ginkgo" + version = "1.10.1" [[constraint]] - name = "google.golang.org/grpc" - version = "1.9.2" + name = "github.com/onsi/gomega" + version = "1.7.0" -[prune] - go-tests = true - unused-packages = true +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "1.1.0" [[constraint]] - name = "github.com/coreos/etcd" - version = "3.3.0" + name = "github.com/sirupsen/logrus" + version = "1.4.2" [[constraint]] name = "github.com/spf13/cobra" - version = "0.0.1" + version = "0.0.5" [[constraint]] - name = "github.com/onsi/ginkgo" + name = "github.com/spf13/pflag" + version = "1.0.5" + +[[constraint]] + name = "github.com/stretchr/testify" version = "1.4.0" [[constraint]] - branch = "master" - name = "github.com/onrik/logrus" + name = "google.golang.org/grpc" + version = "1.24.0" + +[prune] + go-tests = true + unused-packages = true diff --git a/Makefile b/Makefile index a8cb8f9..ab8805d 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ travis : check build-release docker setup : @echo "== setup" - go get -u github.com/golang/lint/golint + go get -u golang.org/x/lint/golint go get -u golang.org/x/tools/cmd/goimports go get -u github.com/golang/dep/cmd/dep go get -u github.com/golang/protobuf/protoc-gen-go diff --git a/e2e/api/api_test.go b/e2e/api/api_test.go index afbea22..0031fa5 100644 --- a/e2e/api/api_test.go +++ b/e2e/api/api_test.go @@ -442,20 +442,20 @@ func testApi(storeBackend string) { if update.GetConfig().GetWeight() != nil { server.Config.Weight = update.Config.Weight } - Expect(server).To(Equal(actualServer)) + Expect(proto.Equal(server, actualServer)) }, Entry("change weight", &types.RealServer{ ServiceID: service.Id, Key: validServerKey, Config: &types.RealServer_Config{ - Weight: &wrappers.UInt32Value{4}, + Weight: &wrappers.UInt32Value{Value: 4}, }, }), Entry("set weight to 0", &types.RealServer{ ServiceID: service.Id, Key: validServerKey, Config: &types.RealServer_Config{ - Weight: &wrappers.UInt32Value{0}, + Weight: &wrappers.UInt32Value{Value: 0}, }, }), Entry("change forward", &types.RealServer{ diff --git a/reconciler/healthchecks/healthchecks.go b/reconciler/healthchecks/healthchecks.go index 57d9480..5596e0d 100644 --- a/reconciler/healthchecks/healthchecks.go +++ b/reconciler/healthchecks/healthchecks.go @@ -45,7 +45,7 @@ type Checker interface { type checkKey struct { serviceID string - key types.RealServer_Key + key *types.RealServer_Key } type checker struct { @@ -87,7 +87,7 @@ func (c *checker) IsDown(serviceID string, key *types.RealServer_Key) bool { c.Lock() defer c.Unlock() - checkKey := checkKey{serviceID: serviceID, key: *key} + checkKey := checkKey{serviceID: serviceID, key: key} check, ok := c.checks[checkKey] if !ok { panic(fmt.Sprintf("bug: health check not added yet: %v", checkKey)) @@ -141,7 +141,7 @@ func (c *checker) SetHealthCheck(serviceID string, key *types.RealServer_Key, he transitionFn: fn, } - checkKey := checkKey{serviceID: serviceID, key: *key} + checkKey := checkKey{serviceID: serviceID, key: key} if origCheck, ok := c.checks[checkKey]; ok { origCheck.state.Lock() @@ -187,7 +187,7 @@ func (c *checker) RemHealthCheck(serviceID string, key *types.RealServer_Key) { c.Lock() defer c.Unlock() - checkKey := checkKey{serviceID: serviceID, key: *key} + checkKey := checkKey{serviceID: serviceID, key: key} check, ok := c.checks[checkKey] if !ok { // nothing to remove @@ -206,7 +206,7 @@ func (c *checker) Stop() { c.Unlock() for _, key := range keys { - c.RemHealthCheck(key.serviceID, &key.key) + c.RemHealthCheck(key.serviceID, key.key) } } diff --git a/types/types.pb.go b/types/types.pb.go index 23d4dd6..7813a68 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -1,29 +1,20 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // source: types/types.proto -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - types/types.proto - -It has these top-level messages: - VirtualService - RealServer - ListResponse -*/ package types -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/empty" -import google_protobuf1 "github.com/golang/protobuf/ptypes/wrappers" -import google_protobuf2 "github.com/golang/protobuf/ptypes/duration" - import ( - context "golang.org/x/net/context" + context "context" + fmt "fmt" + math "math" + + proto "github.com/golang/protobuf/proto" + duration "github.com/golang/protobuf/ptypes/duration" + empty "github.com/golang/protobuf/ptypes/empty" + wrappers "github.com/golang/protobuf/ptypes/wrappers" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" ) // Reference imports to suppress errors if they are not otherwise used. @@ -35,7 +26,7 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Protocol int32 @@ -50,6 +41,7 @@ var Protocol_name = map[int32]string{ 1: "TCP", 2: "UDP", } + var Protocol_value = map[string]int32{ "UNSET_PROTOCOL": 0, "TCP": 1, @@ -59,7 +51,10 @@ var Protocol_value = map[string]int32{ func (x Protocol) String() string { return proto.EnumName(Protocol_name, int32(x)) } -func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (Protocol) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{0} +} // ForwardMethod to forward packets to real servers. type ForwardMethod int32 @@ -77,6 +72,7 @@ var ForwardMethod_name = map[int32]string{ 2: "TUNNEL", 3: "MASQ", } + var ForwardMethod_value = map[string]int32{ "UNSET_FORWARD_METHOD": 0, "ROUTE": 1, @@ -87,21 +83,47 @@ var ForwardMethod_value = map[string]int32{ func (x ForwardMethod) String() string { return proto.EnumName(ForwardMethod_name, int32(x)) } -func (ForwardMethod) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (ForwardMethod) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{1} +} type VirtualService struct { // ID is a unique identifier of this virtual service to associate it with real servers. - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Key is the identifying part in IPVS. - Key *VirtualService_Key `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` + Key *VirtualService_Key `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // Config is the configurable part in IPVS. - Config *VirtualService_Config `protobuf:"bytes,3,opt,name=config" json:"config,omitempty"` + Config *VirtualService_Config `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *VirtualService) Reset() { *m = VirtualService{} } -func (m *VirtualService) String() string { return proto.CompactTextString(m) } -func (*VirtualService) ProtoMessage() {} -func (*VirtualService) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *VirtualService) Reset() { *m = VirtualService{} } +func (m *VirtualService) String() string { return proto.CompactTextString(m) } +func (*VirtualService) ProtoMessage() {} +func (*VirtualService) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{0} +} + +func (m *VirtualService) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VirtualService.Unmarshal(m, b) +} +func (m *VirtualService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VirtualService.Marshal(b, m, deterministic) +} +func (m *VirtualService) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualService.Merge(m, src) +} +func (m *VirtualService) XXX_Size() int { + return xxx_messageInfo_VirtualService.Size(m) +} +func (m *VirtualService) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualService.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualService proto.InternalMessageInfo func (m *VirtualService) GetId() string { if m != nil { @@ -125,15 +147,38 @@ func (m *VirtualService) GetConfig() *VirtualService_Config { } type VirtualService_Key struct { - Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` - Protocol Protocol `protobuf:"varint,3,opt,name=protocol,enum=types.Protocol" json:"protocol,omitempty"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + Protocol Protocol `protobuf:"varint,3,opt,name=protocol,proto3,enum=types.Protocol" json:"protocol,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *VirtualService_Key) Reset() { *m = VirtualService_Key{} } +func (m *VirtualService_Key) String() string { return proto.CompactTextString(m) } +func (*VirtualService_Key) ProtoMessage() {} +func (*VirtualService_Key) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{0, 0} +} + +func (m *VirtualService_Key) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VirtualService_Key.Unmarshal(m, b) +} +func (m *VirtualService_Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VirtualService_Key.Marshal(b, m, deterministic) +} +func (m *VirtualService_Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualService_Key.Merge(m, src) +} +func (m *VirtualService_Key) XXX_Size() int { + return xxx_messageInfo_VirtualService_Key.Size(m) +} +func (m *VirtualService_Key) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualService_Key.DiscardUnknown(m) } -func (m *VirtualService_Key) Reset() { *m = VirtualService_Key{} } -func (m *VirtualService_Key) String() string { return proto.CompactTextString(m) } -func (*VirtualService_Key) ProtoMessage() {} -func (*VirtualService_Key) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } +var xxx_messageInfo_VirtualService_Key proto.InternalMessageInfo func (m *VirtualService_Key) GetIp() string { if m != nil { @@ -157,14 +202,37 @@ func (m *VirtualService_Key) GetProtocol() Protocol { } type VirtualService_Config struct { - Scheduler string `protobuf:"bytes,1,opt,name=scheduler" json:"scheduler,omitempty"` - Flags []string `protobuf:"bytes,2,rep,name=flags" json:"flags,omitempty"` + Scheduler string `protobuf:"bytes,1,opt,name=scheduler,proto3" json:"scheduler,omitempty"` + Flags []string `protobuf:"bytes,2,rep,name=flags,proto3" json:"flags,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *VirtualService_Config) Reset() { *m = VirtualService_Config{} } -func (m *VirtualService_Config) String() string { return proto.CompactTextString(m) } -func (*VirtualService_Config) ProtoMessage() {} -func (*VirtualService_Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} } +func (m *VirtualService_Config) Reset() { *m = VirtualService_Config{} } +func (m *VirtualService_Config) String() string { return proto.CompactTextString(m) } +func (*VirtualService_Config) ProtoMessage() {} +func (*VirtualService_Config) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{0, 1} +} + +func (m *VirtualService_Config) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_VirtualService_Config.Unmarshal(m, b) +} +func (m *VirtualService_Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_VirtualService_Config.Marshal(b, m, deterministic) +} +func (m *VirtualService_Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_VirtualService_Config.Merge(m, src) +} +func (m *VirtualService_Config) XXX_Size() int { + return xxx_messageInfo_VirtualService_Config.Size(m) +} +func (m *VirtualService_Config) XXX_DiscardUnknown() { + xxx_messageInfo_VirtualService_Config.DiscardUnknown(m) +} + +var xxx_messageInfo_VirtualService_Config proto.InternalMessageInfo func (m *VirtualService_Config) GetScheduler() string { if m != nil { @@ -182,19 +250,43 @@ func (m *VirtualService_Config) GetFlags() []string { type RealServer struct { // ServiceID is the id of the virtual service to associate this real server with. - ServiceID string `protobuf:"bytes,1,opt,name=serviceID" json:"serviceID,omitempty"` + // Field may be blank if from IPVS. + ServiceID string `protobuf:"bytes,1,opt,name=serviceID,proto3" json:"serviceID,omitempty"` // Key is the identifying part in IPVS. - Key *RealServer_Key `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` + Key *RealServer_Key `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // Config is the configurable part in IPVS. - Config *RealServer_Config `protobuf:"bytes,3,opt,name=config" json:"config,omitempty"` + Config *RealServer_Config `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` // HealthCheck is the check done by merlin against the associated real server. - HealthCheck *RealServer_HealthCheck `protobuf:"bytes,4,opt,name=health_check,json=healthCheck" json:"health_check,omitempty"` + HealthCheck *RealServer_HealthCheck `protobuf:"bytes,4,opt,name=health_check,json=healthCheck,proto3" json:"health_check,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RealServer) Reset() { *m = RealServer{} } -func (m *RealServer) String() string { return proto.CompactTextString(m) } -func (*RealServer) ProtoMessage() {} -func (*RealServer) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *RealServer) Reset() { *m = RealServer{} } +func (m *RealServer) String() string { return proto.CompactTextString(m) } +func (*RealServer) ProtoMessage() {} +func (*RealServer) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{1} +} + +func (m *RealServer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RealServer.Unmarshal(m, b) +} +func (m *RealServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RealServer.Marshal(b, m, deterministic) +} +func (m *RealServer) XXX_Merge(src proto.Message) { + xxx_messageInfo_RealServer.Merge(m, src) +} +func (m *RealServer) XXX_Size() int { + return xxx_messageInfo_RealServer.Size(m) +} +func (m *RealServer) XXX_DiscardUnknown() { + xxx_messageInfo_RealServer.DiscardUnknown(m) +} + +var xxx_messageInfo_RealServer proto.InternalMessageInfo func (m *RealServer) GetServiceID() string { if m != nil { @@ -225,14 +317,37 @@ func (m *RealServer) GetHealthCheck() *RealServer_HealthCheck { } type RealServer_Key struct { - Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` - Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RealServer_Key) Reset() { *m = RealServer_Key{} } +func (m *RealServer_Key) String() string { return proto.CompactTextString(m) } +func (*RealServer_Key) ProtoMessage() {} +func (*RealServer_Key) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{1, 0} +} + +func (m *RealServer_Key) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RealServer_Key.Unmarshal(m, b) +} +func (m *RealServer_Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RealServer_Key.Marshal(b, m, deterministic) +} +func (m *RealServer_Key) XXX_Merge(src proto.Message) { + xxx_messageInfo_RealServer_Key.Merge(m, src) +} +func (m *RealServer_Key) XXX_Size() int { + return xxx_messageInfo_RealServer_Key.Size(m) +} +func (m *RealServer_Key) XXX_DiscardUnknown() { + xxx_messageInfo_RealServer_Key.DiscardUnknown(m) } -func (m *RealServer_Key) Reset() { *m = RealServer_Key{} } -func (m *RealServer_Key) String() string { return proto.CompactTextString(m) } -func (*RealServer_Key) ProtoMessage() {} -func (*RealServer_Key) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } +var xxx_messageInfo_RealServer_Key proto.InternalMessageInfo func (m *RealServer_Key) GetIp() string { if m != nil { @@ -249,16 +364,39 @@ func (m *RealServer_Key) GetPort() uint32 { } type RealServer_Config struct { - Weight *google_protobuf1.UInt32Value `protobuf:"bytes,1,opt,name=weight" json:"weight,omitempty"` - Forward ForwardMethod `protobuf:"varint,2,opt,name=forward,enum=types.ForwardMethod" json:"forward,omitempty"` + Weight *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=weight,proto3" json:"weight,omitempty"` + Forward ForwardMethod `protobuf:"varint,2,opt,name=forward,proto3,enum=types.ForwardMethod" json:"forward,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RealServer_Config) Reset() { *m = RealServer_Config{} } +func (m *RealServer_Config) String() string { return proto.CompactTextString(m) } +func (*RealServer_Config) ProtoMessage() {} +func (*RealServer_Config) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{1, 1} +} + +func (m *RealServer_Config) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RealServer_Config.Unmarshal(m, b) +} +func (m *RealServer_Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RealServer_Config.Marshal(b, m, deterministic) +} +func (m *RealServer_Config) XXX_Merge(src proto.Message) { + xxx_messageInfo_RealServer_Config.Merge(m, src) +} +func (m *RealServer_Config) XXX_Size() int { + return xxx_messageInfo_RealServer_Config.Size(m) +} +func (m *RealServer_Config) XXX_DiscardUnknown() { + xxx_messageInfo_RealServer_Config.DiscardUnknown(m) } -func (m *RealServer_Config) Reset() { *m = RealServer_Config{} } -func (m *RealServer_Config) String() string { return proto.CompactTextString(m) } -func (*RealServer_Config) ProtoMessage() {} -func (*RealServer_Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} } +var xxx_messageInfo_RealServer_Config proto.InternalMessageInfo -func (m *RealServer_Config) GetWeight() *google_protobuf1.UInt32Value { +func (m *RealServer_Config) GetWeight() *wrappers.UInt32Value { if m != nil { return m.Weight } @@ -275,33 +413,56 @@ func (m *RealServer_Config) GetForward() ForwardMethod { type RealServer_HealthCheck struct { // Endpoint should be a valid url, expected format is ://:/, e.g. http://:80/health. // Set to an empty string to disable health check. - Endpoint *google_protobuf1.StringValue `protobuf:"bytes,1,opt,name=endpoint" json:"endpoint,omitempty"` - Period *google_protobuf2.Duration `protobuf:"bytes,2,opt,name=period" json:"period,omitempty"` - Timeout *google_protobuf2.Duration `protobuf:"bytes,3,opt,name=timeout" json:"timeout,omitempty"` - UpThreshold uint32 `protobuf:"varint,4,opt,name=up_threshold,json=upThreshold" json:"up_threshold,omitempty"` - DownThreshold uint32 `protobuf:"varint,5,opt,name=down_threshold,json=downThreshold" json:"down_threshold,omitempty"` + Endpoint *wrappers.StringValue `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"` + Period *duration.Duration `protobuf:"bytes,2,opt,name=period,proto3" json:"period,omitempty"` + Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + UpThreshold uint32 `protobuf:"varint,4,opt,name=up_threshold,json=upThreshold,proto3" json:"up_threshold,omitempty"` + DownThreshold uint32 `protobuf:"varint,5,opt,name=down_threshold,json=downThreshold,proto3" json:"down_threshold,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RealServer_HealthCheck) Reset() { *m = RealServer_HealthCheck{} } -func (m *RealServer_HealthCheck) String() string { return proto.CompactTextString(m) } -func (*RealServer_HealthCheck) ProtoMessage() {} -func (*RealServer_HealthCheck) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 2} } +func (m *RealServer_HealthCheck) Reset() { *m = RealServer_HealthCheck{} } +func (m *RealServer_HealthCheck) String() string { return proto.CompactTextString(m) } +func (*RealServer_HealthCheck) ProtoMessage() {} +func (*RealServer_HealthCheck) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{1, 2} +} -func (m *RealServer_HealthCheck) GetEndpoint() *google_protobuf1.StringValue { +func (m *RealServer_HealthCheck) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RealServer_HealthCheck.Unmarshal(m, b) +} +func (m *RealServer_HealthCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RealServer_HealthCheck.Marshal(b, m, deterministic) +} +func (m *RealServer_HealthCheck) XXX_Merge(src proto.Message) { + xxx_messageInfo_RealServer_HealthCheck.Merge(m, src) +} +func (m *RealServer_HealthCheck) XXX_Size() int { + return xxx_messageInfo_RealServer_HealthCheck.Size(m) +} +func (m *RealServer_HealthCheck) XXX_DiscardUnknown() { + xxx_messageInfo_RealServer_HealthCheck.DiscardUnknown(m) +} + +var xxx_messageInfo_RealServer_HealthCheck proto.InternalMessageInfo + +func (m *RealServer_HealthCheck) GetEndpoint() *wrappers.StringValue { if m != nil { return m.Endpoint } return nil } -func (m *RealServer_HealthCheck) GetPeriod() *google_protobuf2.Duration { +func (m *RealServer_HealthCheck) GetPeriod() *duration.Duration { if m != nil { return m.Period } return nil } -func (m *RealServer_HealthCheck) GetTimeout() *google_protobuf2.Duration { +func (m *RealServer_HealthCheck) GetTimeout() *duration.Duration { if m != nil { return m.Timeout } @@ -323,13 +484,36 @@ func (m *RealServer_HealthCheck) GetDownThreshold() uint32 { } type ListResponse struct { - Items []*ListResponse_Item `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"` + Items []*ListResponse_Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListResponse) Reset() { *m = ListResponse{} } +func (m *ListResponse) String() string { return proto.CompactTextString(m) } +func (*ListResponse) ProtoMessage() {} +func (*ListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{2} +} + +func (m *ListResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListResponse.Unmarshal(m, b) +} +func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic) +} +func (m *ListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListResponse.Merge(m, src) +} +func (m *ListResponse) XXX_Size() int { + return xxx_messageInfo_ListResponse.Size(m) +} +func (m *ListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListResponse.DiscardUnknown(m) } -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (m *ListResponse) String() string { return proto.CompactTextString(m) } -func (*ListResponse) ProtoMessage() {} -func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_ListResponse proto.InternalMessageInfo func (m *ListResponse) GetItems() []*ListResponse_Item { if m != nil { @@ -339,14 +523,37 @@ func (m *ListResponse) GetItems() []*ListResponse_Item { } type ListResponse_Item struct { - Service *VirtualService `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` - Servers []*RealServer `protobuf:"bytes,2,rep,name=servers" json:"servers,omitempty"` + Service *VirtualService `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + Servers []*RealServer `protobuf:"bytes,2,rep,name=servers,proto3" json:"servers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListResponse_Item) Reset() { *m = ListResponse_Item{} } +func (m *ListResponse_Item) String() string { return proto.CompactTextString(m) } +func (*ListResponse_Item) ProtoMessage() {} +func (*ListResponse_Item) Descriptor() ([]byte, []int) { + return fileDescriptor_2c0f90c600ad7e2e, []int{2, 0} } -func (m *ListResponse_Item) Reset() { *m = ListResponse_Item{} } -func (m *ListResponse_Item) String() string { return proto.CompactTextString(m) } -func (*ListResponse_Item) ProtoMessage() {} -func (*ListResponse_Item) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } +func (m *ListResponse_Item) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListResponse_Item.Unmarshal(m, b) +} +func (m *ListResponse_Item) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListResponse_Item.Marshal(b, m, deterministic) +} +func (m *ListResponse_Item) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListResponse_Item.Merge(m, src) +} +func (m *ListResponse_Item) XXX_Size() int { + return xxx_messageInfo_ListResponse_Item.Size(m) +} +func (m *ListResponse_Item) XXX_DiscardUnknown() { + xxx_messageInfo_ListResponse_Item.DiscardUnknown(m) +} + +var xxx_messageInfo_ListResponse_Item proto.InternalMessageInfo func (m *ListResponse_Item) GetService() *VirtualService { if m != nil { @@ -363,6 +570,8 @@ func (m *ListResponse_Item) GetServers() []*RealServer { } func init() { + proto.RegisterEnum("types.Protocol", Protocol_name, Protocol_value) + proto.RegisterEnum("types.ForwardMethod", ForwardMethod_name, ForwardMethod_value) proto.RegisterType((*VirtualService)(nil), "types.VirtualService") proto.RegisterType((*VirtualService_Key)(nil), "types.VirtualService.Key") proto.RegisterType((*VirtualService_Config)(nil), "types.VirtualService.Config") @@ -372,8 +581,59 @@ func init() { proto.RegisterType((*RealServer_HealthCheck)(nil), "types.RealServer.HealthCheck") proto.RegisterType((*ListResponse)(nil), "types.ListResponse") proto.RegisterType((*ListResponse_Item)(nil), "types.ListResponse.Item") - proto.RegisterEnum("types.Protocol", Protocol_name, Protocol_value) - proto.RegisterEnum("types.ForwardMethod", ForwardMethod_name, ForwardMethod_value) +} + +func init() { proto.RegisterFile("types/types.proto", fileDescriptor_2c0f90c600ad7e2e) } + +var fileDescriptor_2c0f90c600ad7e2e = []byte{ + // 748 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdf, 0x6e, 0xe2, 0x46, + 0x14, 0xc6, 0x63, 0x0c, 0x04, 0x0e, 0x7f, 0xca, 0x4e, 0xb3, 0x95,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x4e, 0x86, + 0xdd, 0xe1, 0x75, 0xe3, 0x84, 0x9c, 0x82, 0x3a, 0xe9, 0x8e, 0x1a, 0x4a, 0xf4, 0x67, 0xda, 0x1b, + 0x35, 0x72, 0xcf, 0x7f, 0x86, 0xda, 0xbd, 0x75, 0x13, 0x0d, 0xce, 0x62, 0xd9, 0x9b, 0x21, 0xfd, + 0xf5, 0x35, 0xed, 0xcd, 0x06, 0xfd, 0xc9, 0xdb, 0x61, 0xaf, 0x71, 0x42, 0xca, 0x50, 0xa0, 0xc3, + 0xe9, 0xa4, 0xdf, 0x50, 0x08, 0x40, 0x71, 0x32, 0xbd, 0xb9, 0xe9, 0x5f, 0x37, 0x72, 0xa4, 0x04, + 0xf9, 0xc1, 0xeb, 0xf1, 0x2f, 0x0d, 0xb5, 0xf3, 0xa7, 0x0a, 0xc5, 0x01, 0x72, 0xd7, 0xf1, 0xc8, + 0x2b, 0xa8, 0x75, 0x39, 0x9a, 0x02, 0xd3, 0x4f, 0xd5, 0xe1, 0x6b, 0xea, 0x9f, 0xec, 0x6d, 0xb1, + 0x1f, 0x7d, 0x32, 0x5b, 0x27, 0x51, 0x86, 0xa9, 0x6f, 0x7d, 0x48, 0x86, 0x9f, 0xa0, 0xd6, 0x43, + 0x17, 0xb3, 0x0c, 0x47, 0xed, 0x79, 0x24, 0xd1, 0x0f, 0x50, 0xcd, 0x2e, 0x83, 0x9c, 0xec, 0x6f, + 0xe0, 0xb8, 0x38, 0xbb, 0xc7, 0xff, 0x10, 0x67, 0x57, 0xf8, 0xaf, 0xe2, 0xef, 0x20, 0x1f, 0xd9, + 0x91, 0x3c, 0x42, 0xe8, 0x1f, 0x1f, 0xf0, 0x6c, 0xeb, 0xe4, 0x7d, 0x51, 0x62, 0x97, 0xff, 0x04, + 0x00, 0x00, 0xff, 0xff, 0x98, 0x68, 0x7c, 0xf2, 0xe7, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -384,16 +644,17 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Merlin service - +// MerlinClient is the client API for Merlin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MerlinClient interface { - CreateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - UpdateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - DeleteService(ctx context.Context, in *google_protobuf1.StringValue, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - CreateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - UpdateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - DeleteServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - List(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ListResponse, error) + CreateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*empty.Empty, error) + UpdateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*empty.Empty, error) + DeleteService(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*empty.Empty, error) + CreateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) + UpdateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) + DeleteServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) + List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListResponse, error) } type merlinClient struct { @@ -404,79 +665,104 @@ func NewMerlinClient(cc *grpc.ClientConn) MerlinClient { return &merlinClient{cc} } -func (c *merlinClient) CreateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/CreateService", in, out, c.cc, opts...) +func (c *merlinClient) CreateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/CreateService", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) UpdateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/UpdateService", in, out, c.cc, opts...) +func (c *merlinClient) UpdateService(ctx context.Context, in *VirtualService, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/UpdateService", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) DeleteService(ctx context.Context, in *google_protobuf1.StringValue, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/DeleteService", in, out, c.cc, opts...) +func (c *merlinClient) DeleteService(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/DeleteService", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) CreateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/CreateServer", in, out, c.cc, opts...) +func (c *merlinClient) CreateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/CreateServer", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) UpdateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/UpdateServer", in, out, c.cc, opts...) +func (c *merlinClient) UpdateServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/UpdateServer", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) DeleteServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { - out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/types.Merlin/DeleteServer", in, out, c.cc, opts...) +func (c *merlinClient) DeleteServer(ctx context.Context, in *RealServer, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/types.Merlin/DeleteServer", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *merlinClient) List(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*ListResponse, error) { +func (c *merlinClient) List(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListResponse, error) { out := new(ListResponse) - err := grpc.Invoke(ctx, "/types.Merlin/List", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/types.Merlin/List", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Merlin service - +// MerlinServer is the server API for Merlin service. type MerlinServer interface { - CreateService(context.Context, *VirtualService) (*google_protobuf.Empty, error) - UpdateService(context.Context, *VirtualService) (*google_protobuf.Empty, error) - DeleteService(context.Context, *google_protobuf1.StringValue) (*google_protobuf.Empty, error) - CreateServer(context.Context, *RealServer) (*google_protobuf.Empty, error) - UpdateServer(context.Context, *RealServer) (*google_protobuf.Empty, error) - DeleteServer(context.Context, *RealServer) (*google_protobuf.Empty, error) - List(context.Context, *google_protobuf.Empty) (*ListResponse, error) + CreateService(context.Context, *VirtualService) (*empty.Empty, error) + UpdateService(context.Context, *VirtualService) (*empty.Empty, error) + DeleteService(context.Context, *wrappers.StringValue) (*empty.Empty, error) + CreateServer(context.Context, *RealServer) (*empty.Empty, error) + UpdateServer(context.Context, *RealServer) (*empty.Empty, error) + DeleteServer(context.Context, *RealServer) (*empty.Empty, error) + List(context.Context, *empty.Empty) (*ListResponse, error) +} + +// UnimplementedMerlinServer can be embedded to have forward compatible implementations. +type UnimplementedMerlinServer struct { +} + +func (*UnimplementedMerlinServer) CreateService(ctx context.Context, req *VirtualService) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateService not implemented") +} +func (*UnimplementedMerlinServer) UpdateService(ctx context.Context, req *VirtualService) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateService not implemented") +} +func (*UnimplementedMerlinServer) DeleteService(ctx context.Context, req *wrappers.StringValue) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteService not implemented") +} +func (*UnimplementedMerlinServer) CreateServer(ctx context.Context, req *RealServer) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateServer not implemented") +} +func (*UnimplementedMerlinServer) UpdateServer(ctx context.Context, req *RealServer) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateServer not implemented") +} +func (*UnimplementedMerlinServer) DeleteServer(ctx context.Context, req *RealServer) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteServer not implemented") +} +func (*UnimplementedMerlinServer) List(ctx context.Context, req *empty.Empty) (*ListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func RegisterMerlinServer(s *grpc.Server, srv MerlinServer) { @@ -520,7 +806,7 @@ func _Merlin_UpdateService_Handler(srv interface{}, ctx context.Context, dec fun } func _Merlin_DeleteService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf1.StringValue) + in := new(wrappers.StringValue) if err := dec(in); err != nil { return nil, err } @@ -532,7 +818,7 @@ func _Merlin_DeleteService_Handler(srv interface{}, ctx context.Context, dec fun FullMethod: "/types.Merlin/DeleteService", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MerlinServer).DeleteService(ctx, req.(*google_protobuf1.StringValue)) + return srv.(MerlinServer).DeleteService(ctx, req.(*wrappers.StringValue)) } return interceptor(ctx, in, info, handler) } @@ -592,7 +878,7 @@ func _Merlin_DeleteServer_Handler(srv interface{}, ctx context.Context, dec func } func _Merlin_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf.Empty) + in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } @@ -604,7 +890,7 @@ func _Merlin_List_Handler(srv interface{}, ctx context.Context, dec func(interfa FullMethod: "/types.Merlin/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MerlinServer).List(ctx, req.(*google_protobuf.Empty)) + return srv.(MerlinServer).List(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } @@ -645,56 +931,3 @@ var _Merlin_serviceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "types/types.proto", } - -func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 748 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdf, 0x6e, 0xe2, 0x46, - 0x14, 0xc6, 0x63, 0x0c, 0x04, 0x0e, 0x7f, 0xca, 0x4e, 0xb3, 0x95, 0xeb, 0x6e, 0x2b, 0x8a, 0x54, - 0x35, 0xdd, 0x48, 0x66, 0x4b, 0xb6, 0x52, 0xa5, 0xf6, 0x62, 0x57, 0xc0, 0x76, 0xd3, 0x0d, 0x81, - 0x0e, 0x90, 0x5e, 0x22, 0x2f, 0x3e, 0x60, 0x2b, 0xc6, 0x63, 0x8d, 0xc7, 0x45, 0x3c, 0x4a, 0xef, - 0xfb, 0x26, 0x7d, 0x8f, 0xbe, 0x47, 0xef, 0x2a, 0x8f, 0x6d, 0x4c, 0x02, 0x41, 0x6d, 0xf7, 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