diff --git a/go.mod b/go.mod index 0f799d01..ebcca172 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,16 @@ module code.cloudfoundry.org/tps -go 1.26 +go 1.26.0 require ( - code.cloudfoundry.org/bbs v0.0.0-20251029140956-4e01df8b0ac1 + code.cloudfoundry.org/bbs v1.3.0 + code.cloudfoundry.org/bbs/models v0.0.0-20260618205254-dc4b9f8d5bc9 code.cloudfoundry.org/clock v1.75.0 - code.cloudfoundry.org/debugserver v0.101.0 + code.cloudfoundry.org/debugserver v0.102.0 code.cloudfoundry.org/diego-logging-client v0.112.0 - code.cloudfoundry.org/lager/v3 v3.73.0 + code.cloudfoundry.org/lager/v3 v3.74.0 code.cloudfoundry.org/localip v0.75.0 - code.cloudfoundry.org/locket v0.1.0 + code.cloudfoundry.org/locket v1.1.0 code.cloudfoundry.org/runtimeschema v0.0.0-20240514235758-31be7684c5bf code.cloudfoundry.org/workpool v0.0.0-20250911194158-1489753f182e github.com/cloudfoundry/dropsonde v1.1.0 @@ -20,11 +21,11 @@ require ( ) require ( - code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20210513172332-4c5ee488a657 // indirect - code.cloudfoundry.org/durationjson v0.76.0 // indirect + code.cloudfoundry.org/cfhttp/v2 v2.82.0 // indirect + code.cloudfoundry.org/durationjson v0.77.0 // indirect code.cloudfoundry.org/go-diodes v0.0.0-20260615142411-472d6bcdb3c6 // indirect code.cloudfoundry.org/go-loggregator/v9 v9.2.1 // indirect - code.cloudfoundry.org/tlsconfig v0.59.0 // indirect + code.cloudfoundry.org/tlsconfig v0.60.0 // indirect filippo.io/edwards25519 v1.2.0 // indirect github.com/Masterminds/semver/v3 v3.5.0 // indirect github.com/bmizerany/pat v0.0.0-20210406213842-e4b6760bdd6f // indirect @@ -41,8 +42,8 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/square/certstrap v1.3.0 // indirect github.com/tedsuo/rata v1.0.0 // indirect - github.com/vito/go-sse v1.0.0 // indirect - go.step.sm/crypto v0.82.0 // indirect + github.com/vito/go-sse v1.1.3 // indirect + go.step.sm/crypto v0.83.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.53.0 // indirect golang.org/x/mod v0.37.0 // indirect @@ -51,7 +52,7 @@ require ( golang.org/x/sys v0.46.0 // indirect golang.org/x/text v0.38.0 // indirect golang.org/x/tools v0.46.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260615183401-62b3387ff324 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3 // indirect google.golang.org/grpc v1.81.1 // indirect google.golang.org/protobuf v1.36.11 // indirect ) diff --git a/go.sum b/go.sum index 28bd6130..3bb07891 100644 --- a/go.sum +++ b/go.sum @@ -592,32 +592,36 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -code.cloudfoundry.org/bbs v0.0.0-20251029140956-4e01df8b0ac1 h1:I8GHH9o33/lZm2lq4qqXYpnPetBmVLMYQL7Re8oc/DY= -code.cloudfoundry.org/bbs v0.0.0-20251029140956-4e01df8b0ac1/go.mod h1:XKlGVVXFi5EcHHMPzw3xgONK9PeEZuUbIC43XNwxD10= -code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20210513172332-4c5ee488a657 h1:8rnhkeAe8Bnx+8r3unO++S3syBw8P22qPbw3LLFWEoc= -code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20210513172332-4c5ee488a657/go.mod h1:Fwt0o/haXfwgOHMom4AM96pXCVw9EAiIcSsPb8hWK9s= +code.cloudfoundry.org/bbs v1.3.0 h1:2s1NuiqCfDYVIWfZ+Q1B8KVfBZkDpLNZW+6qp4i39uU= +code.cloudfoundry.org/bbs v1.3.0/go.mod h1:UsPjKnObp2ahylweF8B0cWtPuRJAJEfGQwiQ8AslBEE= +code.cloudfoundry.org/bbs/models v0.0.0-20260618205254-dc4b9f8d5bc9 h1:a9ADcSvpkZe80hSa4JHQJy3C+qe+b2LNvuRw9uUz9ew= +code.cloudfoundry.org/bbs/models v0.0.0-20260618205254-dc4b9f8d5bc9/go.mod h1:W3q+deVTv2UDi80ZnpJdIonlV/yg+6vh4A8/FZ/GYAI= +code.cloudfoundry.org/cfhttp/v2 v2.82.0 h1:BVUG+3m1kOFPnJdHRlO29NDDFAHzbvuo+kyLRRnyqMc= +code.cloudfoundry.org/cfhttp/v2 v2.82.0/go.mod h1:plmN3zxVuQfIVhy4j0G3yakQjvxEv8BneS1VMolfMn8= code.cloudfoundry.org/clock v1.75.0 h1:3j+bs2xW5d/MRbzICzzaXYnlWTSczbFXmczPYRrXrtg= code.cloudfoundry.org/clock v1.75.0/go.mod h1:pM1eBumw5K6fXZCY2QhZz7B6qrPz33qus1OM4cd98X8= -code.cloudfoundry.org/debugserver v0.101.0 h1:d40Cfq42MfOuptuJUw3cgn9gVkk7xniTnPADXqbraXg= -code.cloudfoundry.org/debugserver v0.101.0/go.mod h1:zguK9q69fQPdBY41zg1/BwTdlBVSSWxnxqWOqp3gvKU= +code.cloudfoundry.org/debugserver v0.102.0 h1:4gvjQFQjJ8GZtmJ5VZyzpHA3E1VWA3Fg05yWLtpxcfc= +code.cloudfoundry.org/debugserver v0.102.0/go.mod h1:/7/tR0/w4DCO/yzcXhGq4vQ3l5PjzZtLxx3b+qRnTiw= +code.cloudfoundry.org/diego-db-helpers v0.3.0 h1:LPVZ47sOr4e3MLbTUbBX7pTDWhP2XWIvT7EUlYW729A= +code.cloudfoundry.org/diego-db-helpers v0.3.0/go.mod h1:eFhaHV7SOqZWV+lV9ZSjPTXfq3AO3e55lsAnfKvUozg= code.cloudfoundry.org/diego-logging-client v0.112.0 h1:fDhCXXvxrmnGX0nhyLq/RAyg4vwowu6AdMUk4yG4r28= code.cloudfoundry.org/diego-logging-client v0.112.0/go.mod h1:6U9byQeSUB4RPJ7Kl+uueZHI0EEpKw2SvrJg1u/akB8= -code.cloudfoundry.org/durationjson v0.76.0 h1:qDz92nsNbYG4pjE2svcD6bgXUi73JnoymbuzmG9s254= -code.cloudfoundry.org/durationjson v0.76.0/go.mod h1:Rv8egevccRCjacdnoYZ72ycsxYlF0kfb8GoSAKV0RBE= +code.cloudfoundry.org/durationjson v0.77.0 h1:zuc+ErAZLAkgxfokX+UUj+fCv7BsHA8c/C+PkL97dMQ= +code.cloudfoundry.org/durationjson v0.77.0/go.mod h1:caSqCDeaMprtHaZbQVLi4bCErrkpmtyZHb078UP2taw= code.cloudfoundry.org/go-diodes v0.0.0-20260615142411-472d6bcdb3c6 h1:qx0MWo0/qbKFBGgrmxJ8WonNkHBAY7NgLd7JBMryC3o= code.cloudfoundry.org/go-diodes v0.0.0-20260615142411-472d6bcdb3c6/go.mod h1:YkoAN1rki1xahGvAkpa36KvoEbLSXmM6Eh3iZZuRLaE= code.cloudfoundry.org/go-loggregator/v9 v9.2.1 h1:S6Lgg5UJbhh2bt2TGQxs6R00CF8PrUA3GFPYDxy56Fk= code.cloudfoundry.org/go-loggregator/v9 v9.2.1/go.mod h1:FTFFruqGeOhVCDFvyLgl8EV8YW63NNwRzLhxJcporu8= -code.cloudfoundry.org/lager/v3 v3.73.0 h1:yNn39cqgoCMAzc/Vh4uMtfP1x+loXt8b7CjyXCrYx14= -code.cloudfoundry.org/lager/v3 v3.73.0/go.mod h1:iQ1VKsduqY7PtaNaso+HbOTsAdBvKM+0AuZZSP7TagM= +code.cloudfoundry.org/lager/v3 v3.74.0 h1:gRJj1CAI4hjfPYmynLKADvVTnlIbAz0W+YGRQqPQuRs= +code.cloudfoundry.org/lager/v3 v3.74.0/go.mod h1:LXtRzpY16oMUJ46zxyRgB/touvG7Ltklt1tWbV4VwzI= code.cloudfoundry.org/localip v0.75.0 h1:GxzG5KnakrBE3NFbbPw2ymzJ8iyVol0aAoS/b5g0bAE= code.cloudfoundry.org/localip v0.75.0/go.mod h1:6V/acPHCL+JR6b7oqSqE7oTJhwjb0Fu+ucQw+OEVfx4= -code.cloudfoundry.org/locket v0.1.0 h1:m/rClHRORvlmbbhGNsAx3Tq+4ZDqrfRrgTRqnCzXI5s= -code.cloudfoundry.org/locket v0.1.0/go.mod h1:WK2FjCWfxxPtlHkeLwzTLvDTB/////GdeiCVbENklvc= +code.cloudfoundry.org/locket v1.1.0 h1:UW1NmuPzDHNNOuYnZ0tyLanL7aQHXnto1Ej3BCp7uS4= +code.cloudfoundry.org/locket v1.1.0/go.mod h1:uHOC1u/FKBvYHW0wTzFjI3WT85O2jGxz1I4+2nrjWLk= code.cloudfoundry.org/runtimeschema v0.0.0-20240514235758-31be7684c5bf h1:sTpfHaU+tgDeRO/fRnyr91gvf1FaJk3ZNiJHiHq4nko= code.cloudfoundry.org/runtimeschema v0.0.0-20240514235758-31be7684c5bf/go.mod h1:Cbw66uMLAXkeK8ZpcTUIJ9nhXNxaN742q1xS/ONrWiQ= -code.cloudfoundry.org/tlsconfig v0.59.0 h1:zD2oBLa3ErABQ0RO6ybO9U1mRoJ/G20mFy8KGu63/r0= -code.cloudfoundry.org/tlsconfig v0.59.0/go.mod h1:uqmfc1HZV9ydxOzhsCtMEsKl1mG0BlZxAheyXz3tUcY= +code.cloudfoundry.org/tlsconfig v0.60.0 h1:bB+VlWZ1Y3RTHJBNMnUx0pnkSN0DrzmJI3A0g1YSnVw= +code.cloudfoundry.org/tlsconfig v0.60.0/go.mod h1:twyxlqwOBbnU5uMc+GoS04cNuJvG7uXHC+gNAIkk81s= code.cloudfoundry.org/workpool v0.0.0-20250911194158-1489753f182e h1:NsULHptleEmqtoC8j6A8J636L9APnGn8YC0c7vocLww= code.cloudfoundry.org/workpool v0.0.0-20250911194158-1489753f182e/go.mod h1:O9HdfntfyDvYRH9nh03XdpnGMbjyZVi8nb2Kh+6hDho= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -909,8 +913,6 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= @@ -929,8 +931,6 @@ github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxe github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM= github.com/onsi/ginkgo/v2 v2.31.0 h1:GtuJos5DFUV9EerYJo8RhYxosYNGvOdDE5haKq6Grfs= github.com/onsi/ginkgo/v2 v2.31.0/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -1004,8 +1004,8 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/vito/go-sse v1.0.0 h1:e6/iTrrvy8BRrOwJwmQmlndlil+TLdxXvHi55ZDzH6M= -github.com/vito/go-sse v1.0.0/go.mod h1:2wkcaQ+jtlZ94Uve8gYZjFpL68luAjssTINA2hpgcZs= +github.com/vito/go-sse v1.1.3 h1:tZOiC+xKmuRPoySTupO6liK7ciSX0B2NKXha5hEtUAE= +github.com/vito/go-sse v1.1.3/go.mod h1:kMjgO+XCwBS0se2X/aS5T4aLBvHWAKOUqZOqXKdyrAg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1038,8 +1038,8 @@ go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLh go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.step.sm/crypto v0.82.0 h1:JOT8b/7Jh4My3mxE4U7UkuaN2sUGkZ8fnjznXaTGoRE= -go.step.sm/crypto v0.82.0/go.mod h1:qyLTv666WJ6ImFPUjljux+684Y/GGYUjAZcKCnc6yBs= +go.step.sm/crypto v0.83.0 h1:llCPEiL2f+kUPY+CUJrOCsuSBoJZ2qooFG9EqGast6w= +go.step.sm/crypto v0.83.0/go.mod h1:qyLTv666WJ6ImFPUjljux+684Y/GGYUjAZcKCnc6yBs= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -1636,8 +1636,8 @@ google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260615183401-62b3387ff324 h1:9HZDLIdYBJXAnaFOr9WHrKVycfpY+75s9HGadC0305A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260615183401-62b3387ff324/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3 h1:phvBWCAQMGN1945mp5fjCXP6jEF0+a0+4TjokS4sxNY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1711,7 +1711,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/vendor/code.cloudfoundry.org/bbs/client.go b/vendor/code.cloudfoundry.org/bbs/client.go index c210bdd5..604b3f77 100644 --- a/vendor/code.cloudfoundry.org/bbs/client.go +++ b/vendor/code.cloudfoundry.org/bbs/client.go @@ -140,6 +140,9 @@ type ExternalActualLRPClient interface { // Returns all ActualLRPs matching the given ActualLRPFilter ActualLRPs(lager.Logger, string, models.ActualLRPFilter) ([]*models.ActualLRP, error) + // Returns all ActualLRPs matching the given process GUIDs + ActualLRPsByProcessGuids(logger lager.Logger, traceID string, processGuids []string) ([]*models.ActualLRP, error) + // Returns all ActualLRPGroups matching the given ActualLRPFilter //lint:ignore SA1019 - deprecated function returning deprecated data // Deprecated: use ActualLRPs instead @@ -278,7 +281,7 @@ func newSecureClient(cfg ClientConfig) (InternalClient, error) { return nil, err } if bbsURL.Scheme != "https" { - return nil, errors.New("Expected https URL") + return nil, errors.New("expected https URL") } var clientOpts []tlsconfig.ClientOption @@ -374,6 +377,19 @@ func (c *client) ActualLRPs(logger lager.Logger, traceID string, filter models.A return response.ActualLrps, response.Error.ToError() } +func (c *client) ActualLRPsByProcessGuids(logger lager.Logger, traceID string, processGuids []string) ([]*models.ActualLRP, error) { + request := models.ActualLRPsByProcessGuidsRequest{ + ProcessGuids: processGuids, + } + response := models.ActualLRPsByProcessGuidsResponse{} + err := c.doRequest(logger, traceID, ActualLRPsByProcessGuidsRoute_r0, nil, nil, &request, &response) + if err != nil { + return nil, err + } + + return response.ActualLrps, response.Error.ToError() +} + // Deprecated: use ActualLRPs instead func (c *client) ActualLRPGroups(logger lager.Logger, traceID string, filter models.ActualLRPFilter) ([]*models.ActualLRPGroup, error) { request := models.ActualLRPGroupsRequest{ diff --git a/vendor/code.cloudfoundry.org/bbs/encryption/crypt.go b/vendor/code.cloudfoundry.org/bbs/encryption/crypt.go index 3d70071c..048bfc6a 100644 --- a/vendor/code.cloudfoundry.org/bbs/encryption/crypt.go +++ b/vendor/code.cloudfoundry.org/bbs/encryption/crypt.go @@ -48,13 +48,13 @@ func (c *cryptor) Encrypt(plaintext []byte) (Encrypted, error) { aead, err := cipher.NewGCM(key.Block()) if err != nil { - return Encrypted{}, fmt.Errorf("Unable to create GCM-wrapped cipher: %q", err) + return Encrypted{}, fmt.Errorf("unable to create GCM-wrapped cipher: %q", err) } nonce := make([]byte, aead.NonceSize()) _, err = io.ReadFull(c.prng, nonce) if err != nil { - return Encrypted{}, fmt.Errorf("Unable to generate random nonce: %q", err) + return Encrypted{}, fmt.Errorf("unable to generate random nonce: %q", err) } ciphertext := aead.Seal(nil, nonce, plaintext, nil) @@ -69,7 +69,7 @@ func (d *cryptor) Decrypt(encrypted Encrypted) ([]byte, error) { aead, err := cipher.NewGCM(key.Block()) if err != nil { - return nil, fmt.Errorf("Unable to create GCM-wrapped cipher: %q", err) + return nil, fmt.Errorf("unable to create GCM-wrapped cipher: %q", err) } // #nosec G407 - G407 is incorrectly flagging Decrypt calls that use the nonce provided in the encrypted data. we randomize this for encryption, which is where it matters. https://github.com/securego/gosec/issues/1209 diff --git a/vendor/code.cloudfoundry.org/bbs/encryption/encryption_config.go b/vendor/code.cloudfoundry.org/bbs/encryption/encryption_config.go index 8e8c883a..3121dccb 100644 --- a/vendor/code.cloudfoundry.org/bbs/encryption/encryption_config.go +++ b/vendor/code.cloudfoundry.org/bbs/encryption/encryption_config.go @@ -9,11 +9,11 @@ type EncryptionConfig struct { func (ef *EncryptionConfig) Parse() (Key, []Key, error) { if len(ef.EncryptionKeys) == 0 { - return nil, nil, errors.New("Must have at least one encryption key set") + return nil, nil, errors.New("must have at least one encryption key set") } if len(ef.ActiveKeyLabel) == 0 { - return nil, nil, errors.New("Must select an active encryption key") + return nil, nil, errors.New("must select an active encryption key") } var encryptionKey Key @@ -30,7 +30,7 @@ func (ef *EncryptionConfig) Parse() (Key, []Key, error) { encryptionKey, ok := labelsToKeys[ef.ActiveKeyLabel] if !ok { - return nil, nil, errors.New("The selected active key must be listed on the encryption keys flag") + return nil, nil, errors.New("the selected active key must be listed on the encryption keys flag") } keys := []Key{} diff --git a/vendor/code.cloudfoundry.org/bbs/encryption/key.go b/vendor/code.cloudfoundry.org/bbs/encryption/key.go index 715a6438..c755bb27 100644 --- a/vendor/code.cloudfoundry.org/bbs/encryption/key.go +++ b/vendor/code.cloudfoundry.org/bbs/encryption/key.go @@ -21,7 +21,7 @@ type key struct { func NewKey(label, phrase string) (Key, error) { if label == "" { - return nil, errors.New("A key label is required") + return nil, errors.New("a key label is required") } if len(label) > 127 { diff --git a/vendor/code.cloudfoundry.org/bbs/encryption/key_manager.go b/vendor/code.cloudfoundry.org/bbs/encryption/key_manager.go index 441cc28c..3e670743 100644 --- a/vendor/code.cloudfoundry.org/bbs/encryption/key_manager.go +++ b/vendor/code.cloudfoundry.org/bbs/encryption/key_manager.go @@ -19,7 +19,7 @@ func NewKeyManager(encryptionKey Key, decryptionKeys []Key) (KeyManager, error) for _, key := range decryptionKeys { if existingKey, ok := decryptionKeyMap[key.Label()]; ok && key != existingKey { - return nil, fmt.Errorf("Multiple keys with the same label: %q", key.Label()) + return nil, fmt.Errorf("multiple keys with the same label: %q", key.Label()) } decryptionKeyMap[key.Label()] = key } diff --git a/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_client.go b/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_client.go index cd43ebaf..3d0f5259 100644 --- a/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_client.go +++ b/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_client.go @@ -73,6 +73,21 @@ type FakeClient struct { result1 []*models.ActualLRP result2 error } + ActualLRPsByProcessGuidsStub func(lager.Logger, string, []string) ([]*models.ActualLRP, error) + actualLRPsByProcessGuidsMutex sync.RWMutex + actualLRPsByProcessGuidsArgsForCall []struct { + arg1 lager.Logger + arg2 string + arg3 []string + } + actualLRPsByProcessGuidsReturns struct { + result1 []*models.ActualLRP + result2 error + } + actualLRPsByProcessGuidsReturnsOnCall map[int]struct { + result1 []*models.ActualLRP + result2 error + } CancelTaskStub func(lager.Logger, string, string) error cancelTaskMutex sync.RWMutex cancelTaskArgsForCall []struct { @@ -719,6 +734,77 @@ func (fake *FakeClient) ActualLRPsReturnsOnCall(i int, result1 []*models.ActualL }{result1, result2} } +func (fake *FakeClient) ActualLRPsByProcessGuids(arg1 lager.Logger, arg2 string, arg3 []string) ([]*models.ActualLRP, error) { + var arg3Copy []string + if arg3 != nil { + arg3Copy = make([]string, len(arg3)) + copy(arg3Copy, arg3) + } + fake.actualLRPsByProcessGuidsMutex.Lock() + ret, specificReturn := fake.actualLRPsByProcessGuidsReturnsOnCall[len(fake.actualLRPsByProcessGuidsArgsForCall)] + fake.actualLRPsByProcessGuidsArgsForCall = append(fake.actualLRPsByProcessGuidsArgsForCall, struct { + arg1 lager.Logger + arg2 string + arg3 []string + }{arg1, arg2, arg3Copy}) + stub := fake.ActualLRPsByProcessGuidsStub + fakeReturns := fake.actualLRPsByProcessGuidsReturns + fake.recordInvocation("ActualLRPsByProcessGuids", []interface{}{arg1, arg2, arg3Copy}) + fake.actualLRPsByProcessGuidsMutex.Unlock() + if stub != nil { + return stub(arg1, arg2, arg3) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeClient) ActualLRPsByProcessGuidsCallCount() int { + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() + return len(fake.actualLRPsByProcessGuidsArgsForCall) +} + +func (fake *FakeClient) ActualLRPsByProcessGuidsCalls(stub func(lager.Logger, string, []string) ([]*models.ActualLRP, error)) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = stub +} + +func (fake *FakeClient) ActualLRPsByProcessGuidsArgsForCall(i int) (lager.Logger, string, []string) { + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() + argsForCall := fake.actualLRPsByProcessGuidsArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 +} + +func (fake *FakeClient) ActualLRPsByProcessGuidsReturns(result1 []*models.ActualLRP, result2 error) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = nil + fake.actualLRPsByProcessGuidsReturns = struct { + result1 []*models.ActualLRP + result2 error + }{result1, result2} +} + +func (fake *FakeClient) ActualLRPsByProcessGuidsReturnsOnCall(i int, result1 []*models.ActualLRP, result2 error) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = nil + if fake.actualLRPsByProcessGuidsReturnsOnCall == nil { + fake.actualLRPsByProcessGuidsReturnsOnCall = make(map[int]struct { + result1 []*models.ActualLRP + result2 error + }) + } + fake.actualLRPsByProcessGuidsReturnsOnCall[i] = struct { + result1 []*models.ActualLRP + result2 error + }{result1, result2} +} + func (fake *FakeClient) CancelTask(arg1 lager.Logger, arg2 string, arg3 string) error { fake.cancelTaskMutex.Lock() ret, specificReturn := fake.cancelTaskReturnsOnCall[len(fake.cancelTaskArgsForCall)] @@ -2474,6 +2560,8 @@ func (fake *FakeClient) Invocations() map[string][][]interface{} { defer fake.actualLRPGroupsByProcessGuidMutex.RUnlock() fake.actualLRPsMutex.RLock() defer fake.actualLRPsMutex.RUnlock() + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() fake.cancelTaskMutex.RLock() defer fake.cancelTaskMutex.RUnlock() fake.cellsMutex.RLock() diff --git a/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_internal_client.go b/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_internal_client.go index 0e84d75f..1c9640bd 100644 --- a/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_internal_client.go +++ b/vendor/code.cloudfoundry.org/bbs/fake_bbs/fake_internal_client.go @@ -73,6 +73,21 @@ type FakeInternalClient struct { result1 []*models.ActualLRP result2 error } + ActualLRPsByProcessGuidsStub func(lager.Logger, string, []string) ([]*models.ActualLRP, error) + actualLRPsByProcessGuidsMutex sync.RWMutex + actualLRPsByProcessGuidsArgsForCall []struct { + arg1 lager.Logger + arg2 string + arg3 []string + } + actualLRPsByProcessGuidsReturns struct { + result1 []*models.ActualLRP + result2 error + } + actualLRPsByProcessGuidsReturnsOnCall map[int]struct { + result1 []*models.ActualLRP + result2 error + } CancelTaskStub func(lager.Logger, string, string) error cancelTaskMutex sync.RWMutex cancelTaskArgsForCall []struct { @@ -940,6 +955,77 @@ func (fake *FakeInternalClient) ActualLRPsReturnsOnCall(i int, result1 []*models }{result1, result2} } +func (fake *FakeInternalClient) ActualLRPsByProcessGuids(arg1 lager.Logger, arg2 string, arg3 []string) ([]*models.ActualLRP, error) { + var arg3Copy []string + if arg3 != nil { + arg3Copy = make([]string, len(arg3)) + copy(arg3Copy, arg3) + } + fake.actualLRPsByProcessGuidsMutex.Lock() + ret, specificReturn := fake.actualLRPsByProcessGuidsReturnsOnCall[len(fake.actualLRPsByProcessGuidsArgsForCall)] + fake.actualLRPsByProcessGuidsArgsForCall = append(fake.actualLRPsByProcessGuidsArgsForCall, struct { + arg1 lager.Logger + arg2 string + arg3 []string + }{arg1, arg2, arg3Copy}) + stub := fake.ActualLRPsByProcessGuidsStub + fakeReturns := fake.actualLRPsByProcessGuidsReturns + fake.recordInvocation("ActualLRPsByProcessGuids", []interface{}{arg1, arg2, arg3Copy}) + fake.actualLRPsByProcessGuidsMutex.Unlock() + if stub != nil { + return stub(arg1, arg2, arg3) + } + if specificReturn { + return ret.result1, ret.result2 + } + return fakeReturns.result1, fakeReturns.result2 +} + +func (fake *FakeInternalClient) ActualLRPsByProcessGuidsCallCount() int { + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() + return len(fake.actualLRPsByProcessGuidsArgsForCall) +} + +func (fake *FakeInternalClient) ActualLRPsByProcessGuidsCalls(stub func(lager.Logger, string, []string) ([]*models.ActualLRP, error)) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = stub +} + +func (fake *FakeInternalClient) ActualLRPsByProcessGuidsArgsForCall(i int) (lager.Logger, string, []string) { + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() + argsForCall := fake.actualLRPsByProcessGuidsArgsForCall[i] + return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3 +} + +func (fake *FakeInternalClient) ActualLRPsByProcessGuidsReturns(result1 []*models.ActualLRP, result2 error) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = nil + fake.actualLRPsByProcessGuidsReturns = struct { + result1 []*models.ActualLRP + result2 error + }{result1, result2} +} + +func (fake *FakeInternalClient) ActualLRPsByProcessGuidsReturnsOnCall(i int, result1 []*models.ActualLRP, result2 error) { + fake.actualLRPsByProcessGuidsMutex.Lock() + defer fake.actualLRPsByProcessGuidsMutex.Unlock() + fake.ActualLRPsByProcessGuidsStub = nil + if fake.actualLRPsByProcessGuidsReturnsOnCall == nil { + fake.actualLRPsByProcessGuidsReturnsOnCall = make(map[int]struct { + result1 []*models.ActualLRP + result2 error + }) + } + fake.actualLRPsByProcessGuidsReturnsOnCall[i] = struct { + result1 []*models.ActualLRP + result2 error + }{result1, result2} +} + func (fake *FakeInternalClient) CancelTask(arg1 lager.Logger, arg2 string, arg3 string) error { fake.cancelTaskMutex.Lock() ret, specificReturn := fake.cancelTaskReturnsOnCall[len(fake.cancelTaskArgsForCall)] @@ -3631,6 +3717,8 @@ func (fake *FakeInternalClient) Invocations() map[string][][]interface{} { defer fake.actualLRPGroupsByProcessGuidMutex.RUnlock() fake.actualLRPsMutex.RLock() defer fake.actualLRPsMutex.RUnlock() + fake.actualLRPsByProcessGuidsMutex.RLock() + defer fake.actualLRPsByProcessGuidsMutex.RUnlock() fake.cancelTaskMutex.RLock() defer fake.cancelTaskMutex.RUnlock() fake.cellsMutex.RLock() diff --git a/vendor/code.cloudfoundry.org/bbs/format/encoding.go b/vendor/code.cloudfoundry.org/bbs/format/encoding.go index 37776147..4a5b6ff7 100644 --- a/vendor/code.cloudfoundry.org/bbs/format/encoding.go +++ b/vendor/code.cloudfoundry.org/bbs/format/encoding.go @@ -47,7 +47,7 @@ func (e *encoder) Decode(payload []byte) ([]byte, error) { } return e.decrypt(encrypted) default: - return nil, fmt.Errorf("Unknown encoding: %v", encoding) + return nil, fmt.Errorf("unknown encoding: %v", encoding) } } diff --git a/vendor/code.cloudfoundry.org/bbs/models/LICENSE b/vendor/code.cloudfoundry.org/bbs/models/LICENSE new file mode 100644 index 00000000..f49a4e16 --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.go b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.go index 759a7d62..0e0e731b 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.go +++ b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.go @@ -53,7 +53,22 @@ func NewActualLRPInstanceKey(instanceGuid string, cellId string) ActualLRPInstan } func NewActualLRPNetInfo(address string, instanceAddress string, preferredAddress ActualLRPNetInfo_PreferredAddress, ports ...*PortMapping) ActualLRPNetInfo { - return ActualLRPNetInfo{address, ports, instanceAddress, preferredAddress} + return ActualLRPNetInfo{ + Address: address, + Ports: ports, + InstanceAddress: instanceAddress, + PreferredAddress: preferredAddress, + } +} + +func NewActualLRPNetInfoWithIPv6(address, instanceAddress, instanceIPv6Address string, preferredAddress ActualLRPNetInfo_PreferredAddress, ports ...*PortMapping) ActualLRPNetInfo { + return ActualLRPNetInfo{ + Address: address, + Ports: ports, + InstanceAddress: instanceAddress, + PreferredAddress: preferredAddress, + InstanceIpv6Address: instanceIPv6Address, + } } func EmptyActualLRPNetInfo() ActualLRPNetInfo { diff --git a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.pb.go b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.pb.go index e9c46897..2a69b9a8 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.pb.go +++ b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.pb.go @@ -305,10 +305,11 @@ func (m *ActualLRPInstanceKey) GetCellId() string { } type ActualLRPNetInfo struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address"` - Ports []*PortMapping `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports"` - InstanceAddress string `protobuf:"bytes,3,opt,name=instance_address,json=instanceAddress,proto3" json:"instance_address,omitempty"` - PreferredAddress ActualLRPNetInfo_PreferredAddress `protobuf:"varint,4,opt,name=preferred_address,json=preferredAddress,proto3,enum=models.ActualLRPNetInfo_PreferredAddress" json:"preferred_address"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address"` + Ports []*PortMapping `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports"` + InstanceAddress string `protobuf:"bytes,3,opt,name=instance_address,json=instanceAddress,proto3" json:"instance_address,omitempty"` + PreferredAddress ActualLRPNetInfo_PreferredAddress `protobuf:"varint,4,opt,name=preferred_address,json=preferredAddress,proto3,enum=models.ActualLRPNetInfo_PreferredAddress" json:"preferred_address"` + InstanceIpv6Address string `protobuf:"bytes,5,opt,name=instance_ipv6_address,json=instanceIpv6Address,proto3" json:"instance_ipv6_address,omitempty"` } func (m *ActualLRPNetInfo) Reset() { *m = ActualLRPNetInfo{} } @@ -371,6 +372,13 @@ func (m *ActualLRPNetInfo) GetPreferredAddress() ActualLRPNetInfo_PreferredAddre return ActualLRPNetInfo_PreferredAddressUnknown } +func (m *ActualLRPNetInfo) GetInstanceIpv6Address() string { + if m != nil { + return m.InstanceIpv6Address + } + return "" +} + type ActualLRPInternalRoute struct { Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname"` } @@ -585,82 +593,83 @@ func init() { func init() { proto.RegisterFile("actual_lrp.proto", fileDescriptor_25e5e77bfca46c1a) } var fileDescriptor_25e5e77bfca46c1a = []byte{ - // 1187 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x56, 0x4d, 0x6f, 0xdb, 0x46, - 0x13, 0x16, 0xe5, 0xd8, 0x96, 0x46, 0xb2, 0x4c, 0xaf, 0x9d, 0x98, 0xd0, 0x1b, 0x90, 0x8a, 0xf0, - 0x16, 0x75, 0x02, 0xc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0x46, 0x0f, 0xcb, 0x86, 0xd6, 0xfe, - 0xa3, 0x0c, 0xb5, 0x7d, 0xc6, 0xc5, 0x33, 0x12, 0x04, 0xae, 0xdf, 0x47, 0x5f, 0x40, 0xc3, 0x61, - 0xbe, 0x20, 0xae, 0x4f, 0x79, 0x37, 0x60, 0x5c, 0xa8, 0xd8, 0x0b, 0x36, 0x8a, 0x23, 0x6b, 0xe2, - 0x06, 0x2f, 0xe4, 0x67, 0xc9, 0x80, 0xee, 0x40, 0xf5, 0x39, 0x0b, 0x45, 0xe2, 0x55, 0x56, 0x5e, - 0x0b, 0x71, 0x64, 0xbd, 0x07, 0x71, 0x45, 0x6e, 0x95, 0xed, 0x11, 0x18, 0xef, 0xc9, 0x84, 0x17, - 0x76, 0x03, 0xce, 0x5e, 0x8e, 0x12, 0xd7, 0x19, 0xe5, 0x7a, 0x33, 0x8e, 0xac, 0x2b, 0x6d, 0xf0, - 0xf5, 0xfc, 0xe6, 0xd0, 0x0b, 0xf7, 0x25, 0xae, 0x68, 0xbf, 0x82, 0x65, 0x15, 0x6d, 0x82, 0xf1, - 0x9a, 0x62, 0x5c, 0x8d, 0x23, 0xeb, 0x43, 0xd7, 0x58, 0x97, 0x60, 0x91, 0xa7, 0xfd, 0xab, 0x06, - 0xf5, 0xbc, 0x66, 0x4f, 0xe8, 0x08, 0xdd, 0x87, 0x7a, 0xc0, 0x99, 0x43, 0xc3, 0xb0, 0xdb, 0x1f, - 0xba, 0x3d, 0x55, 0x94, 0xaa, 0xad, 0xc7, 0x91, 0x75, 0x09, 0xc7, 0xb5, 0xf4, 0xf4, 0x78, 0xe8, - 0xf6, 0x90, 0x05, 0xb3, 0xae, 0xdf, 0xa3, 0x2f, 0x55, 0x31, 0x66, 0xed, 0x6a, 0x1c, 0x59, 0x09, - 0x80, 0x93, 0x05, 0xb5, 0x61, 0xae, 0xc7, 0x06, 0xc4, 0xf5, 0xd5, 0x37, 0x57, 0x6d, 0x88, 0x23, - 0x2b, 0x45, 0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0x65, 0x6c, 0x6a, 0x7f, 0x8d, - 0x4d, 0xed, 0xd5, 0xd8, 0xd4, 0x2e, 0xc6, 0xa6, 0xf6, 0xcf, 0xd8, 0xd4, 0xfe, 0x1d, 0x9b, 0xa5, - 0x77, 0x63, 0x53, 0xfb, 0xfd, 0xad, 0x59, 0xba, 0x78, 0x6b, 0x96, 0x5e, 0xbf, 0x35, 0x4b, 0xc7, - 0x73, 0xea, 0x7f, 0xce, 0xfd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xf8, 0x7a, 0x0a, 0x4a, - 0x09, 0x00, 0x00, + // 1207 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0xed, 0xd8, 0x96, 0x46, 0xb2, 0x4c, 0xaf, 0x9d, 0x98, 0x50, 0x03, 0x52, 0x11, 0x5a, + 0xd4, 0x09, 0x10, 0xa7, 0x75, 0x82, 0xa0, 0x0d, 0xd0, 0x83, 0xe9, 0xb8, 0xb1, 0x90, 0x44, 0x36, + 0xd6, 0x76, 0x8b, 0xfe, 0x00, 0xea, 0x9a, 0x5a, 0x2b, 0x44, 0x28, 0x2e, 0xb1, 0x5c, 0xb9, 0x51, + 0x4f, 0x3d, 0x16, 0x46, 0x0f, 0x05, 0x7a, 0xf6, 0xbd, 0xcf, 0xd0, 0x27, 0xc8, 0xa1, 0x07, 0x1f, + 0x73, 0x22, 0x1a, 0xe5, 0x52, 0xf0, 0x94, 0x47, 0x28, 0x76, 0xf9, 0x13, 0x5a, 0x4a, 0x4e, 0x3b, + 0xfb, 0xcd, 0xcc, 0x37, 0xc3, 0xd9, 0x99, 0x91, 0x40, 0x27, 0x8e, 0x18, 0x12, 0xaf, 0xeb, 0xf1, + 0x60, 0x23, 0xe0, 0x4c, 0x30, 0x34, 0x3f, 0x60, 0x3d, 0xea, 0x85,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o_PreferredAddress) String() string { @@ -830,6 +839,9 @@ func (this *ActualLRPNetInfo) Equal(that interface{}) bool { if this.PreferredAddress != that1.PreferredAddress { return false } + if this.InstanceIpv6Address != that1.InstanceIpv6Address { + return false + } return true } func (this *ActualLRPInternalRoute) Equal(that interface{}) bool { @@ -1014,7 +1026,7 @@ func (this *ActualLRPNetInfo) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&models.ActualLRPNetInfo{") s = append(s, "Address: "+fmt.Sprintf("%#v", this.Address)+",\n") if this.Ports != nil { @@ -1022,6 +1034,7 @@ func (this *ActualLRPNetInfo) GoString() string { } s = append(s, "InstanceAddress: "+fmt.Sprintf("%#v", this.InstanceAddress)+",\n") s = append(s, "PreferredAddress: "+fmt.Sprintf("%#v", this.PreferredAddress)+",\n") + s = append(s, "InstanceIpv6Address: "+fmt.Sprintf("%#v", this.InstanceIpv6Address)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -1279,6 +1292,13 @@ func (m *ActualLRPNetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.InstanceIpv6Address) > 0 { + i -= len(m.InstanceIpv6Address) + copy(dAtA[i:], m.InstanceIpv6Address) + i = encodeVarintActualLrp(dAtA, i, uint64(len(m.InstanceIpv6Address))) + i-- + dAtA[i] = 0x2a + } if m.PreferredAddress != 0 { i = encodeVarintActualLrp(dAtA, i, uint64(m.PreferredAddress)) i-- @@ -1619,6 +1639,10 @@ func (m *ActualLRPNetInfo) Size() (n int) { if m.PreferredAddress != 0 { n += 1 + sovActualLrp(uint64(m.PreferredAddress)) } + l = len(m.InstanceIpv6Address) + if l > 0 { + n += 1 + l + sovActualLrp(uint64(l)) + } return n } @@ -1771,6 +1795,7 @@ func (this *ActualLRPNetInfo) String() string { `Ports:` + repeatedStringForPorts + `,`, `InstanceAddress:` + fmt.Sprintf("%v", this.InstanceAddress) + `,`, `PreferredAddress:` + fmt.Sprintf("%v", this.PreferredAddress) + `,`, + `InstanceIpv6Address:` + fmt.Sprintf("%v", this.InstanceIpv6Address) + `,`, `}`, }, "") return s @@ -2482,6 +2507,38 @@ func (m *ActualLRPNetInfo) Unmarshal(dAtA []byte) error { break } } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstanceIpv6Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowActualLrp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthActualLrp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthActualLrp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.InstanceIpv6Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipActualLrp(dAtA[iNdEx:]) diff --git a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.proto b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.proto index aa089c96..f4623c32 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.proto +++ b/vendor/code.cloudfoundry.org/bbs/models/actual_lrp.proto @@ -43,6 +43,7 @@ message ActualLRPNetInfo { } PreferredAddress preferred_address = 4 [(gogoproto.jsontag) = "preferred_address"]; + string instance_ipv6_address = 5; } message ActualLRPInternalRoute { diff --git a/vendor/code.cloudfoundry.org/bbs/models/auctioneer_types.go b/vendor/code.cloudfoundry.org/bbs/models/auctioneer_types.go new file mode 100644 index 00000000..1afc576b --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/auctioneer_types.go @@ -0,0 +1,115 @@ +package models + +// Auctioneer types moved here from code.cloudfoundry.org/auctioneer +// to break the bbs <-> auctioneer module cycle. + +import ( + "errors" + + "code.cloudfoundry.org/lager/v3" +) + +// AuctioneerClient is the interface bbs uses to communicate with the auctioneer. +// auctioneer implements this interface. Defined here to break the bbs <-> auctioneer cycle. +// +//go:generate counterfeiter -o fakes/fake_auctioneer_client.go . AuctioneerClient +type AuctioneerClient interface { + RequestLRPAuctions(logger lager.Logger, traceID string, lrpStart []*LRPStartRequest) error + RequestTaskAuctions(logger lager.Logger, traceID string, tasks []*TaskStartRequest) error +} + +type TaskStartRequest struct { + Task SchedulingTask +} + +func NewTaskStartRequest(task SchedulingTask) TaskStartRequest { + return TaskStartRequest{Task: task} +} + +func NewTaskStartRequestFromModel(taskGuid, domain string, taskDef *TaskDefinition) TaskStartRequest { + volumeMounts := []string{} + for _, volumeMount := range taskDef.VolumeMounts { + volumeMounts = append(volumeMounts, volumeMount.Driver) + } + return TaskStartRequest{ + Task: NewSchedulingTask( + taskGuid, + domain, + NewResource(taskDef.MemoryMb, taskDef.DiskMb, taskDef.MaxPids), + NewPlacementConstraint(taskDef.RootFs, taskDef.PlacementTags, volumeMounts), + ), + } +} + +func (t *TaskStartRequest) Validate() error { + switch { + case t.Task.TaskGuid == "": + return errors.New("task guid is empty") + case !t.Task.Resource.Valid(): + return errors.New("resources cannot be less than zero") + case !t.Task.PlacementConstraint.Valid(): + return errors.New("placement constraint cannot be empty") + default: + return nil + } +} + +type LRPStartRequest struct { + ProcessGuid string `json:"process_guid"` + Domain string `json:"domain"` + Indices []int `json:"indices"` + PlacementConstraint + Resource +} + +func NewLRPStartRequest(processGuid, domain string, indices []int, res Resource, pl PlacementConstraint) LRPStartRequest { + return LRPStartRequest{ + ProcessGuid: processGuid, + Domain: domain, + Indices: indices, + Resource: res, + PlacementConstraint: pl, + } +} + +func NewLRPStartRequestFromModel(d *DesiredLRP, indices ...int) LRPStartRequest { + volumeDrivers := []string{} + for _, volumeMount := range d.VolumeMounts { + volumeDrivers = append(volumeDrivers, volumeMount.Driver) + } + + return NewLRPStartRequest( + d.ProcessGuid, + d.Domain, + indices, + NewResource(d.MemoryMb, d.DiskMb, d.MaxPids), + NewPlacementConstraint(d.RootFs, d.PlacementTags, volumeDrivers), + ) +} + +func NewLRPStartRequestFromSchedulingInfo(s *DesiredLRPSchedulingInfo, indices ...int) LRPStartRequest { + return NewLRPStartRequest( + s.ProcessGuid, + s.Domain, + indices, + NewResource(s.MemoryMb, s.DiskMb, s.MaxPids), + NewPlacementConstraint(s.RootFs, s.PlacementTags, s.VolumePlacement.DriverNames), + ) +} + +func (lrpstart *LRPStartRequest) Validate() error { + switch { + case lrpstart.ProcessGuid == "": + return errors.New("process guid is empty") + case lrpstart.Domain == "": + return errors.New("domain is empty") + case len(lrpstart.Indices) == 0: + return errors.New("indices must not be empty") + case !lrpstart.Resource.Valid(): + return errors.New("resources cannot be less than 0") + case !lrpstart.PlacementConstraint.Valid(): + return errors.New("placement constraint cannot be empty") + default: + return nil + } +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/cell_presence.go b/vendor/code.cloudfoundry.org/bbs/models/cell_presence.go index 9c940670..754cbc05 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/cell_presence.go +++ b/vendor/code.cloudfoundry.org/bbs/models/cell_presence.go @@ -1,6 +1,9 @@ package models -import "strings" +import ( + "encoding/json" + "strings" +) type CellSet map[string]*CellPresence @@ -72,18 +75,22 @@ func (cap CellCapacity) Validate() error { func NewCellPresence( cellID, repAddress, repUrl, zone string, capacity CellCapacity, - rootFSProviders, preloadedRootFSes, placementTags, optionalPlacementTags []string, + rootFSProviders, preloadedRootFSes, extraRootFSes, placementTags, optionalPlacementTags []string, + annotations map[string]string, ) CellPresence { var providers []*Provider - var pProviders []string - pProviders = append(pProviders, preloadedRootFSes...) - providers = append(providers, &Provider{PreloadedRootFSScheme, pProviders}) - providers = append(providers, &Provider{PreloadedOCIRootFSScheme, pProviders}) + providers = append(providers, &Provider{PreloadedRootFSScheme, preloadedRootFSes}) + providers = append(providers, &Provider{PreloadedOCIRootFSScheme, preloadedRootFSes}) + providers = append(providers, &Provider{ExtraRootFSScheme, extraRootFSes}) for _, prov := range rootFSProviders { providers = append(providers, &Provider{prov, []string{}}) } + if annotations == nil { + annotations = map[string]string{} + } + return CellPresence{ CellId: cellID, RepAddress: repAddress, @@ -93,6 +100,7 @@ func NewCellPresence( RootfsProviders: providers, PlacementTags: placementTags, OptionalPlacementTags: optionalPlacementTags, + Annotations: annotations, } } @@ -115,6 +123,13 @@ func (c CellPresence) Validate() error { validationError = validationError.Append(err) } + for k, v := range c.Annotations { + if k == "" || v == "" { + validationError = validationError.Append(ErrInvalidField{"annotations"}) + break + } + } + if !validationError.Empty() { return validationError } @@ -151,3 +166,11 @@ func (c *CellPresence) Copy() *CellPresence { newCellPresense := *c return &newCellPresense } + +func (c CellPresence) MarshalJSON() ([]byte, error) { + if c.Annotations == nil { + c.Annotations = map[string]string{} + } + type cellPresenceAlias CellPresence + return json.Marshal(cellPresenceAlias(c)) +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/cells.pb.go b/vendor/code.cloudfoundry.org/bbs/models/cells.pb.go index 36d9d7b7..8e7b149d 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/cells.pb.go +++ b/vendor/code.cloudfoundry.org/bbs/models/cells.pb.go @@ -7,6 +7,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" io "io" math "math" math_bits "math/bits" @@ -85,14 +86,15 @@ func (m *CellCapacity) GetContainers() int32 { } type CellPresence struct { - CellId string `protobuf:"bytes,1,opt,name=cell_id,json=cellId,proto3" json:"cell_id"` - RepAddress string `protobuf:"bytes,2,opt,name=rep_address,json=repAddress,proto3" json:"rep_address"` - Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone"` - Capacity *CellCapacity `protobuf:"bytes,4,opt,name=capacity,proto3" json:"capacity,omitempty"` - RootfsProviders []*Provider `protobuf:"bytes,5,rep,name=rootfs_providers,json=rootfsProviders,proto3" json:"rootfs_provider_list,omitempty"` - PlacementTags []string `protobuf:"bytes,6,rep,name=placement_tags,json=placementTags,proto3" json:"placement_tags,omitempty"` - OptionalPlacementTags []string `protobuf:"bytes,7,rep,name=optional_placement_tags,json=optionalPlacementTags,proto3" json:"optional_placement_tags,omitempty"` - RepUrl string `protobuf:"bytes,8,opt,name=rep_url,json=repUrl,proto3" json:"rep_url"` + CellId string `protobuf:"bytes,1,opt,name=cell_id,json=cellId,proto3" json:"cell_id"` + RepAddress string `protobuf:"bytes,2,opt,name=rep_address,json=repAddress,proto3" json:"rep_address"` + Zone string `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone"` + Capacity *CellCapacity `protobuf:"bytes,4,opt,name=capacity,proto3" json:"capacity,omitempty"` + RootfsProviders []*Provider `protobuf:"bytes,5,rep,name=rootfs_providers,json=rootfsProviders,proto3" json:"rootfs_provider_list,omitempty"` + PlacementTags []string `protobuf:"bytes,6,rep,name=placement_tags,json=placementTags,proto3" json:"placement_tags,omitempty"` + OptionalPlacementTags []string `protobuf:"bytes,7,rep,name=optional_placement_tags,json=optionalPlacementTags,proto3" json:"optional_placement_tags,omitempty"` + RepUrl string `protobuf:"bytes,8,opt,name=rep_url,json=repUrl,proto3" json:"rep_url"` + Annotations map[string]string `protobuf:"bytes,9,rep,name=annotations,proto3" json:"annotations" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *CellPresence) Reset() { *m = CellPresence{} } @@ -183,6 +185,13 @@ func (m *CellPresence) GetRepUrl() string { return "" } +func (m *CellPresence) GetAnnotations() map[string]string { + if m != nil { + return m.Annotations + } + return nil +} + type Provider struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` Properties []string `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties,omitempty"` @@ -288,6 +297,7 @@ func (m *CellsResponse) GetCells() []*CellPresence { func init() { proto.RegisterType((*CellCapacity)(nil), "models.CellCapacity") proto.RegisterType((*CellPresence)(nil), "models.CellPresence") + proto.RegisterMapType((map[string]string)(nil), "models.CellPresence.AnnotationsEntry") proto.RegisterType((*Provider)(nil), "models.Provider") proto.RegisterType((*CellsResponse)(nil), "models.CellsResponse") } @@ -295,42 +305,46 @@ func init() { func init() { proto.RegisterFile("cells.proto", fileDescriptor_842e821272d22ff7) } var fileDescriptor_842e821272d22ff7 = []byte{ - // 548 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x53, 0x4f, 0x6f, 0xd3, 0x30, - 0x14, 0x4f, 0xe8, 0x9a, 0xb5, 0x0e, 0xdd, 0x26, 0x0b, 0x44, 0x35, 0x21, 0xa7, 0x2a, 0x43, 0xaa, - 0x26, 0xe8, 0xa6, 0x81, 0xb8, 0xd3, 0x09, 0x09, 0x0e, 0x93, 0x26, 0x0b, 0xce, 0x21, 0x7f, 0xde, - 0x4a, 0x44, 0x12, 0x5b, 0xb6, 0x8b, 0x54, 0x4e, 0x7c, 0x84, 0x7d, 0x00, 0x3e, 0x00, 0x1f, 0x85, - 0x63, 0x8f, 0x3b, 0x45, 0x34, 0xbd, 0xa0, 0x9c, 0xf6, 0x11, 0x90, 0x9d, 0x66, 0x2b, 0xbd, 0x58, - 0xbf, 0xf7, 0x7b, 0xbf, 0x67, 0x3f, 0xff, 0x9e, 0x8d, 0xdc, 0x08, 0xd2, 0x54, 0x8e, 0xb9, 0x60, - 0x8a, 0x61, 0x27, 0x63, 0x31, 0xa4, 0xf2, 0xf0, 0xe5, 0x34, 0x51, 0x5f, 0x66, 0xe1, 0x38, 0x62, - 0xd9, 0xc9, 0x94, 0x4d, 0xd9, 0x89, 0x49, 0x87, 0xb3, 0x2b, 0x13, 0x99, 0xc0, 0xa0, 0xba, 0xec, - 0xd0, 0x05, 0x21, 0x98, 0xa8, 0x83, 0xe1, 0xb5, 0x8d, 0x1e, 0x9e, 0x43, 0x9a, 0x9e, 0x07, 0x3c, - 0x88, 0x12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0xf6, 0xa2, 0x24, 0xf6, 0x9f, 0x92, - 0xd8, 0x7f, 0x4b, 0x62, 0xdd, 0x96, 0xc4, 0xbe, 0x5e, 0x11, 0x6b, 0xb1, 0x22, 0xd6, 0xcd, 0x8a, - 0x58, 0xa1, 0x63, 0xbe, 0xc6, 0xab, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x12, 0x8c, 0x77, 0x8d, - 0x6d, 0x03, 0x00, 0x00, + // 617 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x53, 0xc1, 0x6a, 0xdb, 0x4c, + 0x10, 0xb6, 0xe2, 0xd8, 0xb1, 0x57, 0xbf, 0x13, 0xb3, 0xe4, 0xa7, 0x26, 0x94, 0xb5, 0x71, 0x13, + 0x30, 0xa1, 0x75, 0x42, 0x5a, 0x4a, 0xe9, 0xa1, 0x10, 0x87, 0x40, 0x7b, 0x08, 0x84, 0xa5, 0x85, + 0xde, 0x54, 0x59, 0x9a, 0xb8, 0x22, 0x92, 0x76, 0xd9, 0x5d, 0x07, 0xdc, 0x53, 0x1f, 0x21, 0x8f, + 0xd1, 0x27, 0xe8, 0x33, 0xf4, 0x98, 0x63, 0x4e, 0xa6, 0x51, 0x2e, 0x45, 0xa7, 0x3c, 0x42, 0xd9, + 0x5d, 0x2b, 0x56, 0x7d, 0x11, 0xf3, 0x7d, 0xf3, 0xcd, 0x6a, 0xe6, 0x9b, 0x5d, 0xe4, 0x06, 0x10, + 0xc7, 0x72, 0xc8, 0x05, 0x53, 0x0c, 0xd7, 0x13, 0x16, 0x42, 0x2c, 0x77, 0x5e, 0x4c, 0x22, 0xf5, + 0x75, 0x3a, 0x1e, 0x06, 0x2c, 0x39, 0x98, 0xb0, 0x09, 0x3b, 0x30, 0xe9, 0xf1, 0xf4, 0xc2, 0x20, + 0x03, 0x4c, 0x64, 0xcb, 0x76, 0x5c, 0x10, 0x82, 0x09, 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 0xb8, 0x60, 0x1c, 0x84, 0x8a, 0x40, 0x5f, 0x15, 0x6d, 0x4a, 0x89, 0xe9, + 0x7f, 0x41, 0x2d, 0x3d, 0x88, 0xa4, 0x20, 0x39, 0x4b, 0x25, 0xe0, 0x67, 0xa8, 0x66, 0x5e, 0x8d, + 0x39, 0xcf, 0x3d, 0x6a, 0x15, 0xe3, 0x9e, 0x6a, 0x92, 0xda, 0x1c, 0xde, 0x47, 0x35, 0xf3, 0x3c, + 0xcd, 0x81, 0x2b, 0xd7, 0xa5, 0xf0, 0x84, 0x5a, 0xc9, 0xe8, 0xd5, 0xcd, 0x1d, 0xa9, 0xdc, 0xde, + 0x91, 0xca, 0xc3, 0x1d, 0x71, 0xbe, 0x67, 0xc4, 0xf9, 0x91, 0x11, 0xe7, 0x57, 0x46, 0x9c, 0x9b, + 0x8c, 0x38, 0xbf, 0x33, 0xe2, 0xfc, 0xc9, 0x48, 0xe5, 0x21, 0x23, 0xce, 0xf5, 0x3d, 0xa9, 0xdc, + 0xdc, 0x93, 0xca, 0xed, 0x3d, 0xa9, 0x8c, 0xeb, 0xe6, 0xd1, 0xbe, 0xfc, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x33, 0xf0, 0xd9, 0x22, 0x07, 0x04, 0x00, 0x00, } func (this *CellCapacity) Equal(that interface{}) bool { @@ -421,6 +435,14 @@ func (this *CellPresence) Equal(that interface{}) bool { if this.RepUrl != that1.RepUrl { return false } + if len(this.Annotations) != len(that1.Annotations) { + return false + } + for i := range this.Annotations { + if this.Annotations[i] != that1.Annotations[i] { + return false + } + } return true } func (this *Provider) Equal(that interface{}) bool { @@ -503,7 +525,7 @@ func (this *CellPresence) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 12) + s := make([]string, 0, 13) s = append(s, "&models.CellPresence{") s = append(s, "CellId: "+fmt.Sprintf("%#v", this.CellId)+",\n") s = append(s, "RepAddress: "+fmt.Sprintf("%#v", this.RepAddress)+",\n") @@ -517,6 +539,19 @@ func (this *CellPresence) GoString() string { s = append(s, "PlacementTags: "+fmt.Sprintf("%#v", this.PlacementTags)+",\n") s = append(s, "OptionalPlacementTags: "+fmt.Sprintf("%#v", this.OptionalPlacementTags)+",\n") s = append(s, "RepUrl: "+fmt.Sprintf("%#v", this.RepUrl)+",\n") + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k, _ := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%#v: %#v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + if this.Annotations != nil { + s = append(s, "Annotations: "+mapStringForAnnotations+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -612,6 +647,25 @@ func (m *CellPresence) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Annotations) > 0 { + for k := range m.Annotations { + v := m.Annotations[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintCells(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintCells(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintCells(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4a + } + } if len(m.RepUrl) > 0 { i -= len(m.RepUrl) copy(dAtA[i:], m.RepUrl) @@ -848,6 +902,14 @@ func (m *CellPresence) Size() (n int) { if l > 0 { n += 1 + l + sovCells(uint64(l)) } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCells(uint64(len(k))) + 1 + len(v) + sovCells(uint64(len(v))) + n += mapEntrySize + 1 + sovCells(uint64(mapEntrySize)) + } + } return n } @@ -916,6 +978,16 @@ func (this *CellPresence) String() string { repeatedStringForRootfsProviders += strings.Replace(f.String(), "Provider", "Provider", 1) + "," } repeatedStringForRootfsProviders += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k, _ := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" s := strings.Join([]string{`&CellPresence{`, `CellId:` + fmt.Sprintf("%v", this.CellId) + `,`, `RepAddress:` + fmt.Sprintf("%v", this.RepAddress) + `,`, @@ -925,6 +997,7 @@ func (this *CellPresence) String() string { `PlacementTags:` + fmt.Sprintf("%v", this.PlacementTags) + `,`, `OptionalPlacementTags:` + fmt.Sprintf("%v", this.OptionalPlacementTags) + `,`, `RepUrl:` + fmt.Sprintf("%v", this.RepUrl) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, `}`, }, "") return s @@ -1362,6 +1435,133 @@ func (m *CellPresence) Unmarshal(dAtA []byte) error { } m.RepUrl = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCells + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCells + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCells + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCells + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCells + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCells + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthCells + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCells + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthCells + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthCells + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipCells(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCells + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCells(dAtA[iNdEx:]) diff --git a/vendor/code.cloudfoundry.org/bbs/models/cells.proto b/vendor/code.cloudfoundry.org/bbs/models/cells.proto index e73a028a..1fd7e742 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/cells.proto +++ b/vendor/code.cloudfoundry.org/bbs/models/cells.proto @@ -20,6 +20,7 @@ message CellPresence { repeated string placement_tags = 6; repeated string optional_placement_tags = 7; string rep_url = 8 [(gogoproto.jsontag) = "rep_url"]; + map annotations = 9 [(gogoproto.jsontag) = "annotations"]; } message Provider { diff --git a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.go b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.go index 7a920ce9..7783d362 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.go +++ b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.go @@ -13,6 +13,7 @@ import ( const PreloadedRootFSScheme = "preloaded" const PreloadedOCIRootFSScheme = "preloaded+layer" +const ExtraRootFSScheme = "extra" const volumeMountedFilesMaxAllowedSize = 1 * 1024 * 1024 // 1MB in bytes @@ -26,6 +27,7 @@ type DesiredLRPChange struct { type DesiredLRPFilter struct { Domain string ProcessGuids []string + AppGuids []string } func PreloadedRootFS(stack string) string { @@ -35,7 +37,7 @@ func PreloadedRootFS(stack string) string { }).String() } -func NewDesiredLRP(schedInfo DesiredLRPSchedulingInfo, runInfo DesiredLRPRunInfo, metricTags map[string]*MetricTagValue) DesiredLRP { +func NewDesiredLRP(schedInfo DesiredLRPSchedulingInfo, runInfo DesiredLRPRunInfo, metricTags map[string]*MetricTagValue, updateStrategy DesiredLRP_UpdateStrategy) DesiredLRP { environmentVariables := make([]*EnvironmentVariable, len(runInfo.EnvironmentVariables)) for i := range runInfo.EnvironmentVariables { environmentVariables[i] = &runInfo.EnvironmentVariables[i] @@ -87,6 +89,7 @@ func NewDesiredLRP(schedInfo DesiredLRPSchedulingInfo, runInfo DesiredLRPRunInfo Sidecars: runInfo.Sidecars, LogRateLimit: runInfo.LogRateLimit, VolumeMountedFiles: volumeMountedFiles, + UpdateStrategy: updateStrategy, } } @@ -426,6 +429,16 @@ func (desired *DesiredLRPUpdate) Validate() error { validationError = validationError.Append(err) } + // Validate that image_username and image_password are provided together + usernameExists := desired.ImageUsernameExists() + passwordExists := desired.ImagePasswordExists() + if usernameExists && !passwordExists { + validationError = validationError.Append(ErrInvalidField{"image_password"}) + } + if !usernameExists && passwordExists { + validationError = validationError.Append(ErrInvalidField{"image_username"}) + } + return validationError.ToError() } @@ -492,11 +505,53 @@ func (desired DesiredLRPUpdate) IsMetricTagsUpdated(existingTags map[string]*Met return false } +func (desired *DesiredLRPUpdate) SetImageUsername(imageUsername string) { + desired.OptionalImageUsername = &DesiredLRPUpdate_ImageUsername{ + ImageUsername: imageUsername, + } +} + +func (desired DesiredLRPUpdate) ImageUsernameExists() bool { + _, ok := desired.GetOptionalImageUsername().(*DesiredLRPUpdate_ImageUsername) + return ok +} + +func (desired *DesiredLRPUpdate) SetImagePassword(imagePassword string) { + desired.OptionalImagePassword = &DesiredLRPUpdate_ImagePassword{ + ImagePassword: imagePassword, + } +} + +func (desired DesiredLRPUpdate) ImagePasswordExists() bool { + _, ok := desired.GetOptionalImagePassword().(*DesiredLRPUpdate_ImagePassword) + return ok +} + +func (desired DesiredLRPUpdate) IsImageCredentialsUpdated(existingLRP *DesiredLRP) bool { + updateUsername := desired.ImageUsernameExists() + updatePassword := desired.ImagePasswordExists() + + if !updateUsername && !updatePassword { + return false + } + + existingUsername := existingLRP.GetImageUsername() + existingPassword := existingLRP.GetImagePassword() + + if updateUsername && updatePassword { + return desired.GetImageUsername() != existingUsername || desired.GetImagePassword() != existingPassword + } + + return false +} + type internalDesiredLRPUpdate struct { - Instances *int32 `json:"instances,omitempty"` - Routes *Routes `json:"routes,omitempty"` - Annotation *string `json:"annotation,omitempty"` - MetricTags map[string]*MetricTagValue `json:"metric_tags,omitempty"` + Instances *int32 `json:"instances,omitempty"` + Routes *Routes `json:"routes,omitempty"` + Annotation *string `json:"annotation,omitempty"` + MetricTags map[string]*MetricTagValue `json:"metric_tags,omitempty"` + ImageUsername *string `json:"image_username,omitempty"` + ImagePassword *string `json:"image_password,omitempty"` } func (desired *DesiredLRPUpdate) UnmarshalJSON(data []byte) error { @@ -513,6 +568,12 @@ func (desired *DesiredLRPUpdate) UnmarshalJSON(data []byte) error { desired.SetAnnotation(*update.Annotation) } desired.MetricTags = update.MetricTags + if update.ImageUsername != nil { + desired.SetImageUsername(*update.ImageUsername) + } + if update.ImagePassword != nil { + desired.SetImagePassword(*update.ImagePassword) + } return nil } @@ -529,6 +590,14 @@ func (desired DesiredLRPUpdate) MarshalJSON() ([]byte, error) { update.Annotation = &a } update.MetricTags = desired.MetricTags + if desired.ImageUsernameExists() { + username := desired.GetImageUsername() + update.ImageUsername = &username + } + if desired.ImagePasswordExists() { + password := desired.GetImagePassword() + update.ImagePassword = &password + } return json.Marshal(update) } diff --git a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.pb.go b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.pb.go index 123c9d8e..4b98d9bd 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.pb.go +++ b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.pb.go @@ -13,6 +13,7 @@ import ( math "math" math_bits "math/bits" reflect "reflect" + strconv "strconv" strings "strings" ) @@ -27,6 +28,27 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type DesiredLRP_UpdateStrategy int32 + +const ( + DesiredLRP_UpdateStrategyRolling DesiredLRP_UpdateStrategy = 0 + DesiredLRP_UpdateStrategyRecreate DesiredLRP_UpdateStrategy = 1 +) + +var DesiredLRP_UpdateStrategy_name = map[int32]string{ + 0: "ROLLING", + 1: "RECREATE", +} + +var DesiredLRP_UpdateStrategy_value = map[string]int32{ + "ROLLING": 0, + "RECREATE": 1, +} + +func (DesiredLRP_UpdateStrategy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f592e9299b63d68c, []int{6, 0} +} + type DesiredLRPSchedulingInfo struct { DesiredLRPKey `protobuf:"bytes,1,opt,name=desired_lrp_key,json=desiredLrpKey,proto3,embedded=desired_lrp_key" json:""` Annotation string `protobuf:"bytes,2,opt,name=annotation,proto3" json:"annotation"` @@ -409,6 +431,14 @@ type DesiredLRPUpdate struct { // *DesiredLRPUpdate_Annotation OptionalAnnotation isDesiredLRPUpdate_OptionalAnnotation `protobuf_oneof:"optional_annotation"` MetricTags map[string]*MetricTagValue `protobuf:"bytes,4,rep,name=metric_tags,json=metricTags,proto3" json:"metric_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Types that are valid to be assigned to OptionalImageUsername: + // + // *DesiredLRPUpdate_ImageUsername + OptionalImageUsername isDesiredLRPUpdate_OptionalImageUsername `protobuf_oneof:"optional_image_username"` + // Types that are valid to be assigned to OptionalImagePassword: + // + // *DesiredLRPUpdate_ImagePassword + OptionalImagePassword isDesiredLRPUpdate_OptionalImagePassword `protobuf_oneof:"optional_image_password"` } func (m *DesiredLRPUpdate) Reset() { *m = DesiredLRPUpdate{} } @@ -455,6 +485,18 @@ type isDesiredLRPUpdate_OptionalAnnotation interface { MarshalTo([]byte) (int, error) Size() int } +type isDesiredLRPUpdate_OptionalImageUsername interface { + isDesiredLRPUpdate_OptionalImageUsername() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} +type isDesiredLRPUpdate_OptionalImagePassword interface { + isDesiredLRPUpdate_OptionalImagePassword() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} type DesiredLRPUpdate_Instances struct { Instances int32 `protobuf:"varint,1,opt,name=instances,proto3,oneof" json:"instances,omitempty"` @@ -462,9 +504,17 @@ type DesiredLRPUpdate_Instances struct { type DesiredLRPUpdate_Annotation struct { Annotation string `protobuf:"bytes,3,opt,name=annotation,proto3,oneof" json:"annotation,omitempty"` } +type DesiredLRPUpdate_ImageUsername struct { + ImageUsername string `protobuf:"bytes,5,opt,name=image_username,json=imageUsername,proto3,oneof" json:"image_username,omitempty"` +} +type DesiredLRPUpdate_ImagePassword struct { + ImagePassword string `protobuf:"bytes,6,opt,name=image_password,json=imagePassword,proto3,oneof" json:"image_password,omitempty"` +} -func (*DesiredLRPUpdate_Instances) isDesiredLRPUpdate_OptionalInstances() {} -func (*DesiredLRPUpdate_Annotation) isDesiredLRPUpdate_OptionalAnnotation() {} +func (*DesiredLRPUpdate_Instances) isDesiredLRPUpdate_OptionalInstances() {} +func (*DesiredLRPUpdate_Annotation) isDesiredLRPUpdate_OptionalAnnotation() {} +func (*DesiredLRPUpdate_ImageUsername) isDesiredLRPUpdate_OptionalImageUsername() {} +func (*DesiredLRPUpdate_ImagePassword) isDesiredLRPUpdate_OptionalImagePassword() {} func (m *DesiredLRPUpdate) GetOptionalInstances() isDesiredLRPUpdate_OptionalInstances { if m != nil { @@ -478,6 +528,18 @@ func (m *DesiredLRPUpdate) GetOptionalAnnotation() isDesiredLRPUpdate_OptionalAn } return nil } +func (m *DesiredLRPUpdate) GetOptionalImageUsername() isDesiredLRPUpdate_OptionalImageUsername { + if m != nil { + return m.OptionalImageUsername + } + return nil +} +func (m *DesiredLRPUpdate) GetOptionalImagePassword() isDesiredLRPUpdate_OptionalImagePassword { + if m != nil { + return m.OptionalImagePassword + } + return nil +} func (m *DesiredLRPUpdate) GetInstances() int32 { if x, ok := m.GetOptionalInstances().(*DesiredLRPUpdate_Instances); ok { @@ -500,11 +562,27 @@ func (m *DesiredLRPUpdate) GetMetricTags() map[string]*MetricTagValue { return nil } +func (m *DesiredLRPUpdate) GetImageUsername() string { + if x, ok := m.GetOptionalImageUsername().(*DesiredLRPUpdate_ImageUsername); ok { + return x.ImageUsername + } + return "" +} + +func (m *DesiredLRPUpdate) GetImagePassword() string { + if x, ok := m.GetOptionalImagePassword().(*DesiredLRPUpdate_ImagePassword); ok { + return x.ImagePassword + } + return "" +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*DesiredLRPUpdate) XXX_OneofWrappers() []interface{} { return []interface{}{ (*DesiredLRPUpdate_Instances)(nil), (*DesiredLRPUpdate_Annotation)(nil), + (*DesiredLRPUpdate_ImageUsername)(nil), + (*DesiredLRPUpdate_ImagePassword)(nil), } } @@ -673,6 +751,7 @@ type DesiredLRP struct { Sidecars []*Sidecar `protobuf:"bytes,36,rep,name=sidecars,proto3" json:"sidecars,omitempty"` LogRateLimit *LogRateLimit `protobuf:"bytes,37,opt,name=log_rate_limit,json=logRateLimit,proto3" json:"log_rate_limit,omitempty"` VolumeMountedFiles []*File `protobuf:"bytes,38,rep,name=volume_mounted_files,json=volumeMountedFiles,proto3" json:"volume_mounted_files"` + UpdateStrategy DesiredLRP_UpdateStrategy `protobuf:"varint,39,opt,name=update_strategy,json=updateStrategy,proto3,enum=models.DesiredLRP_UpdateStrategy" json:"update_strategy"` } func (m *DesiredLRP) Reset() { *m = DesiredLRP{} } @@ -969,7 +1048,15 @@ func (m *DesiredLRP) GetVolumeMountedFiles() []*File { return nil } +func (m *DesiredLRP) GetUpdateStrategy() DesiredLRP_UpdateStrategy { + if m != nil { + return m.UpdateStrategy + } + return DesiredLRP_UpdateStrategyRolling +} + func init() { + proto.RegisterEnum("models.DesiredLRP_UpdateStrategy", DesiredLRP_UpdateStrategy_name, DesiredLRP_UpdateStrategy_value) proto.RegisterType((*DesiredLRPSchedulingInfo)(nil), "models.DesiredLRPSchedulingInfo") proto.RegisterType((*DesiredLRPRunInfo)(nil), "models.DesiredLRPRunInfo") proto.RegisterMapType((map[string]*MetricTagValue)(nil), "models.DesiredLRPRunInfo.MetricTagsEntry") @@ -986,125 +1073,140 @@ func init() { func init() { proto.RegisterFile("desired_lrp.proto", fileDescriptor_f592e9299b63d68c) } var fileDescriptor_f592e9299b63d68c = []byte{ - // 1845 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0x4f, 0x6f, 0x1b, 0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0x43, 0x41, - 0x1c, 0x97, 0x16, 0x00, 0x00, + // 1975 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xdd, 0x6e, 0x1b, 0xc7, + 0x15, 0xe6, 0xea, 0x87, 0x14, 0x87, 0x3f, 0xa2, 0x46, 0x94, 0x34, 0xa2, 0x6d, 0x2e, 0xa3, 0xf8, + 0x87, 0x69, 0x12, 0x05, 0x50, 0x52, 0x34, 0x4d, 0x8b, 0x02, 0x5e, 0x59, 0x71, 0x04, 0x4b, 0xae, + 0x30, 0xb2, 0xdd, 0x36, 0x40, 0xb1, 0x58, 0xed, 0x8e, 0x56, 0x0b, 0xef, 0xee, 0x2c, 0x76, 0x76, + 0xe5, 0xf0, 0xae, 0xbd, 0xcd, 0x55, 0xfb, 0x00, 0xb9, 0xef, 0x03, 0x14, 0xe8, 0x2b, 0xe4, 0xd2, + 0x97, 0x41, 0x51, 0x10, 0xb5, 0x7c, 0x13, 0xf0, 0x2a, 0x8f, 0x10, 0xcc, 0xec, 0x3f, 0x49, 0x53, + 0x72, 0x6c, 0x5f, 0x71, 0xe6, 0x9c, 0x6f, 0xce, 0x9e, 0x99, 0x39, 0x73, 0xce, 0x77, 0x08, 0x56, + 0x0c, 0xc2, 0x2c, 0x9f, 0x18, 0xaa, 0xed, 0x7b, 0xdb, 0x9e, 0x4f, 0x03, 0x0a, 0xcb, 0x0e, 0x35, + 0x88, 0xcd, 0x3a, 0x1f, 0x9b, 0x56, 0x70, 0x16, 0x9e, 0x6c, 0xeb, 0xd4, 0xf9, 0xc4, 0xa4, 0x26, + 0xfd, 0x44, 0xa8, 0x4f, 0xc2, 0x53, 0x31, 0x13, 0x13, 0x31, 0x8a, 0x96, 0x75, 0x1a, 0x9a, 0x1e, + 0x58, 0xd4, 0x65, 0xf1, 0x74, 0x43, 0xd7, 0xf4, 0x33, 0x62, 0xa8, 0x06, 0xf1, 0x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 0x35, 0x5e, 0xd6, 0x8b, 0x02, 0x1e, + 0xc2, 0xb9, 0xba, 0xce, 0x10, 0x12, 0x37, 0x02, 0x93, 0xf5, 0xfb, 0x5c, 0x77, 0xc0, 0x55, 0xb8, + 0x66, 0xa5, 0x63, 0x06, 0x1f, 0x82, 0x5a, 0xae, 0xf6, 0xa3, 0x4d, 0xb1, 0xea, 0x83, 0x29, 0x55, + 0x2e, 0xca, 0xca, 0xdb, 0x87, 0x02, 0xcc, 0xd3, 0xf6, 0x9e, 0x1b, 0xf8, 0x03, 0x11, 0x6a, 0xc0, + 0x49, 0x85, 0xf0, 0x43, 0xb0, 0x14, 0x13, 0x07, 0x86, 0x3a, 0xc2, 0x58, 0x7a, 0xc1, 0xc7, 0x91, + 0x1c, 0xa7, 0x00, 0xf8, 0x05, 0x68, 0x16, 0x69, 0x05, 0xba, 0x26, 0x76, 0xdd, 0x4e, 0x96, 0x1c, + 0x50, 0x13, 0x6b, 0x01, 0x39, 0xe0, 0x3a, 0x5c, 0xb7, 0x73, 0x33, 0xf8, 0x67, 0xd0, 0xce, 0x87, + 0x20, 0x31, 0x54, 0xce, 0x45, 0x18, 0xba, 0x2e, 0x3e, 0x5a, 0x4f, 0x2c, 0x7c, 0x69, 0xd9, 0x44, + 0x41, 0xa3, 0xa1, 0x3c, 0x15, 0x8d, 0x61, 0x2e, 0x38, 0x89, 0xc1, 0xc1, 0xac, 0xf3, 0x18, 0x2c, + 0x8f, 0xed, 0x12, 0xb6, 0xc0, 0x7c, 0x52, 0x7f, 0xaa, 0x98, 0x0f, 0xe1, 0x47, 0x60, 0xf1, 0x5c, + 0xb3, 0x43, 0x22, 0xe8, 0x47, 0x6d, 0x67, 0x3d, 0x2d, 0xc1, 0xc9, 0xca, 0x27, 0x5c, 0x8b, 0x23, + 0xd0, 0x17, 0x73, 0x9f, 0x4b, 0x5b, 0x7f, 0x97, 0x40, 0x2d, 0x57, 0xe7, 0xe1, 0x6f, 0x52, 0x32, + 0x20, 0x09,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0x7f, 0x55, 0x59, 0xc0, 0x5d, 0x33, 0x07, 0xe8, 0x4e, 0x4f, 0xea, 0x37, + 0x77, 0xde, 0x9b, 0x72, 0x16, 0x11, 0xd3, 0x3d, 0x8e, 0x81, 0xca, 0xea, 0x68, 0x28, 0x8f, 0xaf, + 0xc6, 0xcd, 0xb0, 0x00, 0x7a, 0x57, 0x4d, 0xcb, 0x09, 0x68, 0x16, 0xbd, 0x81, 0xb7, 0x41, 0x05, + 0xff, 0xf1, 0xe0, 0x60, 0xff, 0xe1, 0xfd, 0x56, 0xa9, 0xb3, 0xf9, 0xed, 0x77, 0xbd, 0xb5, 0x22, + 0x00, 0x53, 0xdb, 0xb6, 0x5c, 0x13, 0xf6, 0xc1, 0x12, 0xde, 0xdb, 0xc5, 0x7b, 0x77, 0x1f, 0xed, + 0xb5, 0xa4, 0x4e, 0xe7, 0xdb, 0xef, 0x7a, 0xeb, 0x63, 0x40, 0x12, 0xfd, 0x33, 0xa2, 0x7c, 0xf6, + 0xfc, 0x45, 0x57, 0xfa, 0xe1, 0x45, 0xb7, 0xf4, 0xd3, 0x8b, 0xae, 0xf4, 0xb7, 0x8b, 0xae, 0xf4, + 0xaf, 0x8b, 0xae, 0xf4, 0xfd, 0x45, 0x57, 0x7a, 0x7e, 0xd1, 0x95, 0xfe, 0x7f, 0xd1, 0x95, 0x7e, + 0xbc, 0xe8, 0x96, 0x7e, 0xba, 0xe8, 0x4a, 0xff, 0x78, 0xd9, 0x2d, 0x3d, 0x7f, 0xd9, 0x2d, 0xfd, + 0xf0, 0xb2, 0x5b, 0x3a, 0x29, 0x8b, 0x7f, 0x9d, 0x3f, 0xfd, 0x39, 0x00, 0x00, 0xff, 0xff, 0xa7, + 0xe2, 0x0e, 0x29, 0xe4, 0x17, 0x00, 0x00, +} + +func (x DesiredLRP_UpdateStrategy) String() string { + s, ok := DesiredLRP_UpdateStrategy_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) } - func (this *DesiredLRPSchedulingInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1386,6 +1488,24 @@ func (this *DesiredLRPUpdate) Equal(that interface{}) bool { return false } } + if that1.OptionalImageUsername == nil { + if this.OptionalImageUsername != nil { + return false + } + } else if this.OptionalImageUsername == nil { + return false + } else if !this.OptionalImageUsername.Equal(that1.OptionalImageUsername) { + return false + } + if that1.OptionalImagePassword == nil { + if this.OptionalImagePassword != nil { + return false + } + } else if this.OptionalImagePassword == nil { + return false + } else if !this.OptionalImagePassword.Equal(that1.OptionalImagePassword) { + return false + } return true } func (this *DesiredLRPUpdate_Instances) Equal(that interface{}) bool { @@ -1436,6 +1556,54 @@ func (this *DesiredLRPUpdate_Annotation) Equal(that interface{}) bool { } return true } +func (this *DesiredLRPUpdate_ImageUsername) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DesiredLRPUpdate_ImageUsername) + if !ok { + that2, ok := that.(DesiredLRPUpdate_ImageUsername) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ImageUsername != that1.ImageUsername { + return false + } + return true +} +func (this *DesiredLRPUpdate_ImagePassword) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DesiredLRPUpdate_ImagePassword) + if !ok { + that2, ok := that.(DesiredLRPUpdate_ImagePassword) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.ImagePassword != that1.ImagePassword { + return false + } + return true +} func (this *DesiredLRPKey) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1686,6 +1854,9 @@ func (this *DesiredLRP) Equal(that interface{}) bool { return false } } + if this.UpdateStrategy != that1.UpdateStrategy { + return false + } return true } func (this *DesiredLRPSchedulingInfo) GoString() string { @@ -1818,7 +1989,7 @@ func (this *DesiredLRPUpdate) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 10) s = append(s, "&models.DesiredLRPUpdate{") if this.OptionalInstances != nil { s = append(s, "OptionalInstances: "+fmt.Sprintf("%#v", this.OptionalInstances)+",\n") @@ -1840,6 +2011,12 @@ func (this *DesiredLRPUpdate) GoString() string { if this.MetricTags != nil { s = append(s, "MetricTags: "+mapStringForMetricTags+",\n") } + if this.OptionalImageUsername != nil { + s = append(s, "OptionalImageUsername: "+fmt.Sprintf("%#v", this.OptionalImageUsername)+",\n") + } + if this.OptionalImagePassword != nil { + s = append(s, "OptionalImagePassword: "+fmt.Sprintf("%#v", this.OptionalImagePassword)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -1859,6 +2036,22 @@ func (this *DesiredLRPUpdate_Annotation) GoString() string { `Annotation:` + fmt.Sprintf("%#v", this.Annotation) + `}`}, ", ") return s } +func (this *DesiredLRPUpdate_ImageUsername) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&models.DesiredLRPUpdate_ImageUsername{` + + `ImageUsername:` + fmt.Sprintf("%#v", this.ImageUsername) + `}`}, ", ") + return s +} +func (this *DesiredLRPUpdate_ImagePassword) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&models.DesiredLRPUpdate_ImagePassword{` + + `ImagePassword:` + fmt.Sprintf("%#v", this.ImagePassword) + `}`}, ", ") + return s +} func (this *DesiredLRPKey) GoString() string { if this == nil { return "nil" @@ -1888,7 +2081,7 @@ func (this *DesiredLRP) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 42) + s := make([]string, 0, 43) s = append(s, "&models.DesiredLRP{") s = append(s, "ProcessGuid: "+fmt.Sprintf("%#v", this.ProcessGuid)+",\n") s = append(s, "Domain: "+fmt.Sprintf("%#v", this.Domain)+",\n") @@ -1970,6 +2163,7 @@ func (this *DesiredLRP) GoString() string { if this.VolumeMountedFiles != nil { s = append(s, "VolumeMountedFiles: "+fmt.Sprintf("%#v", this.VolumeMountedFiles)+",\n") } + s = append(s, "UpdateStrategy: "+fmt.Sprintf("%#v", this.UpdateStrategy)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2487,6 +2681,24 @@ func (m *DesiredLRPUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.OptionalImagePassword != nil { + { + size := m.OptionalImagePassword.Size() + i -= size + if _, err := m.OptionalImagePassword.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.OptionalImageUsername != nil { + { + size := m.OptionalImageUsername.Size() + i -= size + if _, err := m.OptionalImageUsername.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } if len(m.MetricTags) > 0 { for k := range m.MetricTags { v := m.MetricTags[k] @@ -2572,6 +2784,34 @@ func (m *DesiredLRPUpdate_Annotation) MarshalToSizedBuffer(dAtA []byte) (int, er dAtA[i] = 0x1a return len(dAtA) - i, nil } +func (m *DesiredLRPUpdate_ImageUsername) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DesiredLRPUpdate_ImageUsername) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.ImageUsername) + copy(dAtA[i:], m.ImageUsername) + i = encodeVarintDesiredLrp(dAtA, i, uint64(len(m.ImageUsername))) + i-- + dAtA[i] = 0x2a + return len(dAtA) - i, nil +} +func (m *DesiredLRPUpdate_ImagePassword) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DesiredLRPUpdate_ImagePassword) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i -= len(m.ImagePassword) + copy(dAtA[i:], m.ImagePassword) + i = encodeVarintDesiredLrp(dAtA, i, uint64(len(m.ImagePassword))) + i-- + dAtA[i] = 0x32 + return len(dAtA) - i, nil +} func (m *DesiredLRPKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2681,6 +2921,13 @@ func (m *DesiredLRP) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.UpdateStrategy != 0 { + i = encodeVarintDesiredLrp(dAtA, i, uint64(m.UpdateStrategy)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xb8 + } if len(m.VolumeMountedFiles) > 0 { for iNdEx := len(m.VolumeMountedFiles) - 1; iNdEx >= 0; iNdEx-- { { @@ -3333,6 +3580,12 @@ func (m *DesiredLRPUpdate) Size() (n int) { n += mapEntrySize + 1 + sovDesiredLrp(uint64(mapEntrySize)) } } + if m.OptionalImageUsername != nil { + n += m.OptionalImageUsername.Size() + } + if m.OptionalImagePassword != nil { + n += m.OptionalImagePassword.Size() + } return n } @@ -3355,6 +3608,26 @@ func (m *DesiredLRPUpdate_Annotation) Size() (n int) { n += 1 + l + sovDesiredLrp(uint64(l)) return n } +func (m *DesiredLRPUpdate_ImageUsername) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ImageUsername) + n += 1 + l + sovDesiredLrp(uint64(l)) + return n +} +func (m *DesiredLRPUpdate_ImagePassword) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ImagePassword) + n += 1 + l + sovDesiredLrp(uint64(l)) + return n +} func (m *DesiredLRPKey) Size() (n int) { if m == nil { return 0 @@ -3574,6 +3847,9 @@ func (m *DesiredLRP) Size() (n int) { n += 2 + l + sovDesiredLrp(uint64(l)) } } + if m.UpdateStrategy != 0 { + n += 2 + sovDesiredLrp(uint64(m.UpdateStrategy)) + } return n } @@ -3721,6 +3997,8 @@ func (this *DesiredLRPUpdate) String() string { `Routes:` + fmt.Sprintf("%v", this.Routes) + `,`, `OptionalAnnotation:` + fmt.Sprintf("%v", this.OptionalAnnotation) + `,`, `MetricTags:` + mapStringForMetricTags + `,`, + `OptionalImageUsername:` + fmt.Sprintf("%v", this.OptionalImageUsername) + `,`, + `OptionalImagePassword:` + fmt.Sprintf("%v", this.OptionalImagePassword) + `,`, `}`, }, "") return s @@ -3745,6 +4023,26 @@ func (this *DesiredLRPUpdate_Annotation) String() string { }, "") return s } +func (this *DesiredLRPUpdate_ImageUsername) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DesiredLRPUpdate_ImageUsername{`, + `ImageUsername:` + fmt.Sprintf("%v", this.ImageUsername) + `,`, + `}`, + }, "") + return s +} +func (this *DesiredLRPUpdate_ImagePassword) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DesiredLRPUpdate_ImagePassword{`, + `ImagePassword:` + fmt.Sprintf("%v", this.ImagePassword) + `,`, + `}`, + }, "") + return s +} func (this *DesiredLRPKey) String() string { if this == nil { return "nil" @@ -3858,6 +4156,7 @@ func (this *DesiredLRP) String() string { `Sidecars:` + repeatedStringForSidecars + `,`, `LogRateLimit:` + strings.Replace(fmt.Sprintf("%v", this.LogRateLimit), "LogRateLimit", "LogRateLimit", 1) + `,`, `VolumeMountedFiles:` + repeatedStringForVolumeMountedFiles + `,`, + `UpdateStrategy:` + fmt.Sprintf("%v", this.UpdateStrategy) + `,`, `}`, }, "") return s @@ -5661,6 +5960,70 @@ func (m *DesiredLRPUpdate) Unmarshal(dAtA []byte) error { } m.MetricTags[mapkey] = mapvalue iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageUsername", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDesiredLrp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDesiredLrp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDesiredLrp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionalImageUsername = &DesiredLRPUpdate_ImageUsername{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImagePassword", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDesiredLrp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDesiredLrp + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDesiredLrp + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OptionalImagePassword = &DesiredLRPUpdate_ImagePassword{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDesiredLrp(dAtA[iNdEx:]) @@ -7300,6 +7663,25 @@ func (m *DesiredLRP) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 39: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateStrategy", wireType) + } + m.UpdateStrategy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDesiredLrp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpdateStrategy |= DesiredLRP_UpdateStrategy(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipDesiredLrp(dAtA[iNdEx:]) diff --git a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.proto b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.proto index d079c034..f9d354db 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.proto +++ b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp.proto @@ -18,6 +18,8 @@ import "sidecar.proto"; import "log_rate_limit.proto"; import "file.proto"; +option (gogoproto.goproto_enum_prefix_all) = true; + message DesiredLRPSchedulingInfo { DesiredLRPKey desired_lrp_key = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "", (gogoproto.embed) = true]; @@ -88,6 +90,14 @@ message DesiredLRPUpdate { string annotation = 3; } map metric_tags = 4; + + oneof optional_image_username { + string image_username = 5; + } + + oneof optional_image_password { + string image_password = 6; + } } message DesiredLRPKey { @@ -150,4 +160,9 @@ message DesiredLRP { repeated Sidecar sidecars = 36; LogRateLimit log_rate_limit = 37; repeated File volume_mounted_files = 38 [(gogoproto.jsontag) = "volume_mounted_files"]; + enum UpdateStrategy { + ROLLING = 0 [(gogoproto.enumvalue_customname) = "UpdateStrategyRolling"]; + RECREATE = 1 [(gogoproto.enumvalue_customname) = "UpdateStrategyRecreate"]; + } + UpdateStrategy update_strategy = 39 [(gogoproto.jsontag) = "update_strategy"]; } diff --git a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.pb.go b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.pb.go index 703679ff..16248592 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.pb.go +++ b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.pb.go @@ -122,6 +122,7 @@ func (m *DesiredLRPsResponse) GetDesiredLrps() []*DesiredLRP { type DesiredLRPsRequest struct { Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain"` ProcessGuids []string `protobuf:"bytes,2,rep,name=process_guids,json=processGuids,proto3" json:"process_guids,omitempty"` + AppGuids []string `protobuf:"bytes,3,rep,name=app_guids,json=appGuids,proto3" json:"app_guids,omitempty"` } func (m *DesiredLRPsRequest) Reset() { *m = DesiredLRPsRequest{} } @@ -170,6 +171,13 @@ func (m *DesiredLRPsRequest) GetProcessGuids() []string { return nil } +func (m *DesiredLRPsRequest) GetAppGuids() []string { + if m != nil { + return m.AppGuids + } + return nil +} + type DesiredLRPResponse struct { Error *Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` DesiredLrp *DesiredLRP `protobuf:"bytes,2,opt,name=desired_lrp,json=desiredLrp,proto3" json:"desired_lrp,omitempty"` @@ -521,38 +529,39 @@ func init() { func init() { proto.RegisterFile("desired_lrp_requests.proto", fileDescriptor_7235cc1a84e38c85) } var fileDescriptor_7235cc1a84e38c85 = []byte{ - // 493 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6b, 0x13, 0x41, - 0x18, 0xc6, 0x77, 0x2a, 0x06, 0xfa, 0x6e, 0x0a, 0x75, 0x3c, 0x74, 0x4d, 0x65, 0x1a, 0xa7, 0x97, - 0x5e, 0x9a, 0x4a, 0xa3, 0x5f, 0x20, 0x28, 0x45, 0x08, 0x52, 0x46, 0x7a, 0x94, 0x25, 0xd9, 0x9d, - 0x6c, 0x17, 0x92, 0x9d, 0xed, 0x4c, 0x56, 0xe8, 0xad, 0x1f, 0xc1, 0x8f, 0x21, 0x78, 0xf6, 0x3b, - 0x78, 0xcc, 0xb1, 0xa7, 0x62, 0x36, 0x17, 0xe9, 0xa9, 0x1f, 0x41, 0x32, 0x33, 0x75, 0x27, 0xad, - 0x51, 0x23, 0x9e, 0x92, 0x79, 0xff, 0x3c, 0xef, 0xef, 0x7d, 0x79, 0x58, 0x68, 0xc4, 0x5c, 0xa5, - 0x92, 0xc7, 0xe1, 0x50, 0xe6, 0xa1, 0xe4, 0x67, 0x05, 0x57, 0x63, 0xd5, 0xca, 0xa5, 0x18, 0x0b, - 0x5c, 0x1b, 0x89, 0x98, 0x0f, 0x55, 0x63, 0x3f, 0x49, 0xc7, 0xa7, 0x45, 0xbf, 0x15, 0x89, 0xd1, - 0x41, 0x22, 0x12, 0x71, 0xa0, 0xd3, 0xfd, 0x62, 0xa0, 0x5f, 0xfa, 0xa1, 0xff, 0x99, 0xb6, 0xc6, - 0x23, 0x47, 0xd2, 0x86, 0x7c, 0x2e, 0xa5, 0x90, 0xe6, 0x41, 0x3b, 0xb0, 0xfd, 0xca, 0x54, 0x74, - 0xd9, 0x71, 0x37, 0x1d, 0xf0, 0xe8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, 0xff, 0x86, 0xdc, 0x5e, 0xf2, 0xcf, - 0xe0, 0xc1, 0x32, 0x70, 0x7a, 0x02, 0xa4, 0xea, 0xba, 0x03, 0x6a, 0x0c, 0xd4, 0x86, 0xba, 0x6b, - 0x0e, 0x6b, 0xa3, 0xcd, 0xeb, 0xab, 0x9d, 0x85, 0x38, 0xf3, 0x1d, 0xb7, 0xd0, 0x23, 0xd8, 0x34, - 0xb2, 0xda, 0x2b, 0xb7, 0x42, 0x0b, 0x2e, 0x40, 0x7f, 0xe5, 0x82, 0x0b, 0x04, 0x5b, 0x27, 0x79, - 0xdc, 0x1b, 0x73, 0xd7, 0x7c, 0xff, 0x4e, 0x86, 0x9f, 0x43, 0xad, 0xd0, 0x7a, 0xf6, 0x78, 0xc1, - 0x7d, 0x00, 0x33, 0x8f, 0xd9, 0x3a, 0xfa, 0x16, 0xb6, 0x18, 0x1f, 0x89, 0x0f, 0xff, 0x89, 0xa0, - 0xf3, 0x62, 0x32, 0x25, 0xde, 0xe5, 0x94, 0x78, 0x37, 0x53, 0x82, 0x2e, 0x4a, 0x82, 0x3e, 0x95, - 0x04, 0x7d, 0x2d, 0x09, 0x9a, 0x94, 0x04, 0x7d, 0x2b, 0x09, 0xfa, 0x5e, 0x12, 0xef, 0xa6, 0x24, - 0xe8, 0xe3, 0x8c, 0x78, 0x93, 0x19, 0xf1, 0x2e, 0x67, 0xc4, 0xeb, 0xd7, 0xf4, 0xb7, 0xa9, 0xfd, - 0x23, 0x00, 0x00, 0xff, 0xff, 0xca, 0x08, 0x89, 0xe8, 0x10, 0x05, 0x00, 0x00, + // 507 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xf5, 0xb6, 0x22, 0x22, 0xe3, 0x54, 0x2a, 0xe6, 0x50, 0x93, 0xa0, 0x6d, 0xd8, 0x5e, 0x7a, + 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61, 0xd3, 0xd0, 0xea, 0xac, + 0xdc, 0x10, 0x2d, 0xa5, 0x00, 0xfd, 0x55, 0x0a, 0xce, 0x11, 0x6c, 0x1d, 0x8b, 0x38, 0x9c, 0xb0, + 0x6a, 0xf8, 0xfe, 0x5d, 0x99, 0xf7, 0x1c, 0x6a, 0xb9, 0xe6, 0xb3, 0xe6, 0xf9, 0x77, 0x05, 0x98, + 0x7d, 0xd4, 0xe2, 0xc8, 0x5b, 0xd8, 0xa2, 0x6c, 0xcc, 0xdf, 0xff, 0x27, 0x05, 0xbd, 0x17, 0xd3, + 0x19, 0x76, 0x2e, 0x66, 0xd8, 0xb9, 0x9e, 0x61, 0x74, 0x5e, 0x60, 0xf4, 0xa9, 0xc0, 0xe8, 0x6b, + 0x81, 0xd1, 0xb4, 0xc0, 0xe8, 0x5b, 0x81, 0xd1, 0xf7, 0x02, 0x3b, 0xd7, 0x05, 0x46, 0x1f, 0xe7, + 0xd8, 0x99, 0xce, 0xb1, 0x73, 0x31, 0xc7, 0xce, 0xa0, 0xa6, 0x3f, 0x5c, 0xdd, 0x1f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x46, 0x98, 0xcb, 0x90, 0x2d, 0x05, 0x00, 0x00, } func (this *DesiredLRPLifecycleResponse) Equal(that interface{}) bool { @@ -641,6 +650,14 @@ func (this *DesiredLRPsRequest) Equal(that interface{}) bool { return false } } + if len(this.AppGuids) != len(that1.AppGuids) { + return false + } + for i := range this.AppGuids { + if this.AppGuids[i] != that1.AppGuids[i] { + return false + } + } return true } func (this *DesiredLRPResponse) Equal(that interface{}) bool { @@ -859,10 +876,11 @@ func (this *DesiredLRPsRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&models.DesiredLRPsRequest{") s = append(s, "Domain: "+fmt.Sprintf("%#v", this.Domain)+",\n") s = append(s, "ProcessGuids: "+fmt.Sprintf("%#v", this.ProcessGuids)+",\n") + s = append(s, "AppGuids: "+fmt.Sprintf("%#v", this.AppGuids)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -1068,6 +1086,15 @@ func (m *DesiredLRPsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AppGuids) > 0 { + for iNdEx := len(m.AppGuids) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AppGuids[iNdEx]) + copy(dAtA[i:], m.AppGuids[iNdEx]) + i = encodeVarintDesiredLrpRequests(dAtA, i, uint64(len(m.AppGuids[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.ProcessGuids) > 0 { for iNdEx := len(m.ProcessGuids) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ProcessGuids[iNdEx]) @@ -1426,6 +1453,12 @@ func (m *DesiredLRPsRequest) Size() (n int) { n += 1 + l + sovDesiredLrpRequests(uint64(l)) } } + if len(m.AppGuids) > 0 { + for _, s := range m.AppGuids { + l = len(s) + n += 1 + l + sovDesiredLrpRequests(uint64(l)) + } + } return n } @@ -1577,6 +1610,7 @@ func (this *DesiredLRPsRequest) String() string { s := strings.Join([]string{`&DesiredLRPsRequest{`, `Domain:` + fmt.Sprintf("%v", this.Domain) + `,`, `ProcessGuids:` + fmt.Sprintf("%v", this.ProcessGuids) + `,`, + `AppGuids:` + fmt.Sprintf("%v", this.AppGuids) + `,`, `}`, }, "") return s @@ -1967,6 +2001,38 @@ func (m *DesiredLRPsRequest) Unmarshal(dAtA []byte) error { } m.ProcessGuids = append(m.ProcessGuids, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppGuids", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDesiredLrpRequests + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthDesiredLrpRequests + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDesiredLrpRequests + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppGuids = append(m.AppGuids, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipDesiredLrpRequests(dAtA[iNdEx:]) diff --git a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.proto b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.proto index be746255..237bfdb0 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.proto +++ b/vendor/code.cloudfoundry.org/bbs/models/desired_lrp_requests.proto @@ -18,6 +18,7 @@ message DesiredLRPsResponse { message DesiredLRPsRequest { string domain = 1 [(gogoproto.jsontag) = "domain"]; repeated string process_guids = 2; + repeated string app_guids = 3; } message DesiredLRPResponse { diff --git a/vendor/code.cloudfoundry.org/bbs/models/log_config.go b/vendor/code.cloudfoundry.org/bbs/models/log_config.go new file mode 100644 index 00000000..c53e223f --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/log_config.go @@ -0,0 +1,34 @@ +package models + +import "strconv" + +// LogConfig contains container log routing configuration. +// Moved here from code.cloudfoundry.org/executor to break silk-release's +// dependency on the executor module. +type LogConfig struct { + Guid string `json:"guid"` + Index int `json:"index"` + SourceName string `json:"source_name"` + Tags map[string]string `json:"tags"` +} + +func (l LogConfig) GetSourceNameAndTagsForLogging() (string, map[string]string) { + sourceName := l.SourceName + if sourceName == "" { + sourceName = "LOG" + } + + tags := map[string]string{} + for k, v := range l.Tags { + tags[k] = v + } + + if _, ok := tags["source_id"]; !ok { + tags["source_id"] = l.Guid + } + sourceIndex := strconv.Itoa(l.Index) + if _, ok := tags["instance_id"]; !ok { + tags["instance_id"] = sourceIndex + } + return sourceName, tags +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/rep_interfaces.go b/vendor/code.cloudfoundry.org/bbs/models/rep_interfaces.go new file mode 100644 index 00000000..066807c8 --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/rep_interfaces.go @@ -0,0 +1,38 @@ +package models + +// Rep client interfaces moved here from code.cloudfoundry.org/rep +// to break the bbs <-> rep module cycle. + +import ( + "net/http" + "time" + + "code.cloudfoundry.org/lager/v3" +) + +// RepClient is the interface bbs uses to communicate with rep agents. +// rep implements this interface. Defined here to break the bbs <-> rep cycle. +// +//go:generate counterfeiter -o fakes/fake_rep_client.go . RepClient +type RepClient interface { + State(logger lager.Logger) (CellState, error) + Perform(logger lager.Logger, work Work) (Work, error) + UpdateLRPInstance(logger lager.Logger, update LRPUpdate) error + StopLRPInstance(logger lager.Logger, key ActualLRPKey, instanceKey ActualLRPInstanceKey) error + CancelTask(logger lager.Logger, taskGuid string) error + SetStateClient(stateClient *http.Client) + StateClientTimeout() time.Duration +} + +// RepClientFactory creates RepClient instances. +// +//go:generate counterfeiter -o fakes/fake_rep_client_factory.go . RepClientFactory +type RepClientFactory interface { + CreateClient(address, url, traceID string) (RepClient, error) +} + +// RepSimClient extends RepClient with simulation capabilities. +type RepSimClient interface { + RepClient + Reset() error +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/rootfs_providers.go b/vendor/code.cloudfoundry.org/bbs/models/rootfs_providers.go new file mode 100644 index 00000000..dd160525 --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/rootfs_providers.go @@ -0,0 +1,158 @@ +package models + +// RootFS provider types moved here from code.cloudfoundry.org/rep +// to break the bbs <-> rep module cycle. + +import ( + "encoding/json" + "net/url" +) + +type RootFSProvider interface { + Type() RootFSProviderType + Match(url.URL) bool +} + +type RootFSProviderType string + +const ( + RootFSProviderTypeArbitrary RootFSProviderType = "arbitrary" + RootFSProviderTypeFixedSet RootFSProviderType = "fixed_set" +) + +type RootFSProviders map[string]RootFSProvider + +func (p RootFSProviders) Copy() RootFSProviders { + pCopy := RootFSProviders{} + for key := range p { + pCopy[key] = p[key] + } + return pCopy +} + +func (p RootFSProviders) Match(rootFS url.URL) bool { + provider, ok := p[rootFS.Scheme] + if !ok { + return false + } + return provider.Match(rootFS) +} + +func (providers *RootFSProviders) UnmarshalJSON(payload []byte) error { + var providerEnvelope map[string]json.RawMessage + err := json.Unmarshal(payload, &providerEnvelope) + if err != nil { + return err + } + + *providers = RootFSProviders{} + + for key, value := range providerEnvelope { + provider, err := unmarshalRootFSProvider(value) + if err != nil { + return err + } + (*providers)[key] = provider + } + + return nil +} + +type rootFSProviderEnvelope struct { + Type RootFSProviderType `json:"type"` +} + +func unmarshalRootFSProvider(payload []byte) (RootFSProvider, error) { + var envelope rootFSProviderEnvelope + err := json.Unmarshal(payload, &envelope) + if err != nil { + return nil, err + } + + switch envelope.Type { + case RootFSProviderTypeArbitrary: + return ArbitraryRootFSProvider{}, nil + case RootFSProviderTypeFixedSet: + var provider FixedSetRootFSProvider + err := provider.UnmarshalJSON(payload) + return provider, err + } + + return nil, nil +} + +type ArbitraryRootFSProvider struct{} + +func (ArbitraryRootFSProvider) Type() RootFSProviderType { return RootFSProviderTypeArbitrary } + +func (ArbitraryRootFSProvider) Match(url.URL) bool { return true } + +func (provider ArbitraryRootFSProvider) MarshalJSON() ([]byte, error) { + return json.Marshal(map[string]string{"type": string(provider.Type())}) +} + +type FixedSetRootFSProvider struct { + FixedSet StringSet +} + +func NewFixedSetRootFSProvider(rootfses ...string) FixedSetRootFSProvider { + return FixedSetRootFSProvider{ + FixedSet: NewStringSet(rootfses...), + } +} + +func (FixedSetRootFSProvider) Type() RootFSProviderType { return RootFSProviderTypeFixedSet } + +func (provider FixedSetRootFSProvider) Match(rootfs url.URL) bool { + return provider.FixedSet.Contains(rootfs.Opaque) +} + +func (provider FixedSetRootFSProvider) MarshalJSON() ([]byte, error) { + setPayload, err := json.Marshal(provider.FixedSet) + if err != nil { + return nil, err + } + + typePayload, err := json.Marshal(provider.Type()) + if err != nil { + return nil, err + } + + setValue := json.RawMessage(setPayload) + typeValue := json.RawMessage(typePayload) + + return json.Marshal(map[string]*json.RawMessage{ + "type": &typeValue, + "set": &setValue, + }) +} + +func (provider *FixedSetRootFSProvider) UnmarshalJSON(payload []byte) error { + type fixed struct { + Set StringSet `json:"set"` + } + + var f fixed + err := json.Unmarshal(payload, &f) + if err != nil { + return err + } + + provider.FixedSet = f.Set + return nil +} + +type StringSet map[string]struct{} + +func NewStringSet(entries ...string) StringSet { + set := StringSet{} + for _, entry := range entries { + set[entry] = struct{}{} + } + return set +} + +func (set StringSet) Contains(candidate string) bool { + _, ok := set[candidate] + return ok +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/scheduling_types.go b/vendor/code.cloudfoundry.org/bbs/models/scheduling_types.go new file mode 100644 index 00000000..0c1362f8 --- /dev/null +++ b/vendor/code.cloudfoundry.org/bbs/models/scheduling_types.go @@ -0,0 +1,367 @@ +package models + +// Scheduling and placement types moved here from code.cloudfoundry.org/rep +// to break the bbs <-> rep module cycle. + +import ( + "encoding/json" + "errors" + "fmt" + "net/url" + "sort" + "strings" +) + +const InternalRouter = "internal-router" + +var ErrorIncompatibleRootfs = errors.New("rootfs not found") + +const StackVersionFile = "/etc/stack-version" + +type Resources struct { + MemoryMB int32 + DiskMB int32 + Containers int +} + +func NewResources(memoryMb, diskMb int32, containerCount int) Resources { + return Resources{memoryMb, diskMb, containerCount} +} + +func (r *Resources) Copy() Resources { + return *r +} + +func (r *Resources) Subtract(res *Resource) { + r.MemoryMB -= res.MemoryMB + r.DiskMB -= res.DiskMB + r.Containers -= 1 +} + +func (r *Resources) ComputeScore(total *Resources) float64 { + fractionUsedMemory := 1.0 - float64(r.MemoryMB)/float64(total.MemoryMB) + fractionUsedDisk := 1.0 - float64(r.DiskMB)/float64(total.DiskMB) + fractionUsedContainers := 1.0 - float64(r.Containers)/float64(total.Containers) + return (fractionUsedMemory + fractionUsedDisk + fractionUsedContainers) / 3.0 +} + +type Resource struct { + MemoryMB int32 + DiskMB int32 + MaxPids int32 +} + +func NewResource(memoryMb, diskMb int32, maxPids int32) Resource { + return Resource{MemoryMB: memoryMb, DiskMB: diskMb, MaxPids: maxPids} +} + +func (r *Resource) Valid() bool { + return r.DiskMB >= 0 && r.MemoryMB >= 0 +} + +func (r *Resource) Copy() Resource { + return NewResource(r.MemoryMB, r.DiskMB, r.MaxPids) +} + +type PlacementConstraint struct { + PlacementTags []string + VolumeDrivers []string + RootFs string +} + +func NewPlacementConstraint(rootFs string, placementTags, volumeDrivers []string) PlacementConstraint { + return PlacementConstraint{PlacementTags: placementTags, VolumeDrivers: volumeDrivers, RootFs: rootFs} +} + +func (p *PlacementConstraint) Valid() bool { + return p.RootFs != "" +} + +// SchedulingLRP is the rep-facing LRP type used in scheduling. +// Named SchedulingLRP to avoid conflict with protobuf-generated ActualLRP/DesiredLRP. +type SchedulingLRP struct { + InstanceGUID string `json:"instance_guid"` + ActualLRPKey + PlacementConstraint + Resource + State string `json:"state"` +} + +func NewSchedulingLRP(instanceGUID string, key ActualLRPKey, res Resource, pc PlacementConstraint) SchedulingLRP { + return SchedulingLRP{instanceGUID, key, pc, res, ""} +} + +func (lrp *SchedulingLRP) Identifier() string { + return fmt.Sprintf("%s.%d", lrp.ProcessGuid, lrp.Index) +} + +func (lrp *SchedulingLRP) Copy() SchedulingLRP { + return NewSchedulingLRP(lrp.InstanceGUID, lrp.ActualLRPKey, lrp.Resource, lrp.PlacementConstraint) +} + +// InternalRoute is a hostname for internal routing. +// Inlined from code.cloudfoundry.org/routing-info/internalroutes to avoid an import cycle. +type InternalRoute struct { + Hostname string `json:"hostname"` +} + +// InternalRoutes is a slice of InternalRoute entries. +type InternalRoutes []InternalRoute + +// RoutingInfo serialises the routes for use in a Routes map. +func (r InternalRoutes) RoutingInfo() Routes { + data, _ := json.Marshal(r) + routingInfo := json.RawMessage(data) + return Routes{ + InternalRouter: &routingInfo, + } +} + +// Equal returns true if the two InternalRoutes slices contain the same hostnames. +func (r InternalRoutes) Equal(other InternalRoutes) bool { + if len(r) != len(other) { + return false + } + set := make(map[string]bool, len(r)) + for _, route := range r { + set[route.Hostname] = true + } + for _, route := range other { + if !set[route.Hostname] { + return false + } + } + return true +} + +// InternalRoutesFromRoutingInfo deserialises InternalRoutes from a Routes map. +func InternalRoutesFromRoutingInfo(routingInfo Routes) (InternalRoutes, error) { + if routingInfo == nil { + return nil, nil + } + data, found := routingInfo[InternalRouter] + if !found || data == nil { + return nil, nil + } + var routes InternalRoutes + err := json.Unmarshal(*data, &routes) + return routes, err +} + +// LRPUpdate carries internal-route and metric-tag updates for a running LRP. +type LRPUpdate struct { + InstanceGUID string `json:"instance_guid"` + ActualLRPKey + InternalRoutes InternalRoutes `json:"internal_routes"` + MetricTags map[string]string `json:"metric_tags"` +} + +func NewLRPUpdate(instanceGUID string, key ActualLRPKey, internalRoutes InternalRoutes, metricTags map[string]string) LRPUpdate { + return LRPUpdate{ + InstanceGUID: instanceGUID, + ActualLRPKey: key, + InternalRoutes: internalRoutes, + MetricTags: metricTags, + } +} + +// SchedulingTask is the rep-facing task type used in scheduling. +// Named SchedulingTask to avoid conflict with the protobuf-generated Task type. +type SchedulingTask struct { + TaskGuid string + Domain string + PlacementConstraint + Resource + State Task_State `json:"state"` + Failed bool `json:"failed"` +} + +func NewSchedulingTask(guid string, domain string, res Resource, pc PlacementConstraint) SchedulingTask { + return SchedulingTask{guid, domain, pc, res, Task_Invalid, false} +} + +func (task *SchedulingTask) Identifier() string { + return task.TaskGuid +} + +func (task SchedulingTask) Copy() SchedulingTask { + return task +} + +// Work represents a bundle of LRPs and tasks for a rep cell. +type Work struct { + LRPs []SchedulingLRP + Tasks []SchedulingTask + CellID string `json:"cell_id,omitempty"` +} + +type InsufficientResourcesError struct { + Problems map[string]struct{} +} + +func (i InsufficientResourcesError) Error() string { + if len(i.Problems) == 0 { + return "insufficient resources" + } + + keys := []string{} + for key := range i.Problems { + keys = append(keys, key) + } + sort.Strings(keys) + return fmt.Sprintf("insufficient resources: %s", strings.Join(keys, ", ")) +} + +type CellState struct { + RepURL string `json:"rep_url"` + CellID string `json:"cell_id"` + CellIndex int `json:"cell_index"` + RootFSProviders RootFSProviders + AvailableResources Resources + TotalResources Resources + LRPs []SchedulingLRP + Tasks []SchedulingTask + StartingContainerCount int + Zone string + Evacuating bool + VolumeDrivers []string + PlacementTags []string + OptionalPlacementTags []string + ProxyMemoryAllocationMB int +} + +func NewCellState( + cellID string, + cellIndex int, + repURL string, + root RootFSProviders, + avail Resources, + total Resources, + lrps []SchedulingLRP, + tasks []SchedulingTask, + zone string, + startingContainerCount int, + isEvac bool, + volumeDrivers []string, + placementTags []string, + optionalPlacementTags []string, + proxyMemoryAllocation int, +) CellState { + return CellState{ + CellID: cellID, + CellIndex: cellIndex, + RepURL: repURL, + RootFSProviders: root, + AvailableResources: avail, + TotalResources: total, + LRPs: lrps, + Tasks: tasks, + Zone: zone, + StartingContainerCount: startingContainerCount, + Evacuating: isEvac, + VolumeDrivers: volumeDrivers, + PlacementTags: placementTags, + OptionalPlacementTags: optionalPlacementTags, + ProxyMemoryAllocationMB: proxyMemoryAllocation, + } +} + +func (c *CellState) AddLRP(lrp *SchedulingLRP) { + c.AvailableResources.Subtract(&lrp.Resource) + c.StartingContainerCount += 1 + c.LRPs = append(c.LRPs, *lrp) +} + +func (c *CellState) AddTask(task *SchedulingTask) { + c.AvailableResources.Subtract(&task.Resource) + c.StartingContainerCount += 1 + c.Tasks = append(c.Tasks, *task) +} + +func (c *CellState) ResourceMatch(res *Resource) error { + problems := map[string]struct{}{} + + if c.AvailableResources.DiskMB < res.DiskMB { + problems["disk"] = struct{}{} + } + if c.AvailableResources.MemoryMB < res.MemoryMB { + problems["memory"] = struct{}{} + } + if c.AvailableResources.Containers < 1 { + problems["containers"] = struct{}{} + } + if len(problems) == 0 { + return nil + } + + return InsufficientResourcesError{Problems: problems} +} + +func (c CellState) ComputeScore(res *Resource, startingContainerWeight float64) float64 { + remainingResources := c.AvailableResources.Copy() + remainingResources.Subtract(res) + startingContainerScore := float64(c.StartingContainerCount) * startingContainerWeight + return remainingResources.ComputeScore(&c.TotalResources) + startingContainerScore +} + +func (c *CellState) MatchRootFS(rootfs string) bool { + rootFSURL, err := url.Parse(rootfs) + if err != nil { + return false + } + return c.RootFSProviders.Match(*rootFSURL) +} + +func (c *CellState) MatchVolumeDrivers(volumeDrivers []string) bool { + for _, requestedDriver := range volumeDrivers { + found := false + for _, actualDriver := range c.VolumeDrivers { + if requestedDriver == actualDriver { + found = true + break + } + } + if !found { + return false + } + } + return true +} + +func (c *CellState) MatchPlacementTags(desiredPlacementTags []string) bool { + desiredTags := toPlacementSet(desiredPlacementTags) + optionalTags := toPlacementSet(c.OptionalPlacementTags) + requiredTags := toPlacementSet(c.PlacementTags) + allTags := requiredTags.union(optionalTags) + return requiredTags.isSubset(desiredTags) && desiredTags.isSubset(allTags) +} + +type placementTagSet map[string]struct{} + +func (set placementTagSet) union(other placementTagSet) placementTagSet { + tags := placementTagSet{} + for k := range set { + tags[k] = struct{}{} + } + for k := range other { + tags[k] = struct{}{} + } + return tags +} + +func (set placementTagSet) isSubset(other placementTagSet) bool { + for k := range set { + if _, ok := other[k]; !ok { + return false + } + } + return true +} + +func toPlacementSet(slice []string) placementTagSet { + tags := placementTagSet{} + for _, k := range slice { + tags[k] = struct{}{} + } + return tags +} diff --git a/vendor/code.cloudfoundry.org/bbs/models/test/model_helpers/constructors.go b/vendor/code.cloudfoundry.org/bbs/models/test/model_helpers/constructors.go index 473afed6..07732414 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/test/model_helpers/constructors.go +++ b/vendor/code.cloudfoundry.org/bbs/models/test/model_helpers/constructors.go @@ -133,6 +133,7 @@ func NewValidDesiredLRP(guid string) *models.DesiredLRP { MetricTags: map[string]*models.MetricTagValue{ "source_id": {Static: "some-metrics-guid"}, }, + UpdateStrategy: models.DesiredLRP_UpdateStrategyRolling, } desiredLRP.VolumeMountedFiles = append(desiredLRP.VolumeMountedFiles, &models.File{ diff --git a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.go b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.go index fff1b251..fe4ebcb5 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.go +++ b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.go @@ -25,6 +25,9 @@ func (v *VolumeMount) Validate() error { if v.Shared != nil && v.Shared.VolumeId == "" { ve = ve.Append(errors.New("invalid volume_mount volume id")) } + if v.Dedicated != nil && v.Dedicated.MounterId == "" { + ve = ve.Append(errors.New("invalid volume_mount mounter id")) + } if !ve.Empty() { return ve diff --git a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.pb.go b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.pb.go index 2193674d..96de3f08 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.pb.go +++ b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.pb.go @@ -76,18 +76,78 @@ func (m *SharedDevice) GetMountConfig() string { return "" } +type DedicatedDevice struct { + MounterId string `protobuf:"bytes,1,opt,name=mounter_id,json=mounterId,proto3" json:"mounter_id"` + MountConfig string `protobuf:"bytes,2,opt,name=mount_config,json=mountConfig,proto3" json:"mount_config"` + DeviceConfig string `protobuf:"bytes,3,opt,name=device_config,json=deviceConfig,proto3" json:"device_config"` +} + +func (m *DedicatedDevice) Reset() { *m = DedicatedDevice{} } +func (*DedicatedDevice) ProtoMessage() {} +func (*DedicatedDevice) Descriptor() ([]byte, []int) { + return fileDescriptor_bbde336a4634d84f, []int{1} +} +func (m *DedicatedDevice) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DedicatedDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DedicatedDevice.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DedicatedDevice) XXX_Merge(src proto.Message) { + xxx_messageInfo_DedicatedDevice.Merge(m, src) +} +func (m *DedicatedDevice) XXX_Size() int { + return m.Size() +} +func (m *DedicatedDevice) XXX_DiscardUnknown() { + xxx_messageInfo_DedicatedDevice.DiscardUnknown(m) +} + +var xxx_messageInfo_DedicatedDevice proto.InternalMessageInfo + +func (m *DedicatedDevice) GetMounterId() string { + if m != nil { + return m.MounterId + } + return "" +} + +func (m *DedicatedDevice) GetMountConfig() string { + if m != nil { + return m.MountConfig + } + return "" +} + +func (m *DedicatedDevice) GetDeviceConfig() string { + if m != nil { + return m.DeviceConfig + } + return "" +} + type VolumeMount struct { Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver"` ContainerDir string `protobuf:"bytes,3,opt,name=container_dir,json=containerDir,proto3" json:"container_dir"` Mode string `protobuf:"bytes,6,opt,name=mode,proto3" json:"mode"` // oneof device { - Shared *SharedDevice `protobuf:"bytes,7,opt,name=shared,proto3" json:"shared"` + Shared *SharedDevice `protobuf:"bytes,7,opt,name=shared,proto3" json:"shared"` + Dedicated *DedicatedDevice `protobuf:"bytes,8,opt,name=dedicated,proto3" json:"dedicated"` } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} func (*VolumeMount) Descriptor() ([]byte, []int) { - return fileDescriptor_bbde336a4634d84f, []int{1} + return fileDescriptor_bbde336a4634d84f, []int{2} } func (m *VolumeMount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -144,6 +204,13 @@ func (m *VolumeMount) GetShared() *SharedDevice { return nil } +func (m *VolumeMount) GetDedicated() *DedicatedDevice { + if m != nil { + return m.Dedicated + } + return nil +} + type VolumePlacement struct { DriverNames []string `protobuf:"bytes,1,rep,name=driver_names,json=driverNames,proto3" json:"driver_names"` } @@ -151,7 +218,7 @@ type VolumePlacement struct { func (m *VolumePlacement) Reset() { *m = VolumePlacement{} } func (*VolumePlacement) ProtoMessage() {} func (*VolumePlacement) Descriptor() ([]byte, []int) { - return fileDescriptor_bbde336a4634d84f, []int{2} + return fileDescriptor_bbde336a4634d84f, []int{3} } func (m *VolumePlacement) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -189,6 +256,7 @@ func (m *VolumePlacement) GetDriverNames() []string { func init() { proto.RegisterType((*SharedDevice)(nil), "models.SharedDevice") + proto.RegisterType((*DedicatedDevice)(nil), "models.DedicatedDevice") proto.RegisterType((*VolumeMount)(nil), "models.VolumeMount") proto.RegisterType((*VolumePlacement)(nil), "models.VolumePlacement") } @@ -196,31 +264,36 @@ func init() { func init() { proto.RegisterFile("volume_mount.proto", fileDescriptor_bbde336a4634d84f) } var fileDescriptor_bbde336a4634d84f = []byte{ - // 381 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x6a, 0xa3, 0x40, - 0x18, 0xc7, 0x9d, 0xc4, 0xb8, 0x66, 0x4c, 0x58, 0x77, 0xd8, 0x83, 0x2c, 0xcb, 0x18, 0x3c, 0x85, - 0x85, 0x35, 0xd0, 0x94, 0xd2, 0x73, 0x1a, 0x0a, 0x0d, 0xb4, 0x14, 0x0b, 0xbd, 0x8a, 0xd1, 0x89, - 0x19, 0x88, 0x4e, 0x31, 0x9a, 0x73, 0x1f, 0xa1, 0x8f, 0xd1, 0x47, 0xe9, 0x31, 0xd0, 0x4b, 0x4e, - 0xd2, 0x98, 0x4b, 0xf1, 0x94, 0x47, 0x28, 0xce, 0xd8, 0x36, 0xb9, 0x38, 0xf3, 0xfb, 0x7f, 0x7f, - 0x3f, 0xbf, 0xef, 0x2f, 0x44, 0x2b, 0xb6, 0xc8, 0x22, 0xe2, 0x46, 0x2c, 0x8b, 0x53, 0xfb, 0x21, - 0x61, 0x29, 0x43, 0x4a, 0xc4, 0x02, 0xb2, 0x58, 0xfe, 0xf9, 0x1f, 0xd2, 0x74, 0x9e, 0x4d, 0x6d, - 0x9f, 0x45, 0x83, 0x90, 0x85, 0x6c, 0xc0, 0xcb, 0xd3, 0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, 0x47, 0x8c, - 0xef, 0xc6, 0x5e, 0x44, 0x96, 0x06, 0xe8, 0x35, 0x3f, 0xd3, 0x39, 0xd4, 0x1d, 0x4d, 0xd0, 0x4d, - 0x05, 0xa3, 0xd3, 0xf5, 0x16, 0x83, 0xcd, 0x16, 0x4b, 0xfb, 0x2d, 0x06, 0x8f, 0x05, 0x06, 0xcf, - 0x05, 0x06, 0x2f, 0x05, 0x06, 0xeb, 0x02, 0x83, 0xb7, 0x02, 0x83, 0xf7, 0x02, 0x4b, 0xfb, 0x02, - 0x83, 0xa7, 0x1d, 0x96, 0xd6, 0x3b, 0x2c, 0x6d, 0x76, 0x58, 0x9a, 0x2a, 0xfc, 0x5f, 0x0e, 0x3f, - 0x02, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x23, 0x60, 0xde, 0x18, 0x02, 0x00, 0x00, + // 451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xce, 0xb4, 0xd9, 0x98, 0x4e, 0xbb, 0x6e, 0x1d, 0x04, 0x83, 0xc8, 0xa4, 0xf4, 0xb4, 0x08, + 0xdb, 0x05, 0x57, 0xc4, 0xf3, 0x5a, 0x04, 0x0b, 0x8a, 0x8c, 0xe0, 0xb5, 0xa4, 0x99, 0xd9, 0xec, + 0x40, 0x93, 0x91, 0x69, 0xd2, 0xb3, 0x3f, 0xc1, 0xab, 0xff, 0xc0, 0x8b, 0xff, 0xc3, 0x63, 0x8f, + 0x7b, 0x0a, 0x36, 0xbd, 0x48, 0x4e, 0xfb, 0x13, 0x24, 0x6f, 0x92, 0x36, 0xf5, 0xe8, 0x25, 0xf3, + 0xbe, 0xf7, 0xde, 0x37, 0xdf, 0xcb, 0xfb, 0x06, 0x93, 0xb5, 0x5a, 0x66, 0xb1, 0x98, 0xc7, 0x2a, + 0x4b, 0xd2, 0xc9, 0x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2, 0x0c, 0xdb, 0x95, 0x8b, 0x9e, + 0x03, 0xed, 0x6e, 0x99, 0xfb, 0x80, 0x19, 0x7c, 0xc9, 0x6b, 0xec, 0xac, 0xc0, 0x2a, 0xef, 0xc1, + 0x08, 0x9d, 0xf7, 0x5f, 0x3c, 0x9e, 0x18, 0xcb, 0x27, 0x6d, 0x03, 0xcd, 0x3c, 0xa6, 0x8f, 0xd5, + 0x27, 0x99, 0xe2, 0x1e, 0x6f, 0x56, 0xee, 0xb9, 0x40, 0x7e, 0xd2, 0x90, 0xff, 0xf1, 0xc2, 0xb8, + 0xbd, 0xef, 0x66, 0x87, 0x70, 0x66, 0xbb, 0x9d, 0x61, 0x77, 0x66, 0xbb, 0xf6, 0xf0, 0x64, 0x66, + 0xbb, 0x27, 0x43, 0x67, 0xfc, 0x16, 0x9f, 0x99, 0xd5, 0x7c, 0x5c, 0x06, 0xa1, 0x88, 0x45, 0x92, + 0x56, 0xde, 0x98, 0x25, 0xcc, 0x93, 0x20, 0x16, 0x2b, 0x0f, 0x8d, 0xba, 0x8d, 0x37, 0xed, 0x3c, + 0xeb, 0x1b, 0xf4, 0xa1, 0x02, 0xd7, 0x2f, 0x37, 0x5b, 0x8a, 0xee, 0xb6, 0xd4, 0xba, 0xdf, 0x52, + 0xf4, 0xb5, 0xa0, 0xe8, 0x47, 0x41, 0xd1, 0xaf, 0x82, 0xa2, 0x4d, 0x41, 0xd1, 0xef, 0x82, 0xa2, + 0x3f, 0x05, 0xb5, 0xee, 0x0b, 0x8a, 0xbe, 0xed, 0xa8, 0xb5, 0xd9, 0x51, 0xeb, 0x6e, 0x47, 0xad, + 0x85, 0x03, 0x2f, 0xf8, 0xea, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x09, 0x4f, 0x81, 0x0e, + 0x03, 0x00, 0x00, } func (this *SharedDevice) Equal(that interface{}) bool { @@ -250,6 +323,36 @@ func (this *SharedDevice) Equal(that interface{}) bool { } return true } +func (this *DedicatedDevice) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DedicatedDevice) + if !ok { + that2, ok := that.(DedicatedDevice) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MounterId != that1.MounterId { + return false + } + if this.MountConfig != that1.MountConfig { + return false + } + if this.DeviceConfig != that1.DeviceConfig { + return false + } + return true +} func (this *VolumeMount) Equal(that interface{}) bool { if that == nil { return this == nil @@ -281,6 +384,9 @@ func (this *VolumeMount) Equal(that interface{}) bool { if !this.Shared.Equal(that1.Shared) { return false } + if !this.Dedicated.Equal(that1.Dedicated) { + return false + } return true } func (this *VolumePlacement) Equal(that interface{}) bool { @@ -323,11 +429,23 @@ func (this *SharedDevice) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *DedicatedDevice) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&models.DedicatedDevice{") + s = append(s, "MounterId: "+fmt.Sprintf("%#v", this.MounterId)+",\n") + s = append(s, "MountConfig: "+fmt.Sprintf("%#v", this.MountConfig)+",\n") + s = append(s, "DeviceConfig: "+fmt.Sprintf("%#v", this.DeviceConfig)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *VolumeMount) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 9) s = append(s, "&models.VolumeMount{") s = append(s, "Driver: "+fmt.Sprintf("%#v", this.Driver)+",\n") s = append(s, "ContainerDir: "+fmt.Sprintf("%#v", this.ContainerDir)+",\n") @@ -335,6 +453,9 @@ func (this *VolumeMount) GoString() string { if this.Shared != nil { s = append(s, "Shared: "+fmt.Sprintf("%#v", this.Shared)+",\n") } + if this.Dedicated != nil { + s = append(s, "Dedicated: "+fmt.Sprintf("%#v", this.Dedicated)+",\n") + } s = append(s, "}") return strings.Join(s, "") } @@ -393,6 +514,50 @@ func (m *SharedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DedicatedDevice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DedicatedDevice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DedicatedDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DeviceConfig) > 0 { + i -= len(m.DeviceConfig) + copy(dAtA[i:], m.DeviceConfig) + i = encodeVarintVolumeMount(dAtA, i, uint64(len(m.DeviceConfig))) + i-- + dAtA[i] = 0x1a + } + if len(m.MountConfig) > 0 { + i -= len(m.MountConfig) + copy(dAtA[i:], m.MountConfig) + i = encodeVarintVolumeMount(dAtA, i, uint64(len(m.MountConfig))) + i-- + dAtA[i] = 0x12 + } + if len(m.MounterId) > 0 { + i -= len(m.MounterId) + copy(dAtA[i:], m.MounterId) + i = encodeVarintVolumeMount(dAtA, i, uint64(len(m.MounterId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *VolumeMount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -413,6 +578,18 @@ func (m *VolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Dedicated != nil { + { + size, err := m.Dedicated.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVolumeMount(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if m.Shared != nil { { size, err := m.Shared.MarshalToSizedBuffer(dAtA[:i]) @@ -509,6 +686,27 @@ func (m *SharedDevice) Size() (n int) { return n } +func (m *DedicatedDevice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.MounterId) + if l > 0 { + n += 1 + l + sovVolumeMount(uint64(l)) + } + l = len(m.MountConfig) + if l > 0 { + n += 1 + l + sovVolumeMount(uint64(l)) + } + l = len(m.DeviceConfig) + if l > 0 { + n += 1 + l + sovVolumeMount(uint64(l)) + } + return n +} + func (m *VolumeMount) Size() (n int) { if m == nil { return 0 @@ -531,6 +729,10 @@ func (m *VolumeMount) Size() (n int) { l = m.Shared.Size() n += 1 + l + sovVolumeMount(uint64(l)) } + if m.Dedicated != nil { + l = m.Dedicated.Size() + n += 1 + l + sovVolumeMount(uint64(l)) + } return n } @@ -566,6 +768,18 @@ func (this *SharedDevice) String() string { }, "") return s } +func (this *DedicatedDevice) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DedicatedDevice{`, + `MounterId:` + fmt.Sprintf("%v", this.MounterId) + `,`, + `MountConfig:` + fmt.Sprintf("%v", this.MountConfig) + `,`, + `DeviceConfig:` + fmt.Sprintf("%v", this.DeviceConfig) + `,`, + `}`, + }, "") + return s +} func (this *VolumeMount) String() string { if this == nil { return "nil" @@ -575,6 +789,7 @@ func (this *VolumeMount) String() string { `ContainerDir:` + fmt.Sprintf("%v", this.ContainerDir) + `,`, `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, `Shared:` + strings.Replace(this.Shared.String(), "SharedDevice", "SharedDevice", 1) + `,`, + `Dedicated:` + strings.Replace(this.Dedicated.String(), "DedicatedDevice", "DedicatedDevice", 1) + `,`, `}`, }, "") return s @@ -711,6 +926,152 @@ func (m *SharedDevice) Unmarshal(dAtA []byte) error { } return nil } +func (m *DedicatedDevice) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVolumeMount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DedicatedDevice: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DedicatedDevice: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MounterId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVolumeMount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVolumeMount + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVolumeMount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MounterId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MountConfig", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVolumeMount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVolumeMount + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVolumeMount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MountConfig = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfig", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVolumeMount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthVolumeMount + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthVolumeMount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceConfig = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVolumeMount(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVolumeMount + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VolumeMount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -872,6 +1233,42 @@ func (m *VolumeMount) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dedicated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVolumeMount + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVolumeMount + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVolumeMount + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dedicated == nil { + m.Dedicated = &DedicatedDevice{} + } + if err := m.Dedicated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipVolumeMount(dAtA[iNdEx:]) diff --git a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.proto b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.proto index 3139b87e..6735127c 100644 --- a/vendor/code.cloudfoundry.org/bbs/models/volume_mount.proto +++ b/vendor/code.cloudfoundry.org/bbs/models/volume_mount.proto @@ -11,6 +11,12 @@ message SharedDevice { string mount_config = 2 [(gogoproto.jsontag) = "mount_config"]; } +message DedicatedDevice { + string mounter_id = 1 [(gogoproto.jsontag) = "mounter_id"]; + string mount_config = 2 [(gogoproto.jsontag) = "mount_config"]; + string device_config = 3 [(gogoproto.jsontag) = "device_config"]; +} + message VolumeMount { reserved 2, 4, 5; @@ -20,6 +26,7 @@ message VolumeMount { // oneof device { SharedDevice shared = 7 [(gogoproto.jsontag) = "shared"]; + DedicatedDevice dedicated = 8 [(gogoproto.jsontag) = "dedicated"]; // } } diff --git a/vendor/code.cloudfoundry.org/cfhttp/v2/.gitignore b/vendor/code.cloudfoundry.org/cfhttp/v2/.gitignore new file mode 100644 index 00000000..9ed3b07c --- /dev/null +++ b/vendor/code.cloudfoundry.org/cfhttp/v2/.gitignore @@ -0,0 +1 @@ +*.test diff --git a/vendor/code.cloudfoundry.org/cfhttp/v2/CODEOWNERS b/vendor/code.cloudfoundry.org/cfhttp/v2/CODEOWNERS new file mode 100644 index 00000000..6a633c7e --- /dev/null +++ b/vendor/code.cloudfoundry.org/cfhttp/v2/CODEOWNERS @@ -0,0 +1 @@ +* @cloudfoundry/wg-app-runtime-platform-diego-approvers diff --git a/vendor/code.cloudfoundry.org/cfhttp/v2/NOTICE b/vendor/code.cloudfoundry.org/cfhttp/v2/NOTICE new file mode 100644 index 00000000..3c8dd5b6 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cfhttp/v2/NOTICE @@ -0,0 +1,20 @@ +Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. + +This project contains software that is Copyright (c) 2014-2015 Pivotal Software, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +This project may include a number of subcomponents with separate +copyright notices and license terms. Your use of these subcomponents +is subject to the terms and conditions of each subcomponent's license, +as noted in the LICENSE file. diff --git a/vendor/code.cloudfoundry.org/cfhttp/v2/README.md b/vendor/code.cloudfoundry.org/cfhttp/v2/README.md new file mode 100644 index 00000000..9f820001 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cfhttp/v2/README.md @@ -0,0 +1,30 @@ +# cfhttp + +[![Go Report +Card](https://goreportcard.com/badge/code.cloudfoundry.org/cfhttp)](https://goreportcard.com/report/code.cloudfoundry.org/cfhttp) +[![Go +Reference](https://pkg.go.dev/badge/code.cloudfoundry.org/cfhttp.svg)](https://pkg.go.dev/code.cloudfoundry.org/cfhttp) + +Wrapper for official go http package + +> \[!NOTE\] +> +> This repository should be imported as +> `code.cloudfoundry.org/cfhttp/v2`. + +# Contributing + +See the [Contributing.md](./.github/CONTRIBUTING.md) for more +information on how to contribute. + +# Working Group Charter + +This repository is maintained by [App Runtime +Platform](https://github.com/cloudfoundry/community/blob/main/toc/working-groups/app-runtime-platform.md) +under `Diego` area. + +> \[!IMPORTANT\] +> +> Content in this file is managed by the [CI task +> `sync-readme`](https://github.com/cloudfoundry/wg-app-platform-runtime-ci/blob/main/shared/tasks/sync-readme/metadata.yml) +> and is generated by CI following a convention. diff --git a/vendor/code.cloudfoundry.org/cfhttp/v2/staticcheck.conf b/vendor/code.cloudfoundry.org/cfhttp/v2/staticcheck.conf new file mode 100644 index 00000000..eba7af74 --- /dev/null +++ b/vendor/code.cloudfoundry.org/cfhttp/v2/staticcheck.conf @@ -0,0 +1 @@ +checks = ["all", "-ST1008","-ST1005","-ST1001","-ST1012","-ST1000","-ST1003","-ST1016","-ST1020","-ST1021","-ST1022"] diff --git a/vendor/code.cloudfoundry.org/locket/cmd/locket/testrunner/runner.go b/vendor/code.cloudfoundry.org/locket/cmd/locket/testrunner/runner.go index ef3e1422..e338de72 100644 --- a/vendor/code.cloudfoundry.org/locket/cmd/locket/testrunner/runner.go +++ b/vendor/code.cloudfoundry.org/locket/cmd/locket/testrunner/runner.go @@ -13,7 +13,7 @@ import ( "code.cloudfoundry.org/locket/cmd/locket/certauthority" "code.cloudfoundry.org/locket/cmd/locket/config" "code.cloudfoundry.org/tlsconfig" - . "github.com/onsi/gomega" + "github.com/onsi/gomega" ginkgomon "github.com/tedsuo/ifrit/ginkgomon_v2" ) @@ -56,14 +56,14 @@ func NewLocketRunner(locketBinPath string, fs ...func(cfg *config.LocketConfig)) } locketConfig, err := os.CreateTemp("", "locket-config") - Expect(err).NotTo(HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) locketConfigFilePath := locketConfig.Name() encoder := json.NewEncoder(locketConfig) err = encoder.Encode(cfg) - Expect(err).NotTo(HaveOccurred()) - Expect(locketConfig.Close()).To(Succeed()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(locketConfig.Close()).To(gomega.Succeed()) return ginkgomon.New(ginkgomon.Config{ Name: "locket", @@ -72,7 +72,7 @@ func NewLocketRunner(locketBinPath string, fs ...func(cfg *config.LocketConfig)) Command: exec.Command(locketBinPath, "-config="+locketConfigFilePath), Cleanup: func() { err := os.RemoveAll(locketConfigFilePath) - Expect(err).NotTo(HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) }, }) } @@ -82,7 +82,7 @@ func LocketClientTLSConfig() *tls.Config { tlsconfig.WithInternalServiceDefaults(), tlsconfig.WithIdentityFromFile(certFile, keyFile), ).Client(tlsconfig.WithAuthorityFromFile(caCertFile)) - Expect(err).NotTo(HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) return tlsConfig } diff --git a/vendor/github.com/vito/go-sse/sse/event.go b/vendor/github.com/vito/go-sse/sse/event.go index 396a2079..09cc3d25 100644 --- a/vendor/github.com/vito/go-sse/sse/event.go +++ b/vendor/github.com/vito/go-sse/sse/event.go @@ -2,11 +2,22 @@ package sse import ( "bytes" - "fmt" "io" + "strconv" "time" ) +// Define byte slice constants used in encoding/writing +var ( + idPrefix = []byte("id: ") + eventPrefix = []byte("event: ") + retryPrefix = []byte("retry: ") + dataPrefix = []byte("data: ") + emptyData = []byte("data") + newline = []byte("\n") +) + +// Event represents a Server-Sent Event type Event struct { ID string Name string @@ -15,57 +26,104 @@ type Event struct { } func (event Event) Encode() string { - enc := fmt.Sprintf("id: %s\nevent: %s\n", event.ID, event.Name) + // Make an educated capacity estimate + capacity := 8 + len(event.ID) + 8 + len(event.Name) + 20 + dataLines := bytes.Count(event.Data, newline) + 1 + capacity += len(event.Data) + (dataLines * 7) + + var buf bytes.Buffer + buf.Grow(capacity) + + // Use the pre-defined constants + buf.Write(idPrefix) + buf.WriteString(event.ID) + buf.Write(newline) + + buf.Write(eventPrefix) + buf.WriteString(event.Name) + buf.Write(newline) if event.Retry != 0 { - enc += fmt.Sprintf("retry: %d\n", event.Retry/1000/1000) + buf.Write(retryPrefix) + buf.WriteString(strconv.FormatInt(int64(event.Retry/1000/1000), 10)) + buf.Write(newline) } for _, line := range bytes.Split(event.Data, []byte("\n")) { if len(line) == 0 { - enc += "data\n" + buf.Write(emptyData) } else { - enc += fmt.Sprintf("data: %s\n", line) + buf.Write(dataPrefix) + buf.Write(line) } + buf.Write(newline) } - enc += "\n" + buf.Write(newline) - return enc + return buf.String() } func (event Event) Write(destination io.Writer) error { - _, err := fmt.Fprintf(destination, "id: %s\n", event.ID) - if err != nil { + // Write id + if _, err := destination.Write(idPrefix); err != nil { + return err + } + if _, err := destination.Write([]byte(event.ID)); err != nil { + return err + } + if _, err := destination.Write(newline); err != nil { return err } - _, err = fmt.Fprintf(destination, "event: %s\n", event.Name) - if err != nil { + // Write event + if _, err := destination.Write(eventPrefix); err != nil { + return err + } + if _, err := destination.Write([]byte(event.Name)); err != nil { + return err + } + if _, err := destination.Write(newline); err != nil { return err } + // Write retry if present if event.Retry != 0 { - _, err = fmt.Fprintf(destination, "retry: %d\n", event.Retry/1000/1000) - if err != nil { + if _, err := destination.Write(retryPrefix); err != nil { + return err + } + + retryValue := strconv.FormatInt(int64(event.Retry/1000/1000), 10) + if _, err := destination.Write([]byte(retryValue)); err != nil { + return err + } + + if _, err := destination.Write(newline); err != nil { return err } } + // Write data lines for _, line := range bytes.Split(event.Data, []byte("\n")) { - var err error - if len(line) == 0 { - _, err = fmt.Fprintf(destination, "data\n") + if _, err := destination.Write(emptyData); err != nil { + return err + } } else { - _, err = fmt.Fprintf(destination, "data: %s\n", line) + if _, err := destination.Write(dataPrefix); err != nil { + return err + } + if _, err := destination.Write(line); err != nil { + return err + } } - if err != nil { + if _, err := destination.Write(newline); err != nil { return err } } - _, err = fmt.Fprintf(destination, "\n") + // Final newline + _, err := destination.Write(newline) return err } diff --git a/vendor/github.com/vito/go-sse/sse/event_source.go b/vendor/github.com/vito/go-sse/sse/event_source.go index 04e0abf3..faba5441 100644 --- a/vendor/github.com/vito/go-sse/sse/event_source.go +++ b/vendor/github.com/vito/go-sse/sse/event_source.go @@ -8,14 +8,6 @@ import ( "time" ) -type BadResponseError struct { - Response *http.Response -} - -func (err BadResponseError) Error() string { - return fmt.Sprintf("bad response from event source: %s", err.Response.Status) -} - // EventSource behaves like the EventSource interface from the Server-Sent // Events spec implemented in many browsers. See // http://www.w3.org/TR/eventsource/#the-eventsource-interface for details. @@ -36,7 +28,7 @@ func (err BadResponseError) Error() string { // If an EOF is received, Next() returns io.EOF, and subsequent calls to Next() // will return early. To read new events, Connect() must be called. type EventSource struct { - client *http.Client + client Doer createRequest func() *http.Request currentReadCloser *ReadCloser @@ -50,13 +42,25 @@ type EventSource struct { maxRetries uint16 } +type Doer interface { + Do(*http.Request) (*http.Response, error) +} + +type BadResponseError struct { + Response *http.Response +} + +func (err BadResponseError) Error() string { + return fmt.Sprintf("bad response from event source: %s", err.Response.Status) +} + type RetryParams struct { RetryInterval time.Duration MaxRetries uint16 } type Config struct { - Client *http.Client + Client Doer RetryParams RetryParams RequestCreator func() *http.Request } @@ -78,14 +82,14 @@ func (c *Config) Connect() (*EventSource, error) { return source, nil } -func NewEventSource(client *http.Client, defaultRetryInterval time.Duration, requestCreator func() *http.Request) *EventSource { +func NewEventSource(client Doer, defaultRetryInterval time.Duration, requestCreator func() *http.Request) *EventSource { retryParams := RetryParams{ RetryInterval: defaultRetryInterval, } return createEventSource(client, retryParams, requestCreator) } -func createEventSource(client *http.Client, retryParams RetryParams, requestCreator func() *http.Request) *EventSource { +func createEventSource(client Doer, retryParams RetryParams, requestCreator func() *http.Request) *EventSource { return &EventSource{ client: client, createRequest: requestCreator, @@ -97,7 +101,7 @@ func createEventSource(client *http.Client, retryParams RetryParams, requestCrea } } -func Connect(client *http.Client, defaultRetryInterval time.Duration, requestCreator func() *http.Request) (*EventSource, error) { +func Connect(client Doer, defaultRetryInterval time.Duration, requestCreator func() *http.Request) (*EventSource, error) { source := NewEventSource(client, defaultRetryInterval, requestCreator) readCloser, err := source.establishConnection() @@ -204,7 +208,13 @@ func (source *EventSource) establishConnection() (*ReadCloser, error) { for { req := source.createRequest() - req.Header.Set("Last-Event-ID", source.lastEventID) + if req.Header == nil { + req.Header = http.Header{} + } + + if source.lastEventID != "" { + req.Header.Set("Last-Event-ID", source.lastEventID) + } res, err := source.client.Do(req) if err != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 7ceb6dcd..d9dd2e78 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,28 +1,30 @@ -# code.cloudfoundry.org/bbs v0.0.0-20251029140956-4e01df8b0ac1 -## explicit +# code.cloudfoundry.org/bbs v1.3.0 +## explicit; go 1.26.0 code.cloudfoundry.org/bbs code.cloudfoundry.org/bbs/encryption code.cloudfoundry.org/bbs/events code.cloudfoundry.org/bbs/events/eventfakes code.cloudfoundry.org/bbs/fake_bbs code.cloudfoundry.org/bbs/format +code.cloudfoundry.org/bbs/trace +# code.cloudfoundry.org/bbs/models v0.0.0-20260618205254-dc4b9f8d5bc9 +## explicit; go 1.26.0 code.cloudfoundry.org/bbs/models code.cloudfoundry.org/bbs/models/test/model_helpers -code.cloudfoundry.org/bbs/trace -# code.cloudfoundry.org/cfhttp/v2 v2.0.1-0.20210513172332-4c5ee488a657 -## explicit +# code.cloudfoundry.org/cfhttp/v2 v2.82.0 +## explicit; go 1.25.0 code.cloudfoundry.org/cfhttp/v2 # code.cloudfoundry.org/clock v1.75.0 ## explicit; go 1.25.0 code.cloudfoundry.org/clock -# code.cloudfoundry.org/debugserver v0.101.0 +# code.cloudfoundry.org/debugserver v0.102.0 ## explicit; go 1.25.0 code.cloudfoundry.org/debugserver # code.cloudfoundry.org/diego-logging-client v0.112.0 ## explicit; go 1.25.8 code.cloudfoundry.org/diego-logging-client code.cloudfoundry.org/diego-logging-client/testhelpers -# code.cloudfoundry.org/durationjson v0.76.0 +# code.cloudfoundry.org/durationjson v0.77.0 ## explicit; go 1.25.0 code.cloudfoundry.org/durationjson # code.cloudfoundry.org/go-diodes v0.0.0-20260615142411-472d6bcdb3c6 @@ -32,7 +34,7 @@ code.cloudfoundry.org/go-diodes ## explicit; go 1.21 code.cloudfoundry.org/go-loggregator/v9 code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2 -# code.cloudfoundry.org/lager/v3 v3.73.0 +# code.cloudfoundry.org/lager/v3 v3.74.0 ## explicit; go 1.25.0 code.cloudfoundry.org/lager/v3 code.cloudfoundry.org/lager/v3/internal/truncate @@ -42,8 +44,8 @@ code.cloudfoundry.org/lager/v3/lagertest # code.cloudfoundry.org/localip v0.75.0 ## explicit; go 1.25.0 code.cloudfoundry.org/localip -# code.cloudfoundry.org/locket v0.1.0 -## explicit; go 1.26 +# code.cloudfoundry.org/locket v1.1.0 +## explicit; go 1.26.0 code.cloudfoundry.org/locket code.cloudfoundry.org/locket/cmd/locket/certauthority code.cloudfoundry.org/locket/cmd/locket/config @@ -53,7 +55,7 @@ code.cloudfoundry.org/locket/models # code.cloudfoundry.org/runtimeschema v0.0.0-20240514235758-31be7684c5bf ## explicit; go 1.20 code.cloudfoundry.org/runtimeschema/cc_messages -# code.cloudfoundry.org/tlsconfig v0.59.0 +# code.cloudfoundry.org/tlsconfig v0.60.0 ## explicit; go 1.25.8 code.cloudfoundry.org/tlsconfig # code.cloudfoundry.org/workpool v0.0.0-20250911194158-1489753f182e @@ -194,10 +196,10 @@ github.com/tedsuo/ifrit/sigmon # github.com/tedsuo/rata v1.0.0 ## explicit github.com/tedsuo/rata -# github.com/vito/go-sse v1.0.0 -## explicit; go 1.12 +# github.com/vito/go-sse v1.1.3 +## explicit; go 1.24 github.com/vito/go-sse/sse -# go.step.sm/crypto v0.82.0 +# go.step.sm/crypto v0.83.0 ## explicit; go 1.25.8 go.step.sm/crypto/fingerprint go.step.sm/crypto/internal/bcrypt_pbkdf @@ -295,7 +297,7 @@ golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# google.golang.org/genproto/googleapis/rpc v0.0.0-20260615183401-62b3387ff324 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3 ## explicit; go 1.25.0 google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.81.1