diff --git a/src/go.mod b/src/go.mod index 33eb762c..bf4f48d1 100644 --- a/src/go.mod +++ b/src/go.mod @@ -5,23 +5,22 @@ go 1.18 require ( code.cloudfoundry.org/go-batching v0.0.0-20171020220229-924d2a9b48ac code.cloudfoundry.org/go-envstruct v1.5.0 - code.cloudfoundry.org/go-loggregator v0.0.0-20190813173818-049b6bf8152a + code.cloudfoundry.org/go-loggregator/v9 v9.0.2 code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3 - github.com/golang/protobuf v1.5.2 github.com/onsi/ginkgo/v2 v2.1.3 github.com/onsi/gomega v1.19.0 github.com/prometheus/client_golang v1.12.2 github.com/shirou/gopsutil/v3 v3.22.5 - golang.org/x/net v0.0.0-20220225172249-27dd8689420f google.golang.org/grpc v1.48.0 + google.golang.org/protobuf v1.28.0 ) require ( - code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/kr/pretty v0.2.0 // indirect github.com/kr/text v0.2.0 // indirect @@ -35,10 +34,10 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e // indirect + golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect - google.golang.org/protobuf v1.27.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/src/go.sum b/src/go.sum index 8fa3c434..5c42ca68 100644 --- a/src/go.sum +++ b/src/go.sum @@ -32,14 +32,10 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.cloudfoundry.org/go-batching v0.0.0-20171020220229-924d2a9b48ac h1:xxDMYFJzjtfMzyGBT378227SZQtDgNiJfj0r+57jZLQ= code.cloudfoundry.org/go-batching v0.0.0-20171020220229-924d2a9b48ac/go.mod h1:/zp4l05TWSkpl4TPXddd6H9mKZpgcoHeBZK4tIxFWUE= -code.cloudfoundry.org/go-diodes v0.0.0-20180905200951-72629b5276e3/go.mod h1:Jzi+ccHgo/V/PLQUaQ6hnZcC1c4BS790gx21LRRui4g= code.cloudfoundry.org/go-envstruct v1.5.0 h1:GmDS5Kbckkoxy39JGRwD/13jO1OROqf69B2vy4WBv/k= code.cloudfoundry.org/go-envstruct v1.5.0/go.mod h1:E2S/gzRZpZ51PZnIv7Bo7QvcgH18yio19upkrRk0xLU= -code.cloudfoundry.org/go-loggregator v0.0.0-20190813173818-049b6bf8152a h1:OQna3GDyBRifiMC0hp/6l03VPtnepsEhBRMb15V9eq8= -code.cloudfoundry.org/go-loggregator v0.0.0-20190813173818-049b6bf8152a/go.mod h1:fYXv8qS6feR/OV1q5N1z/R70y0y4KHZgFSQ8GhWTN1M= -code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a h1:8rqv2w8xEceNwckcF5ONeRt0qBHlh5bnNfFnYTrZbxs= -code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8GtzBjySJ7USvxm4E36lNQw1D3xM6oKHGqdaAJ4= -code.cloudfoundry.org/tlsconfig v0.0.0-20190710180242-462f72de1106/go.mod h1:VxNwgI63VxUGfSR/F3VzjOpnWLbeH+AB1pQugK1i1bA= +code.cloudfoundry.org/go-loggregator/v9 v9.0.2 h1:6E1RJTeXy0K0WfWDJBxSBvsMMWsPVYMAZlbn8bPvr6A= +code.cloudfoundry.org/go-loggregator/v9 v9.0.2/go.mod h1:ZkXKbmi4Z7Ot7TS698AFNPCvMbTMPbWI3KPAcgk4sL0= code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3 h1:2Qal+q+tw/DmDOoJBWwDCPE3lIJNj/1o7oMkkb2c5SI= code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3/go.mod h1:eTbFJpyXRGuFVyg5+oaj9B2eIbIc+0/kZjH8ftbtdew= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -51,7 +47,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apoydence/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:bXvGk6IkT1Agy7qzJ+DjIw/SJ1AaB3AvAuMDVV+Vkoo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -64,10 +59,6 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudfoundry/dropsonde v1.0.0/go.mod h1:6zwvrWK5TpxBVYi1cdkE5WDsIO8E0n7qAJg3wR9B67c= -github.com/cloudfoundry/gosteno v0.0.0-20150423193413-0c8581caea35/go.mod h1:3YBPUR85RIrvaUTdA1dL38YSp6s3OHu1xrWLkGt2Mog= -github.com/cloudfoundry/loggregatorlib v0.0.0-20170823162133-36eddf15ef12/go.mod h1:ucj7+svyACshmxV3Zze2NAcEcdbBf9scZYR+QKCX9/w= -github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4/go.mod h1:GS0pCHd7onIsewbw8Ue9qa9pZPv2V88cUZDttK6KzgI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= @@ -103,7 +94,6 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -178,7 +168,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -192,7 +181,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -202,7 +190,6 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -226,7 +213,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/poy/eachers v0.0.0-20181020210610-23942921fe77/go.mod h1:x1vqpbcMW9T/KRcQ4b48diSiSVtYgvwQ5xzDByEg4WE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= @@ -239,14 +225,12 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= @@ -258,7 +242,6 @@ github.com/shirou/gopsutil/v3 v3.22.5/go.mod h1:so9G9VzeHt/hsd0YwqprnjHnfARAUkta github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/square/certstrap v1.1.2-0.20181030173000-b612375892a7/go.mod h1:1+xoDwJbjCv1e3erNygZ/sHwgq8dr8CgQB3M5mMI6ds= github.com/square/certstrap v1.2.0 h1:ecgyABrbFLr8jSbOC6oTBmBek0t/HqtgrMUZCPuyfdw= github.com/square/certstrap v1.2.0/go.mod h1:CUHqV+fxJW0Y5UQFnnbYwQ7bpKXO1AKbic9g73799yw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -388,7 +371,6 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -436,7 +418,6 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -477,8 +458,9 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e h1:4nW4NLDYnU28ojHaHO8OVxFHk/aQ33U01a9cjED+pzE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a h1:CB3a9Nez8M13wwlr/E2YtwoU+qYHKfC+JrDa45RXXoQ= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -537,7 +519,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 h1:PDIOdWxZ8eRizhKa1AAvY53xsvLB1cWorMjslvY3VA8= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= @@ -565,8 +546,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -593,7 +575,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/src/pkg/plumbing/batching/v2_envelope_batcher.go b/src/pkg/plumbing/batching/v2_envelope_batcher.go index e6bc4e42..3ce8effd 100644 --- a/src/pkg/plumbing/batching/v2_envelope_batcher.go +++ b/src/pkg/plumbing/batching/v2_envelope_batcher.go @@ -4,7 +4,7 @@ import ( "time" "code.cloudfoundry.org/go-batching" - "code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2" + "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" ) // V2EnvelopeBatcher batches slices of bytes. diff --git a/src/pkg/plumbing/batching/v2_envelope_batcher_test.go b/src/pkg/plumbing/batching/v2_envelope_batcher_test.go index 297da0ae..89b9def0 100644 --- a/src/pkg/plumbing/batching/v2_envelope_batcher_test.go +++ b/src/pkg/plumbing/batching/v2_envelope_batcher_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2" + "code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2" "code.cloudfoundry.org/system-metrics/pkg/plumbing/batching" ) diff --git a/src/pkg/plumbing/doppler.pb.go b/src/pkg/plumbing/doppler.pb.go new file mode 100644 index 00000000..eb9d8bd0 --- /dev/null +++ b/src/pkg/plumbing/doppler.pb.go @@ -0,0 +1,908 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.19.4 +// source: system-metrics-release/src/pkg/plumbing/doppler.proto + +package plumbing + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EnvelopeData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *EnvelopeData) Reset() { + *x = EnvelopeData{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvelopeData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvelopeData) ProtoMessage() {} + +func (x *EnvelopeData) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvelopeData.ProtoReflect.Descriptor instead. +func (*EnvelopeData) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{0} +} + +func (x *EnvelopeData) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type PushResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PushResponse) Reset() { + *x = PushResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushResponse) ProtoMessage() {} + +func (x *PushResponse) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushResponse.ProtoReflect.Descriptor instead. +func (*PushResponse) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{1} +} + +type SubscriptionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ShardID string `protobuf:"bytes,1,opt,name=shardID,proto3" json:"shardID,omitempty"` + Filter *Filter `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *SubscriptionRequest) Reset() { + *x = SubscriptionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubscriptionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscriptionRequest) ProtoMessage() {} + +func (x *SubscriptionRequest) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscriptionRequest.ProtoReflect.Descriptor instead. +func (*SubscriptionRequest) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{2} +} + +func (x *SubscriptionRequest) GetShardID() string { + if x != nil { + return x.ShardID + } + return "" +} + +func (x *SubscriptionRequest) GetFilter() *Filter { + if x != nil { + return x.Filter + } + return nil +} + +type Filter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` + // Types that are assignable to Message: + // *Filter_Log + // *Filter_Metric + Message isFilter_Message `protobuf_oneof:"Message"` +} + +func (x *Filter) Reset() { + *x = Filter{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Filter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Filter) ProtoMessage() {} + +func (x *Filter) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Filter.ProtoReflect.Descriptor instead. +func (*Filter) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{3} +} + +func (x *Filter) GetAppID() string { + if x != nil { + return x.AppID + } + return "" +} + +func (m *Filter) GetMessage() isFilter_Message { + if m != nil { + return m.Message + } + return nil +} + +func (x *Filter) GetLog() *LogFilter { + if x, ok := x.GetMessage().(*Filter_Log); ok { + return x.Log + } + return nil +} + +func (x *Filter) GetMetric() *MetricFilter { + if x, ok := x.GetMessage().(*Filter_Metric); ok { + return x.Metric + } + return nil +} + +type isFilter_Message interface { + isFilter_Message() +} + +type Filter_Log struct { + Log *LogFilter `protobuf:"bytes,2,opt,name=log,proto3,oneof"` +} + +type Filter_Metric struct { + Metric *MetricFilter `protobuf:"bytes,3,opt,name=metric,proto3,oneof"` +} + +func (*Filter_Log) isFilter_Message() {} + +func (*Filter_Metric) isFilter_Message() {} + +type LogFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LogFilter) Reset() { + *x = LogFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogFilter) ProtoMessage() {} + +func (x *LogFilter) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogFilter.ProtoReflect.Descriptor instead. +func (*LogFilter) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{4} +} + +type MetricFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MetricFilter) Reset() { + *x = MetricFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MetricFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MetricFilter) ProtoMessage() {} + +func (x *MetricFilter) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MetricFilter.ProtoReflect.Descriptor instead. +func (*MetricFilter) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{5} +} + +// Note: Ideally this would be EnvelopeData but for the time being we do not +// want to pay the cost of planning an upgrade path for this to be renamed. +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{6} +} + +func (x *Response) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +type BatchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *BatchResponse) Reset() { + *x = BatchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchResponse) ProtoMessage() {} + +func (x *BatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchResponse.ProtoReflect.Descriptor instead. +func (*BatchResponse) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{7} +} + +func (x *BatchResponse) GetPayload() [][]byte { + if x != nil { + return x.Payload + } + return nil +} + +type ContainerMetricsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` +} + +func (x *ContainerMetricsRequest) Reset() { + *x = ContainerMetricsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerMetricsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerMetricsRequest) ProtoMessage() {} + +func (x *ContainerMetricsRequest) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerMetricsRequest.ProtoReflect.Descriptor instead. +func (*ContainerMetricsRequest) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{8} +} + +func (x *ContainerMetricsRequest) GetAppID() string { + if x != nil { + return x.AppID + } + return "" +} + +type ContainerMetricsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *ContainerMetricsResponse) Reset() { + *x = ContainerMetricsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerMetricsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerMetricsResponse) ProtoMessage() {} + +func (x *ContainerMetricsResponse) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerMetricsResponse.ProtoReflect.Descriptor instead. +func (*ContainerMetricsResponse) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{9} +} + +func (x *ContainerMetricsResponse) GetPayload() [][]byte { + if x != nil { + return x.Payload + } + return nil +} + +type RecentLogsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AppID string `protobuf:"bytes,1,opt,name=appID,proto3" json:"appID,omitempty"` +} + +func (x *RecentLogsRequest) Reset() { + *x = RecentLogsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecentLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentLogsRequest) ProtoMessage() {} + +func (x *RecentLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecentLogsRequest.ProtoReflect.Descriptor instead. +func (*RecentLogsRequest) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{10} +} + +func (x *RecentLogsRequest) GetAppID() string { + if x != nil { + return x.AppID + } + return "" +} + +type RecentLogsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *RecentLogsResponse) Reset() { + *x = RecentLogsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecentLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecentLogsResponse) ProtoMessage() {} + +func (x *RecentLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RecentLogsResponse.ProtoReflect.Descriptor instead. +func (*RecentLogsResponse) Descriptor() ([]byte, []int) { + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP(), []int{11} +} + +func (x *RecentLogsResponse) GetPayload() [][]byte { + if x != nil { + return x.Payload + } + return nil +} + +var File_system_metrics_release_src_pkg_plumbing_doppler_proto protoreflect.FileDescriptor + +var file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x2d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2f, 0x64, 0x6f, 0x70, 0x70, 0x6c, 0x65, + 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, + 0x67, 0x22, 0x28, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x0e, 0x0a, 0x0c, 0x50, + 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x0a, 0x13, 0x53, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x44, 0x12, 0x28, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, + 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x84, 0x01, 0x0a, 0x06, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x12, 0x27, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, + 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, + 0x12, 0x30, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x42, 0x09, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0b, 0x0a, + 0x09, 0x4c, 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x0e, 0x0a, 0x0c, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x08, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0x29, 0x0a, 0x0d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x2f, 0x0a, 0x17, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x34, 0x0a, 0x18, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x29, 0x0a, 0x11, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x22, 0x2e, 0x0a, + 0x12, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x32, 0xc3, 0x02, + 0x0a, 0x07, 0x44, 0x6f, 0x70, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, + 0x67, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x4c, 0x0a, + 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, + 0x1d, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x5b, 0x0a, 0x10, 0x43, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, + 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x65, + 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, + 0x67, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x52, + 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x32, 0x4f, 0x0a, 0x0f, 0x44, 0x6f, 0x70, 0x70, 0x6c, 0x65, 0x72, 0x49, 0x6e, + 0x67, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x50, 0x75, 0x73, 0x68, 0x65, 0x72, + 0x12, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x6d, 0x62, + 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x2d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x70, 0x6b, 0x67, + 0x2f, 0x70, 0x6c, 0x75, 0x6d, 0x62, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescOnce sync.Once + file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescData = file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDesc +) + +func file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescGZIP() []byte { + file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescOnce.Do(func() { + file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescData = protoimpl.X.CompressGZIP(file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescData) + }) + return file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDescData +} + +var file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_system_metrics_release_src_pkg_plumbing_doppler_proto_goTypes = []interface{}{ + (*EnvelopeData)(nil), // 0: plumbing.EnvelopeData + (*PushResponse)(nil), // 1: plumbing.PushResponse + (*SubscriptionRequest)(nil), // 2: plumbing.SubscriptionRequest + (*Filter)(nil), // 3: plumbing.Filter + (*LogFilter)(nil), // 4: plumbing.LogFilter + (*MetricFilter)(nil), // 5: plumbing.MetricFilter + (*Response)(nil), // 6: plumbing.Response + (*BatchResponse)(nil), // 7: plumbing.BatchResponse + (*ContainerMetricsRequest)(nil), // 8: plumbing.ContainerMetricsRequest + (*ContainerMetricsResponse)(nil), // 9: plumbing.ContainerMetricsResponse + (*RecentLogsRequest)(nil), // 10: plumbing.RecentLogsRequest + (*RecentLogsResponse)(nil), // 11: plumbing.RecentLogsResponse +} +var file_system_metrics_release_src_pkg_plumbing_doppler_proto_depIdxs = []int32{ + 3, // 0: plumbing.SubscriptionRequest.filter:type_name -> plumbing.Filter + 4, // 1: plumbing.Filter.log:type_name -> plumbing.LogFilter + 5, // 2: plumbing.Filter.metric:type_name -> plumbing.MetricFilter + 2, // 3: plumbing.Doppler.Subscribe:input_type -> plumbing.SubscriptionRequest + 2, // 4: plumbing.Doppler.BatchSubscribe:input_type -> plumbing.SubscriptionRequest + 8, // 5: plumbing.Doppler.ContainerMetrics:input_type -> plumbing.ContainerMetricsRequest + 10, // 6: plumbing.Doppler.RecentLogs:input_type -> plumbing.RecentLogsRequest + 0, // 7: plumbing.DopplerIngestor.Pusher:input_type -> plumbing.EnvelopeData + 6, // 8: plumbing.Doppler.Subscribe:output_type -> plumbing.Response + 7, // 9: plumbing.Doppler.BatchSubscribe:output_type -> plumbing.BatchResponse + 9, // 10: plumbing.Doppler.ContainerMetrics:output_type -> plumbing.ContainerMetricsResponse + 11, // 11: plumbing.Doppler.RecentLogs:output_type -> plumbing.RecentLogsResponse + 1, // 12: plumbing.DopplerIngestor.Pusher:output_type -> plumbing.PushResponse + 8, // [8:13] is the sub-list for method output_type + 3, // [3:8] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_system_metrics_release_src_pkg_plumbing_doppler_proto_init() } +func file_system_metrics_release_src_pkg_plumbing_doppler_proto_init() { + if File_system_metrics_release_src_pkg_plumbing_doppler_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvelopeData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubscriptionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Filter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MetricFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerMetricsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerMetricsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecentLogsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecentLogsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Filter_Log)(nil), + (*Filter_Metric)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_system_metrics_release_src_pkg_plumbing_doppler_proto_goTypes, + DependencyIndexes: file_system_metrics_release_src_pkg_plumbing_doppler_proto_depIdxs, + MessageInfos: file_system_metrics_release_src_pkg_plumbing_doppler_proto_msgTypes, + }.Build() + File_system_metrics_release_src_pkg_plumbing_doppler_proto = out.File + file_system_metrics_release_src_pkg_plumbing_doppler_proto_rawDesc = nil + file_system_metrics_release_src_pkg_plumbing_doppler_proto_goTypes = nil + file_system_metrics_release_src_pkg_plumbing_doppler_proto_depIdxs = nil +} diff --git a/src/pkg/plumbing/grpc.proto b/src/pkg/plumbing/doppler.proto similarity index 94% rename from src/pkg/plumbing/grpc.proto rename to src/pkg/plumbing/doppler.proto index 0592790c..620db155 100644 --- a/src/pkg/plumbing/grpc.proto +++ b/src/pkg/plumbing/doppler.proto @@ -2,6 +2,8 @@ syntax = "proto3"; package plumbing; +option go_package = "code.cloudfoundry.org/system-metrics/pkg/plumbing"; + service Doppler { rpc Subscribe(SubscriptionRequest) returns (stream Response) {} rpc BatchSubscribe(SubscriptionRequest) returns (stream BatchResponse) {} diff --git a/src/pkg/plumbing/doppler_grpc.pb.go b/src/pkg/plumbing/doppler_grpc.pb.go new file mode 100644 index 00000000..579ad4ad --- /dev/null +++ b/src/pkg/plumbing/doppler_grpc.pb.go @@ -0,0 +1,388 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.19.4 +// source: system-metrics-release/src/pkg/plumbing/doppler.proto + +package plumbing + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// DopplerClient is the client API for Doppler service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DopplerClient interface { + Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_SubscribeClient, error) + BatchSubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_BatchSubscribeClient, error) + ContainerMetrics(ctx context.Context, in *ContainerMetricsRequest, opts ...grpc.CallOption) (*ContainerMetricsResponse, error) + RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) +} + +type dopplerClient struct { + cc grpc.ClientConnInterface +} + +func NewDopplerClient(cc grpc.ClientConnInterface) DopplerClient { + return &dopplerClient{cc} +} + +func (c *dopplerClient) Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_SubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &Doppler_ServiceDesc.Streams[0], "/plumbing.Doppler/Subscribe", opts...) + if err != nil { + return nil, err + } + x := &dopplerSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Doppler_SubscribeClient interface { + Recv() (*Response, error) + grpc.ClientStream +} + +type dopplerSubscribeClient struct { + grpc.ClientStream +} + +func (x *dopplerSubscribeClient) Recv() (*Response, error) { + m := new(Response) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *dopplerClient) BatchSubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_BatchSubscribeClient, error) { + stream, err := c.cc.NewStream(ctx, &Doppler_ServiceDesc.Streams[1], "/plumbing.Doppler/BatchSubscribe", opts...) + if err != nil { + return nil, err + } + x := &dopplerBatchSubscribeClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Doppler_BatchSubscribeClient interface { + Recv() (*BatchResponse, error) + grpc.ClientStream +} + +type dopplerBatchSubscribeClient struct { + grpc.ClientStream +} + +func (x *dopplerBatchSubscribeClient) Recv() (*BatchResponse, error) { + m := new(BatchResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *dopplerClient) ContainerMetrics(ctx context.Context, in *ContainerMetricsRequest, opts ...grpc.CallOption) (*ContainerMetricsResponse, error) { + out := new(ContainerMetricsResponse) + err := c.cc.Invoke(ctx, "/plumbing.Doppler/ContainerMetrics", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dopplerClient) RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) { + out := new(RecentLogsResponse) + err := c.cc.Invoke(ctx, "/plumbing.Doppler/RecentLogs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DopplerServer is the server API for Doppler service. +// All implementations must embed UnimplementedDopplerServer +// for forward compatibility +type DopplerServer interface { + Subscribe(*SubscriptionRequest, Doppler_SubscribeServer) error + BatchSubscribe(*SubscriptionRequest, Doppler_BatchSubscribeServer) error + ContainerMetrics(context.Context, *ContainerMetricsRequest) (*ContainerMetricsResponse, error) + RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) + mustEmbedUnimplementedDopplerServer() +} + +// UnimplementedDopplerServer must be embedded to have forward compatible implementations. +type UnimplementedDopplerServer struct { +} + +func (UnimplementedDopplerServer) Subscribe(*SubscriptionRequest, Doppler_SubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") +} +func (UnimplementedDopplerServer) BatchSubscribe(*SubscriptionRequest, Doppler_BatchSubscribeServer) error { + return status.Errorf(codes.Unimplemented, "method BatchSubscribe not implemented") +} +func (UnimplementedDopplerServer) ContainerMetrics(context.Context, *ContainerMetricsRequest) (*ContainerMetricsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ContainerMetrics not implemented") +} +func (UnimplementedDopplerServer) RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RecentLogs not implemented") +} +func (UnimplementedDopplerServer) mustEmbedUnimplementedDopplerServer() {} + +// UnsafeDopplerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DopplerServer will +// result in compilation errors. +type UnsafeDopplerServer interface { + mustEmbedUnimplementedDopplerServer() +} + +func RegisterDopplerServer(s grpc.ServiceRegistrar, srv DopplerServer) { + s.RegisterService(&Doppler_ServiceDesc, srv) +} + +func _Doppler_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscriptionRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DopplerServer).Subscribe(m, &dopplerSubscribeServer{stream}) +} + +type Doppler_SubscribeServer interface { + Send(*Response) error + grpc.ServerStream +} + +type dopplerSubscribeServer struct { + grpc.ServerStream +} + +func (x *dopplerSubscribeServer) Send(m *Response) error { + return x.ServerStream.SendMsg(m) +} + +func _Doppler_BatchSubscribe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SubscriptionRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(DopplerServer).BatchSubscribe(m, &dopplerBatchSubscribeServer{stream}) +} + +type Doppler_BatchSubscribeServer interface { + Send(*BatchResponse) error + grpc.ServerStream +} + +type dopplerBatchSubscribeServer struct { + grpc.ServerStream +} + +func (x *dopplerBatchSubscribeServer) Send(m *BatchResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Doppler_ContainerMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ContainerMetricsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DopplerServer).ContainerMetrics(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plumbing.Doppler/ContainerMetrics", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DopplerServer).ContainerMetrics(ctx, req.(*ContainerMetricsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Doppler_RecentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecentLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DopplerServer).RecentLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plumbing.Doppler/RecentLogs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DopplerServer).RecentLogs(ctx, req.(*RecentLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Doppler_ServiceDesc is the grpc.ServiceDesc for Doppler service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Doppler_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "plumbing.Doppler", + HandlerType: (*DopplerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ContainerMetrics", + Handler: _Doppler_ContainerMetrics_Handler, + }, + { + MethodName: "RecentLogs", + Handler: _Doppler_RecentLogs_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Subscribe", + Handler: _Doppler_Subscribe_Handler, + ServerStreams: true, + }, + { + StreamName: "BatchSubscribe", + Handler: _Doppler_BatchSubscribe_Handler, + ServerStreams: true, + }, + }, + Metadata: "system-metrics-release/src/pkg/plumbing/doppler.proto", +} + +// DopplerIngestorClient is the client API for DopplerIngestor service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type DopplerIngestorClient interface { + Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error) +} + +type dopplerIngestorClient struct { + cc grpc.ClientConnInterface +} + +func NewDopplerIngestorClient(cc grpc.ClientConnInterface) DopplerIngestorClient { + return &dopplerIngestorClient{cc} +} + +func (c *dopplerIngestorClient) Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error) { + stream, err := c.cc.NewStream(ctx, &DopplerIngestor_ServiceDesc.Streams[0], "/plumbing.DopplerIngestor/Pusher", opts...) + if err != nil { + return nil, err + } + x := &dopplerIngestorPusherClient{stream} + return x, nil +} + +type DopplerIngestor_PusherClient interface { + Send(*EnvelopeData) error + CloseAndRecv() (*PushResponse, error) + grpc.ClientStream +} + +type dopplerIngestorPusherClient struct { + grpc.ClientStream +} + +func (x *dopplerIngestorPusherClient) Send(m *EnvelopeData) error { + return x.ClientStream.SendMsg(m) +} + +func (x *dopplerIngestorPusherClient) CloseAndRecv() (*PushResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(PushResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// DopplerIngestorServer is the server API for DopplerIngestor service. +// All implementations must embed UnimplementedDopplerIngestorServer +// for forward compatibility +type DopplerIngestorServer interface { + Pusher(DopplerIngestor_PusherServer) error + mustEmbedUnimplementedDopplerIngestorServer() +} + +// UnimplementedDopplerIngestorServer must be embedded to have forward compatible implementations. +type UnimplementedDopplerIngestorServer struct { +} + +func (UnimplementedDopplerIngestorServer) Pusher(DopplerIngestor_PusherServer) error { + return status.Errorf(codes.Unimplemented, "method Pusher not implemented") +} +func (UnimplementedDopplerIngestorServer) mustEmbedUnimplementedDopplerIngestorServer() {} + +// UnsafeDopplerIngestorServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DopplerIngestorServer will +// result in compilation errors. +type UnsafeDopplerIngestorServer interface { + mustEmbedUnimplementedDopplerIngestorServer() +} + +func RegisterDopplerIngestorServer(s grpc.ServiceRegistrar, srv DopplerIngestorServer) { + s.RegisterService(&DopplerIngestor_ServiceDesc, srv) +} + +func _DopplerIngestor_Pusher_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(DopplerIngestorServer).Pusher(&dopplerIngestorPusherServer{stream}) +} + +type DopplerIngestor_PusherServer interface { + SendAndClose(*PushResponse) error + Recv() (*EnvelopeData, error) + grpc.ServerStream +} + +type dopplerIngestorPusherServer struct { + grpc.ServerStream +} + +func (x *dopplerIngestorPusherServer) SendAndClose(m *PushResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *dopplerIngestorPusherServer) Recv() (*EnvelopeData, error) { + m := new(EnvelopeData) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// DopplerIngestor_ServiceDesc is the grpc.ServiceDesc for DopplerIngestor service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DopplerIngestor_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "plumbing.DopplerIngestor", + HandlerType: (*DopplerIngestorServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Pusher", + Handler: _DopplerIngestor_Pusher_Handler, + ClientStreams: true, + }, + }, + Metadata: "system-metrics-release/src/pkg/plumbing/doppler.proto", +} diff --git a/src/pkg/plumbing/grpc.pb.go b/src/pkg/plumbing/grpc.pb.go deleted file mode 100644 index 07a60abd..00000000 --- a/src/pkg/plumbing/grpc.pb.go +++ /dev/null @@ -1,708 +0,0 @@ -// Code generated by protoc-gen-go. -// source: grpc.proto -// DO NOT EDIT! - -/* -Package plumbing is a generated protocol buffer package. - -It is generated from these files: - grpc.proto - -It has these top-level messages: - EnvelopeData - PushResponse - SubscriptionRequest - Filter - LogFilter - MetricFilter - Response - BatchResponse - ContainerMetricsRequest - ContainerMetricsResponse - RecentLogsRequest - RecentLogsResponse -*/ -package plumbing - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type EnvelopeData struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *EnvelopeData) Reset() { *m = EnvelopeData{} } -func (m *EnvelopeData) String() string { return proto.CompactTextString(m) } -func (*EnvelopeData) ProtoMessage() {} -func (*EnvelopeData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *EnvelopeData) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -type PushResponse struct { -} - -func (m *PushResponse) Reset() { *m = PushResponse{} } -func (m *PushResponse) String() string { return proto.CompactTextString(m) } -func (*PushResponse) ProtoMessage() {} -func (*PushResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -type SubscriptionRequest struct { - ShardID string `protobuf:"bytes,1,opt,name=shardID" json:"shardID,omitempty"` - Filter *Filter `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"` -} - -func (m *SubscriptionRequest) Reset() { *m = SubscriptionRequest{} } -func (m *SubscriptionRequest) String() string { return proto.CompactTextString(m) } -func (*SubscriptionRequest) ProtoMessage() {} -func (*SubscriptionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *SubscriptionRequest) GetShardID() string { - if m != nil { - return m.ShardID - } - return "" -} - -func (m *SubscriptionRequest) GetFilter() *Filter { - if m != nil { - return m.Filter - } - return nil -} - -type Filter struct { - AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"` - // Types that are valid to be assigned to Message: - // *Filter_Log - // *Filter_Metric - Message isFilter_Message `protobuf_oneof:"Message"` -} - -func (m *Filter) Reset() { *m = Filter{} } -func (m *Filter) String() string { return proto.CompactTextString(m) } -func (*Filter) ProtoMessage() {} -func (*Filter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -type isFilter_Message interface { - isFilter_Message() -} - -type Filter_Log struct { - Log *LogFilter `protobuf:"bytes,2,opt,name=log,oneof"` -} -type Filter_Metric struct { - Metric *MetricFilter `protobuf:"bytes,3,opt,name=metric,oneof"` -} - -func (*Filter_Log) isFilter_Message() {} -func (*Filter_Metric) isFilter_Message() {} - -func (m *Filter) GetMessage() isFilter_Message { - if m != nil { - return m.Message - } - return nil -} - -func (m *Filter) GetAppID() string { - if m != nil { - return m.AppID - } - return "" -} - -func (m *Filter) GetLog() *LogFilter { - if x, ok := m.GetMessage().(*Filter_Log); ok { - return x.Log - } - return nil -} - -func (m *Filter) GetMetric() *MetricFilter { - if x, ok := m.GetMessage().(*Filter_Metric); ok { - return x.Metric - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Filter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Filter_OneofMarshaler, _Filter_OneofUnmarshaler, _Filter_OneofSizer, []interface{}{ - (*Filter_Log)(nil), - (*Filter_Metric)(nil), - } -} - -func _Filter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Filter) - // Message - switch x := m.Message.(type) { - case *Filter_Log: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Log); err != nil { - return err - } - case *Filter_Metric: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Metric); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Filter.Message has unexpected type %T", x) - } - return nil -} - -func _Filter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Filter) - switch tag { - case 2: // Message.log - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(LogFilter) - err := b.DecodeMessage(msg) - m.Message = &Filter_Log{msg} - return true, err - case 3: // Message.metric - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MetricFilter) - err := b.DecodeMessage(msg) - m.Message = &Filter_Metric{msg} - return true, err - default: - return false, nil - } -} - -func _Filter_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Filter) - // Message - switch x := m.Message.(type) { - case *Filter_Log: - s := proto.Size(x.Log) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Filter_Metric: - s := proto.Size(x.Metric) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type LogFilter struct { -} - -func (m *LogFilter) Reset() { *m = LogFilter{} } -func (m *LogFilter) String() string { return proto.CompactTextString(m) } -func (*LogFilter) ProtoMessage() {} -func (*LogFilter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -type MetricFilter struct { -} - -func (m *MetricFilter) Reset() { *m = MetricFilter{} } -func (m *MetricFilter) String() string { return proto.CompactTextString(m) } -func (*MetricFilter) ProtoMessage() {} -func (*MetricFilter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -// Note: Ideally this would be EnvelopeData but for the time being we do not -// want to pay the cost of planning an upgrade path for this to be renamed. -type Response struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *Response) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -type BatchResponse struct { - Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *BatchResponse) Reset() { *m = BatchResponse{} } -func (m *BatchResponse) String() string { return proto.CompactTextString(m) } -func (*BatchResponse) ProtoMessage() {} -func (*BatchResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *BatchResponse) GetPayload() [][]byte { - if m != nil { - return m.Payload - } - return nil -} - -type ContainerMetricsRequest struct { - AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"` -} - -func (m *ContainerMetricsRequest) Reset() { *m = ContainerMetricsRequest{} } -func (m *ContainerMetricsRequest) String() string { return proto.CompactTextString(m) } -func (*ContainerMetricsRequest) ProtoMessage() {} -func (*ContainerMetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *ContainerMetricsRequest) GetAppID() string { - if m != nil { - return m.AppID - } - return "" -} - -type ContainerMetricsResponse struct { - Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *ContainerMetricsResponse) Reset() { *m = ContainerMetricsResponse{} } -func (m *ContainerMetricsResponse) String() string { return proto.CompactTextString(m) } -func (*ContainerMetricsResponse) ProtoMessage() {} -func (*ContainerMetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *ContainerMetricsResponse) GetPayload() [][]byte { - if m != nil { - return m.Payload - } - return nil -} - -type RecentLogsRequest struct { - AppID string `protobuf:"bytes,1,opt,name=appID" json:"appID,omitempty"` -} - -func (m *RecentLogsRequest) Reset() { *m = RecentLogsRequest{} } -func (m *RecentLogsRequest) String() string { return proto.CompactTextString(m) } -func (*RecentLogsRequest) ProtoMessage() {} -func (*RecentLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -func (m *RecentLogsRequest) GetAppID() string { - if m != nil { - return m.AppID - } - return "" -} - -type RecentLogsResponse struct { - Payload [][]byte `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *RecentLogsResponse) Reset() { *m = RecentLogsResponse{} } -func (m *RecentLogsResponse) String() string { return proto.CompactTextString(m) } -func (*RecentLogsResponse) ProtoMessage() {} -func (*RecentLogsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -func (m *RecentLogsResponse) GetPayload() [][]byte { - if m != nil { - return m.Payload - } - return nil -} - -func init() { - proto.RegisterType((*EnvelopeData)(nil), "plumbing.EnvelopeData") - proto.RegisterType((*PushResponse)(nil), "plumbing.PushResponse") - proto.RegisterType((*SubscriptionRequest)(nil), "plumbing.SubscriptionRequest") - proto.RegisterType((*Filter)(nil), "plumbing.Filter") - proto.RegisterType((*LogFilter)(nil), "plumbing.LogFilter") - proto.RegisterType((*MetricFilter)(nil), "plumbing.MetricFilter") - proto.RegisterType((*Response)(nil), "plumbing.Response") - proto.RegisterType((*BatchResponse)(nil), "plumbing.BatchResponse") - proto.RegisterType((*ContainerMetricsRequest)(nil), "plumbing.ContainerMetricsRequest") - proto.RegisterType((*ContainerMetricsResponse)(nil), "plumbing.ContainerMetricsResponse") - proto.RegisterType((*RecentLogsRequest)(nil), "plumbing.RecentLogsRequest") - proto.RegisterType((*RecentLogsResponse)(nil), "plumbing.RecentLogsResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// Client API for Doppler service - -type DopplerClient interface { - Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_SubscribeClient, error) - BatchSubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_BatchSubscribeClient, error) - ContainerMetrics(ctx context.Context, in *ContainerMetricsRequest, opts ...grpc.CallOption) (*ContainerMetricsResponse, error) - RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) -} - -type dopplerClient struct { - cc *grpc.ClientConn -} - -func NewDopplerClient(cc *grpc.ClientConn) DopplerClient { - return &dopplerClient{cc} -} - -func (c *dopplerClient) Subscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_SubscribeClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Doppler_serviceDesc.Streams[0], c.cc, "/plumbing.Doppler/Subscribe", opts...) - if err != nil { - return nil, err - } - x := &dopplerSubscribeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Doppler_SubscribeClient interface { - Recv() (*Response, error) - grpc.ClientStream -} - -type dopplerSubscribeClient struct { - grpc.ClientStream -} - -func (x *dopplerSubscribeClient) Recv() (*Response, error) { - m := new(Response) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *dopplerClient) BatchSubscribe(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (Doppler_BatchSubscribeClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Doppler_serviceDesc.Streams[1], c.cc, "/plumbing.Doppler/BatchSubscribe", opts...) - if err != nil { - return nil, err - } - x := &dopplerBatchSubscribeClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Doppler_BatchSubscribeClient interface { - Recv() (*BatchResponse, error) - grpc.ClientStream -} - -type dopplerBatchSubscribeClient struct { - grpc.ClientStream -} - -func (x *dopplerBatchSubscribeClient) Recv() (*BatchResponse, error) { - m := new(BatchResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *dopplerClient) ContainerMetrics(ctx context.Context, in *ContainerMetricsRequest, opts ...grpc.CallOption) (*ContainerMetricsResponse, error) { - out := new(ContainerMetricsResponse) - err := grpc.Invoke(ctx, "/plumbing.Doppler/ContainerMetrics", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dopplerClient) RecentLogs(ctx context.Context, in *RecentLogsRequest, opts ...grpc.CallOption) (*RecentLogsResponse, error) { - out := new(RecentLogsResponse) - err := grpc.Invoke(ctx, "/plumbing.Doppler/RecentLogs", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for Doppler service - -type DopplerServer interface { - Subscribe(*SubscriptionRequest, Doppler_SubscribeServer) error - BatchSubscribe(*SubscriptionRequest, Doppler_BatchSubscribeServer) error - ContainerMetrics(context.Context, *ContainerMetricsRequest) (*ContainerMetricsResponse, error) - RecentLogs(context.Context, *RecentLogsRequest) (*RecentLogsResponse, error) -} - -func RegisterDopplerServer(s *grpc.Server, srv DopplerServer) { - s.RegisterService(&_Doppler_serviceDesc, srv) -} - -func _Doppler_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SubscriptionRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(DopplerServer).Subscribe(m, &dopplerSubscribeServer{stream}) -} - -type Doppler_SubscribeServer interface { - Send(*Response) error - grpc.ServerStream -} - -type dopplerSubscribeServer struct { - grpc.ServerStream -} - -func (x *dopplerSubscribeServer) Send(m *Response) error { - return x.ServerStream.SendMsg(m) -} - -func _Doppler_BatchSubscribe_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SubscriptionRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(DopplerServer).BatchSubscribe(m, &dopplerBatchSubscribeServer{stream}) -} - -type Doppler_BatchSubscribeServer interface { - Send(*BatchResponse) error - grpc.ServerStream -} - -type dopplerBatchSubscribeServer struct { - grpc.ServerStream -} - -func (x *dopplerBatchSubscribeServer) Send(m *BatchResponse) error { - return x.ServerStream.SendMsg(m) -} - -func _Doppler_ContainerMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ContainerMetricsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DopplerServer).ContainerMetrics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/plumbing.Doppler/ContainerMetrics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DopplerServer).ContainerMetrics(ctx, req.(*ContainerMetricsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Doppler_RecentLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecentLogsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DopplerServer).RecentLogs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/plumbing.Doppler/RecentLogs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DopplerServer).RecentLogs(ctx, req.(*RecentLogsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Doppler_serviceDesc = grpc.ServiceDesc{ - ServiceName: "plumbing.Doppler", - HandlerType: (*DopplerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ContainerMetrics", - Handler: _Doppler_ContainerMetrics_Handler, - }, - { - MethodName: "RecentLogs", - Handler: _Doppler_RecentLogs_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Subscribe", - Handler: _Doppler_Subscribe_Handler, - ServerStreams: true, - }, - { - StreamName: "BatchSubscribe", - Handler: _Doppler_BatchSubscribe_Handler, - ServerStreams: true, - }, - }, - Metadata: "grpc.proto", -} - -// Client API for DopplerIngestor service - -type DopplerIngestorClient interface { - Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error) -} - -type dopplerIngestorClient struct { - cc *grpc.ClientConn -} - -func NewDopplerIngestorClient(cc *grpc.ClientConn) DopplerIngestorClient { - return &dopplerIngestorClient{cc} -} - -func (c *dopplerIngestorClient) Pusher(ctx context.Context, opts ...grpc.CallOption) (DopplerIngestor_PusherClient, error) { - stream, err := grpc.NewClientStream(ctx, &_DopplerIngestor_serviceDesc.Streams[0], c.cc, "/plumbing.DopplerIngestor/Pusher", opts...) - if err != nil { - return nil, err - } - x := &dopplerIngestorPusherClient{stream} - return x, nil -} - -type DopplerIngestor_PusherClient interface { - Send(*EnvelopeData) error - CloseAndRecv() (*PushResponse, error) - grpc.ClientStream -} - -type dopplerIngestorPusherClient struct { - grpc.ClientStream -} - -func (x *dopplerIngestorPusherClient) Send(m *EnvelopeData) error { - return x.ClientStream.SendMsg(m) -} - -func (x *dopplerIngestorPusherClient) CloseAndRecv() (*PushResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(PushResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// Server API for DopplerIngestor service - -type DopplerIngestorServer interface { - Pusher(DopplerIngestor_PusherServer) error -} - -func RegisterDopplerIngestorServer(s *grpc.Server, srv DopplerIngestorServer) { - s.RegisterService(&_DopplerIngestor_serviceDesc, srv) -} - -func _DopplerIngestor_Pusher_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DopplerIngestorServer).Pusher(&dopplerIngestorPusherServer{stream}) -} - -type DopplerIngestor_PusherServer interface { - SendAndClose(*PushResponse) error - Recv() (*EnvelopeData, error) - grpc.ServerStream -} - -type dopplerIngestorPusherServer struct { - grpc.ServerStream -} - -func (x *dopplerIngestorPusherServer) SendAndClose(m *PushResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *dopplerIngestorPusherServer) Recv() (*EnvelopeData, error) { - m := new(EnvelopeData) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _DopplerIngestor_serviceDesc = grpc.ServiceDesc{ - ServiceName: "plumbing.DopplerIngestor", - HandlerType: (*DopplerIngestorServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Pusher", - Handler: _DopplerIngestor_Pusher_Handler, - ClientStreams: true, - }, - }, - Metadata: "grpc.proto", -} - -func init() { proto.RegisterFile("grpc.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 427 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xe3, 0x46, 0x38, 0xcd, 0x34, 0x94, 0x32, 0x45, 0xd4, 0x0a, 0x20, 0x95, 0x15, 0x12, - 0xee, 0xc5, 0x54, 0x81, 0x23, 0xa7, 0x10, 0x10, 0x91, 0x52, 0x81, 0xcc, 0x09, 0x71, 0x5a, 0xbb, - 0x83, 0x63, 0xc9, 0xdd, 0x5d, 0x76, 0xd7, 0x48, 0xdc, 0x79, 0x33, 0x5e, 0x0c, 0xf9, 0xbf, 0x5b, - 0x4c, 0xd3, 0xe3, 0xcc, 0x7c, 0xf3, 0xcd, 0xee, 0x4f, 0x33, 0x00, 0x89, 0x56, 0x71, 0xa0, 0xb4, - 0xb4, 0x12, 0xf7, 0x55, 0x96, 0x5f, 0x45, 0xa9, 0x48, 0x98, 0x0f, 0xb3, 0xf7, 0xe2, 0x27, 0x65, - 0x52, 0xd1, 0x8a, 0x5b, 0x8e, 0x1e, 0x4c, 0x14, 0xff, 0x95, 0x49, 0x7e, 0xe9, 0x39, 0xa7, 0x8e, - 0x3f, 0x0b, 0x9b, 0x90, 0x1d, 0xc2, 0xec, 0x73, 0x6e, 0xb6, 0x21, 0x19, 0x25, 0x85, 0x21, 0xf6, - 0x15, 0x8e, 0xbf, 0xe4, 0x91, 0x89, 0x75, 0xaa, 0x6c, 0x2a, 0x45, 0x48, 0x3f, 0x72, 0x32, 0xb6, - 0x30, 0x30, 0x5b, 0xae, 0x2f, 0xd7, 0xab, 0xd2, 0x60, 0x1a, 0x36, 0x21, 0xfa, 0xe0, 0x7e, 0x4f, - 0x33, 0x4b, 0xda, 0xdb, 0x3b, 0x75, 0xfc, 0x83, 0xc5, 0x51, 0xd0, 0xbc, 0x22, 0xf8, 0x50, 0xe6, - 0xc3, 0xba, 0xce, 0x7e, 0x3b, 0xe0, 0x56, 0x29, 0x7c, 0x04, 0xf7, 0xb8, 0x52, 0xad, 0x59, 0x15, - 0xe0, 0x4b, 0x18, 0x67, 0x32, 0xa9, 0x7d, 0x8e, 0x3b, 0x9f, 0x8d, 0x4c, 0xaa, 0xbe, 0x8f, 0xa3, - 0xb0, 0x50, 0xe0, 0x39, 0xb8, 0x57, 0x64, 0x75, 0x1a, 0x7b, 0xe3, 0x52, 0xfb, 0xb8, 0xd3, 0x5e, - 0x94, 0xf9, 0x56, 0x5e, 0xeb, 0x96, 0x53, 0x98, 0x5c, 0x90, 0x31, 0x3c, 0x21, 0x76, 0x00, 0xd3, - 0xd6, 0xb0, 0xf8, 0x7e, 0xbf, 0x83, 0xbd, 0x80, 0xfd, 0x06, 0xc5, 0x2d, 0xd0, 0xce, 0xe0, 0xfe, - 0x92, 0xdb, 0x78, 0x3b, 0x2c, 0x1d, 0xf7, 0xa5, 0xaf, 0xe0, 0xe4, 0x9d, 0x14, 0x96, 0xa7, 0x82, - 0x74, 0x35, 0xc9, 0x34, 0x4c, 0x07, 0x21, 0xb0, 0x37, 0xe0, 0xfd, 0xdb, 0xb0, 0x73, 0xcc, 0x19, - 0x3c, 0x0c, 0x29, 0x26, 0x61, 0x37, 0x32, 0xd9, 0x31, 0x20, 0x00, 0xec, 0x4b, 0x77, 0x59, 0x2f, - 0xfe, 0xec, 0xc1, 0x64, 0x25, 0x95, 0xca, 0x48, 0xe3, 0x12, 0xa6, 0xf5, 0x76, 0x44, 0x84, 0xcf, - 0x3a, 0xea, 0x03, 0x2b, 0x33, 0xc7, 0xae, 0xdc, 0x6e, 0xd7, 0xe8, 0xdc, 0xc1, 0x0d, 0x1c, 0x96, - 0xf0, 0xee, 0x6c, 0x74, 0xd2, 0x95, 0xaf, 0x51, 0x2f, 0xdd, 0xbe, 0xc1, 0xd1, 0x4d, 0x5c, 0xf8, - 0xbc, 0x6b, 0xf8, 0x0f, 0xfb, 0x39, 0xbb, 0x4d, 0xd2, 0xd8, 0xe3, 0x1a, 0xa0, 0x43, 0x85, 0x4f, - 0xfa, 0x1f, 0xba, 0xc1, 0x7a, 0xfe, 0x74, 0xb8, 0xd8, 0x58, 0x2d, 0x3e, 0xc1, 0x83, 0x1a, 0xe2, - 0x5a, 0x24, 0x64, 0xac, 0xd4, 0xf8, 0x16, 0xdc, 0xe2, 0xf4, 0x48, 0x63, 0x6f, 0x7f, 0xfb, 0x67, - 0x3b, 0xef, 0xe5, 0xaf, 0x1d, 0xe9, 0xc8, 0x77, 0x22, 0xb7, 0xbc, 0xf9, 0xd7, 0x7f, 0x03, 0x00, - 0x00, 0xff, 0xff, 0x92, 0x34, 0x48, 0xe2, 0x01, 0x04, 0x00, 0x00, -} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/egress.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/egress.pb.go deleted file mode 100644 index 21aa90c5..00000000 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/egress.pb.go +++ /dev/null @@ -1,828 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: egress.proto - -package loggregator_v2 - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type EgressRequest struct { - // shard_id instructs Loggregator to shard envelopes between other - // subscriptions with the same shard_id. Loggregator will do its best to - // split the load evenly between subscriptions with the same shard_id - // (unless deterministic_name is set). - ShardId string `protobuf:"bytes,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` - // deterministic_name is used to enable deterministic routing. This implies - // that gauges and counters are routed based on name. If this is excluded, - // then they are routed to split load evenly. - DeterministicName string `protobuf:"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3" json:"deterministic_name,omitempty"` - // TODO: This can be removed once selector has been around long enough. - LegacySelector *Selector `protobuf:"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3" json:"legacy_selector,omitempty"` - // selector is the preferred (over legacy_selector) mechanism to select - // what envelope types the subscription wants. If there are no selectors - // given, no data will be sent. - Selectors []*Selector `protobuf:"bytes,4,rep,name=selectors,proto3" json:"selectors,omitempty"` - // TODO: This can be removed once the envelope.deprecated_tags is removed. - UsePreferredTags bool `protobuf:"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3" json:"use_preferred_tags,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EgressRequest) Reset() { *m = EgressRequest{} } -func (m *EgressRequest) String() string { return proto.CompactTextString(m) } -func (*EgressRequest) ProtoMessage() {} -func (*EgressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{0} -} -func (m *EgressRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EgressRequest.Unmarshal(m, b) -} -func (m *EgressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EgressRequest.Marshal(b, m, deterministic) -} -func (dst *EgressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EgressRequest.Merge(dst, src) -} -func (m *EgressRequest) XXX_Size() int { - return xxx_messageInfo_EgressRequest.Size(m) -} -func (m *EgressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EgressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EgressRequest proto.InternalMessageInfo - -func (m *EgressRequest) GetShardId() string { - if m != nil { - return m.ShardId - } - return "" -} - -func (m *EgressRequest) GetDeterministicName() string { - if m != nil { - return m.DeterministicName - } - return "" -} - -func (m *EgressRequest) GetLegacySelector() *Selector { - if m != nil { - return m.LegacySelector - } - return nil -} - -func (m *EgressRequest) GetSelectors() []*Selector { - if m != nil { - return m.Selectors - } - return nil -} - -func (m *EgressRequest) GetUsePreferredTags() bool { - if m != nil { - return m.UsePreferredTags - } - return false -} - -type EgressBatchRequest struct { - // shard_id instructs Loggregator to shard envelopes between other - // subscriptions with the same shard_id. Loggregator will do its best to - // split the load evenly between subscriptions with the same shard_id - // (unless deterministic_name is set). - ShardId string `protobuf:"bytes,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` - // deterministic_name is used to enable deterministic routing. This implies - // that gauges and counters are routed based on name. If this is excluded, - // then they are routed to split load evenly. - DeterministicName string `protobuf:"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3" json:"deterministic_name,omitempty"` - // TODO: This can be removed once selector has been around long enough. - LegacySelector *Selector `protobuf:"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3" json:"legacy_selector,omitempty"` - // selector is the preferred (over legacy_selector) mechanism to select - // what envelope types the subscription wants. If there are no selectors - // given, no data will be sent. - Selectors []*Selector `protobuf:"bytes,4,rep,name=selectors,proto3" json:"selectors,omitempty"` - // TODO: This can be removed once the envelope.deprecated_tags is removed. - UsePreferredTags bool `protobuf:"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3" json:"use_preferred_tags,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EgressBatchRequest) Reset() { *m = EgressBatchRequest{} } -func (m *EgressBatchRequest) String() string { return proto.CompactTextString(m) } -func (*EgressBatchRequest) ProtoMessage() {} -func (*EgressBatchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{1} -} -func (m *EgressBatchRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EgressBatchRequest.Unmarshal(m, b) -} -func (m *EgressBatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EgressBatchRequest.Marshal(b, m, deterministic) -} -func (dst *EgressBatchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EgressBatchRequest.Merge(dst, src) -} -func (m *EgressBatchRequest) XXX_Size() int { - return xxx_messageInfo_EgressBatchRequest.Size(m) -} -func (m *EgressBatchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EgressBatchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_EgressBatchRequest proto.InternalMessageInfo - -func (m *EgressBatchRequest) GetShardId() string { - if m != nil { - return m.ShardId - } - return "" -} - -func (m *EgressBatchRequest) GetDeterministicName() string { - if m != nil { - return m.DeterministicName - } - return "" -} - -func (m *EgressBatchRequest) GetLegacySelector() *Selector { - if m != nil { - return m.LegacySelector - } - return nil -} - -func (m *EgressBatchRequest) GetSelectors() []*Selector { - if m != nil { - return m.Selectors - } - return nil -} - -func (m *EgressBatchRequest) GetUsePreferredTags() bool { - if m != nil { - return m.UsePreferredTags - } - return false -} - -// Selector instructs Loggregator to only send envelopes that match the given -// criteria. -type Selector struct { - SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` - // Types that are valid to be assigned to Message: - // *Selector_Log - // *Selector_Counter - // *Selector_Gauge - // *Selector_Timer - // *Selector_Event - Message isSelector_Message `protobuf_oneof:"Message"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Selector) Reset() { *m = Selector{} } -func (m *Selector) String() string { return proto.CompactTextString(m) } -func (*Selector) ProtoMessage() {} -func (*Selector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{2} -} -func (m *Selector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Selector.Unmarshal(m, b) -} -func (m *Selector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Selector.Marshal(b, m, deterministic) -} -func (dst *Selector) XXX_Merge(src proto.Message) { - xxx_messageInfo_Selector.Merge(dst, src) -} -func (m *Selector) XXX_Size() int { - return xxx_messageInfo_Selector.Size(m) -} -func (m *Selector) XXX_DiscardUnknown() { - xxx_messageInfo_Selector.DiscardUnknown(m) -} - -var xxx_messageInfo_Selector proto.InternalMessageInfo - -func (m *Selector) GetSourceId() string { - if m != nil { - return m.SourceId - } - return "" -} - -type isSelector_Message interface { - isSelector_Message() -} - -type Selector_Log struct { - Log *LogSelector `protobuf:"bytes,2,opt,name=log,proto3,oneof"` -} - -type Selector_Counter struct { - Counter *CounterSelector `protobuf:"bytes,3,opt,name=counter,proto3,oneof"` -} - -type Selector_Gauge struct { - Gauge *GaugeSelector `protobuf:"bytes,4,opt,name=gauge,proto3,oneof"` -} - -type Selector_Timer struct { - Timer *TimerSelector `protobuf:"bytes,5,opt,name=timer,proto3,oneof"` -} - -type Selector_Event struct { - Event *EventSelector `protobuf:"bytes,6,opt,name=event,proto3,oneof"` -} - -func (*Selector_Log) isSelector_Message() {} - -func (*Selector_Counter) isSelector_Message() {} - -func (*Selector_Gauge) isSelector_Message() {} - -func (*Selector_Timer) isSelector_Message() {} - -func (*Selector_Event) isSelector_Message() {} - -func (m *Selector) GetMessage() isSelector_Message { - if m != nil { - return m.Message - } - return nil -} - -func (m *Selector) GetLog() *LogSelector { - if x, ok := m.GetMessage().(*Selector_Log); ok { - return x.Log - } - return nil -} - -func (m *Selector) GetCounter() *CounterSelector { - if x, ok := m.GetMessage().(*Selector_Counter); ok { - return x.Counter - } - return nil -} - -func (m *Selector) GetGauge() *GaugeSelector { - if x, ok := m.GetMessage().(*Selector_Gauge); ok { - return x.Gauge - } - return nil -} - -func (m *Selector) GetTimer() *TimerSelector { - if x, ok := m.GetMessage().(*Selector_Timer); ok { - return x.Timer - } - return nil -} - -func (m *Selector) GetEvent() *EventSelector { - if x, ok := m.GetMessage().(*Selector_Event); ok { - return x.Event - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Selector) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Selector_OneofMarshaler, _Selector_OneofUnmarshaler, _Selector_OneofSizer, []interface{}{ - (*Selector_Log)(nil), - (*Selector_Counter)(nil), - (*Selector_Gauge)(nil), - (*Selector_Timer)(nil), - (*Selector_Event)(nil), - } -} - -func _Selector_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Selector) - // Message - switch x := m.Message.(type) { - case *Selector_Log: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Log); err != nil { - return err - } - case *Selector_Counter: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Counter); err != nil { - return err - } - case *Selector_Gauge: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Gauge); err != nil { - return err - } - case *Selector_Timer: - b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timer); err != nil { - return err - } - case *Selector_Event: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Event); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Selector.Message has unexpected type %T", x) - } - return nil -} - -func _Selector_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Selector) - switch tag { - case 2: // Message.log - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(LogSelector) - err := b.DecodeMessage(msg) - m.Message = &Selector_Log{msg} - return true, err - case 3: // Message.counter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(CounterSelector) - err := b.DecodeMessage(msg) - m.Message = &Selector_Counter{msg} - return true, err - case 4: // Message.gauge - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GaugeSelector) - err := b.DecodeMessage(msg) - m.Message = &Selector_Gauge{msg} - return true, err - case 5: // Message.timer - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TimerSelector) - err := b.DecodeMessage(msg) - m.Message = &Selector_Timer{msg} - return true, err - case 6: // Message.event - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(EventSelector) - err := b.DecodeMessage(msg) - m.Message = &Selector_Event{msg} - return true, err - default: - return false, nil - } -} - -func _Selector_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Selector) - // Message - switch x := m.Message.(type) { - case *Selector_Log: - s := proto.Size(x.Log) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Selector_Counter: - s := proto.Size(x.Counter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Selector_Gauge: - s := proto.Size(x.Gauge) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Selector_Timer: - s := proto.Size(x.Timer) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Selector_Event: - s := proto.Size(x.Event) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// LogSelector instructs Loggregator to egress Log envelopes to the given -// subscription. -type LogSelector struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LogSelector) Reset() { *m = LogSelector{} } -func (m *LogSelector) String() string { return proto.CompactTextString(m) } -func (*LogSelector) ProtoMessage() {} -func (*LogSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{3} -} -func (m *LogSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LogSelector.Unmarshal(m, b) -} -func (m *LogSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LogSelector.Marshal(b, m, deterministic) -} -func (dst *LogSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogSelector.Merge(dst, src) -} -func (m *LogSelector) XXX_Size() int { - return xxx_messageInfo_LogSelector.Size(m) -} -func (m *LogSelector) XXX_DiscardUnknown() { - xxx_messageInfo_LogSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_LogSelector proto.InternalMessageInfo - -// GaugeSelector instructs Loggregator to egress Gauge envelopes to the -// given subscription. -type GaugeSelector struct { - // Any egress Gauge envelope must consist of the given names. - Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GaugeSelector) Reset() { *m = GaugeSelector{} } -func (m *GaugeSelector) String() string { return proto.CompactTextString(m) } -func (*GaugeSelector) ProtoMessage() {} -func (*GaugeSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{4} -} -func (m *GaugeSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GaugeSelector.Unmarshal(m, b) -} -func (m *GaugeSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GaugeSelector.Marshal(b, m, deterministic) -} -func (dst *GaugeSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_GaugeSelector.Merge(dst, src) -} -func (m *GaugeSelector) XXX_Size() int { - return xxx_messageInfo_GaugeSelector.Size(m) -} -func (m *GaugeSelector) XXX_DiscardUnknown() { - xxx_messageInfo_GaugeSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_GaugeSelector proto.InternalMessageInfo - -func (m *GaugeSelector) GetNames() []string { - if m != nil { - return m.Names - } - return nil -} - -// CounterSelector instructs Loggregator to egress Counter envelopes to the -// given subscription -type CounterSelector struct { - // Any egress Counter envelope must have the given name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CounterSelector) Reset() { *m = CounterSelector{} } -func (m *CounterSelector) String() string { return proto.CompactTextString(m) } -func (*CounterSelector) ProtoMessage() {} -func (*CounterSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{5} -} -func (m *CounterSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CounterSelector.Unmarshal(m, b) -} -func (m *CounterSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CounterSelector.Marshal(b, m, deterministic) -} -func (dst *CounterSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_CounterSelector.Merge(dst, src) -} -func (m *CounterSelector) XXX_Size() int { - return xxx_messageInfo_CounterSelector.Size(m) -} -func (m *CounterSelector) XXX_DiscardUnknown() { - xxx_messageInfo_CounterSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_CounterSelector proto.InternalMessageInfo - -func (m *CounterSelector) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// TimerSelector instructs Loggregator to egress Timer envelopes to the given -// subscription. -type TimerSelector struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TimerSelector) Reset() { *m = TimerSelector{} } -func (m *TimerSelector) String() string { return proto.CompactTextString(m) } -func (*TimerSelector) ProtoMessage() {} -func (*TimerSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{6} -} -func (m *TimerSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TimerSelector.Unmarshal(m, b) -} -func (m *TimerSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TimerSelector.Marshal(b, m, deterministic) -} -func (dst *TimerSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimerSelector.Merge(dst, src) -} -func (m *TimerSelector) XXX_Size() int { - return xxx_messageInfo_TimerSelector.Size(m) -} -func (m *TimerSelector) XXX_DiscardUnknown() { - xxx_messageInfo_TimerSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_TimerSelector proto.InternalMessageInfo - -// EventSelector instructs Loggregator to egress Event envelopes to the given -// subscription. -type EventSelector struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EventSelector) Reset() { *m = EventSelector{} } -func (m *EventSelector) String() string { return proto.CompactTextString(m) } -func (*EventSelector) ProtoMessage() {} -func (*EventSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_egress_fcae6bb65dce0d2e, []int{7} -} -func (m *EventSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EventSelector.Unmarshal(m, b) -} -func (m *EventSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EventSelector.Marshal(b, m, deterministic) -} -func (dst *EventSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSelector.Merge(dst, src) -} -func (m *EventSelector) XXX_Size() int { - return xxx_messageInfo_EventSelector.Size(m) -} -func (m *EventSelector) XXX_DiscardUnknown() { - xxx_messageInfo_EventSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_EventSelector proto.InternalMessageInfo - -func init() { - proto.RegisterType((*EgressRequest)(nil), "loggregator.v2.EgressRequest") - proto.RegisterType((*EgressBatchRequest)(nil), "loggregator.v2.EgressBatchRequest") - proto.RegisterType((*Selector)(nil), "loggregator.v2.Selector") - proto.RegisterType((*LogSelector)(nil), "loggregator.v2.LogSelector") - proto.RegisterType((*GaugeSelector)(nil), "loggregator.v2.GaugeSelector") - proto.RegisterType((*CounterSelector)(nil), "loggregator.v2.CounterSelector") - proto.RegisterType((*TimerSelector)(nil), "loggregator.v2.TimerSelector") - proto.RegisterType((*EventSelector)(nil), "loggregator.v2.EventSelector") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// EgressClient is the client API for Egress service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EgressClient interface { - Receiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error) - BatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error) -} - -type egressClient struct { - cc *grpc.ClientConn -} - -func NewEgressClient(cc *grpc.ClientConn) EgressClient { - return &egressClient{cc} -} - -func (c *egressClient) Receiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error) { - stream, err := c.cc.NewStream(ctx, &_Egress_serviceDesc.Streams[0], "/loggregator.v2.Egress/Receiver", opts...) - if err != nil { - return nil, err - } - x := &egressReceiverClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Egress_ReceiverClient interface { - Recv() (*Envelope, error) - grpc.ClientStream -} - -type egressReceiverClient struct { - grpc.ClientStream -} - -func (x *egressReceiverClient) Recv() (*Envelope, error) { - m := new(Envelope) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *egressClient) BatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error) { - stream, err := c.cc.NewStream(ctx, &_Egress_serviceDesc.Streams[1], "/loggregator.v2.Egress/BatchedReceiver", opts...) - if err != nil { - return nil, err - } - x := &egressBatchedReceiverClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Egress_BatchedReceiverClient interface { - Recv() (*EnvelopeBatch, error) - grpc.ClientStream -} - -type egressBatchedReceiverClient struct { - grpc.ClientStream -} - -func (x *egressBatchedReceiverClient) Recv() (*EnvelopeBatch, error) { - m := new(EnvelopeBatch) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// EgressServer is the server API for Egress service. -type EgressServer interface { - Receiver(*EgressRequest, Egress_ReceiverServer) error - BatchedReceiver(*EgressBatchRequest, Egress_BatchedReceiverServer) error -} - -func RegisterEgressServer(s *grpc.Server, srv EgressServer) { - s.RegisterService(&_Egress_serviceDesc, srv) -} - -func _Egress_Receiver_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(EgressRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(EgressServer).Receiver(m, &egressReceiverServer{stream}) -} - -type Egress_ReceiverServer interface { - Send(*Envelope) error - grpc.ServerStream -} - -type egressReceiverServer struct { - grpc.ServerStream -} - -func (x *egressReceiverServer) Send(m *Envelope) error { - return x.ServerStream.SendMsg(m) -} - -func _Egress_BatchedReceiver_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(EgressBatchRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(EgressServer).BatchedReceiver(m, &egressBatchedReceiverServer{stream}) -} - -type Egress_BatchedReceiverServer interface { - Send(*EnvelopeBatch) error - grpc.ServerStream -} - -type egressBatchedReceiverServer struct { - grpc.ServerStream -} - -func (x *egressBatchedReceiverServer) Send(m *EnvelopeBatch) error { - return x.ServerStream.SendMsg(m) -} - -var _Egress_serviceDesc = grpc.ServiceDesc{ - ServiceName: "loggregator.v2.Egress", - HandlerType: (*EgressServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Receiver", - Handler: _Egress_Receiver_Handler, - ServerStreams: true, - }, - { - StreamName: "BatchedReceiver", - Handler: _Egress_BatchedReceiver_Handler, - ServerStreams: true, - }, - }, - Metadata: "egress.proto", -} - -func init() { proto.RegisterFile("egress.proto", fileDescriptor_egress_fcae6bb65dce0d2e) } - -var fileDescriptor_egress_fcae6bb65dce0d2e = []byte{ - // 502 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xeb, 0xfc, 0xb5, 0x27, 0xbf, 0x24, 0xbf, 0xae, 0x38, 0x98, 0x54, 0x55, 0x2d, 0x4b, - 0x95, 0x72, 0x00, 0x83, 0xc2, 0x9f, 0x0b, 0x27, 0x82, 0xa2, 0x52, 0xa9, 0x20, 0x64, 0x7a, 0xe0, - 0x66, 0x2d, 0xf6, 0x74, 0x6b, 0xc9, 0xf1, 0x86, 0xdd, 0x75, 0xa4, 0x5e, 0xb9, 0xf0, 0x30, 0x3c, - 0x07, 0xef, 0x85, 0xbc, 0x1b, 0x37, 0xb6, 0x1b, 0x78, 0x01, 0x6e, 0x9e, 0xfd, 0x7e, 0x3f, 0xb3, - 0xb3, 0xe3, 0xd9, 0x85, 0xff, 0x90, 0x09, 0x94, 0x32, 0xd8, 0x08, 0xae, 0x38, 0x99, 0x64, 0x9c, - 0x31, 0x81, 0x8c, 0x2a, 0x2e, 0x82, 0xed, 0x62, 0x36, 0xc1, 0x7c, 0x8b, 0x19, 0xdf, 0xa0, 0xd1, - 0xfd, 0xef, 0x1d, 0x18, 0xaf, 0x34, 0x10, 0xe2, 0xb7, 0x02, 0xa5, 0x22, 0x8f, 0xc1, 0x96, 0xb7, - 0x54, 0x24, 0x51, 0x9a, 0xb8, 0x96, 0x67, 0xcd, 0x9d, 0x70, 0xa8, 0xe3, 0xcb, 0x84, 0x3c, 0x05, - 0x92, 0xa0, 0x42, 0xb1, 0x4e, 0xf3, 0x54, 0xaa, 0x34, 0x8e, 0x72, 0xba, 0x46, 0xb7, 0xaf, 0x4d, - 0xc7, 0x0d, 0xe5, 0x23, 0x5d, 0x23, 0x79, 0x0b, 0xd3, 0x0c, 0x19, 0x8d, 0xef, 0x22, 0x89, 0x19, - 0xc6, 0x8a, 0x0b, 0xb7, 0xe3, 0x59, 0xf3, 0xd1, 0xc2, 0x0d, 0x9a, 0x55, 0x05, 0x9f, 0x77, 0x7a, - 0x38, 0x31, 0x40, 0x15, 0x93, 0xd7, 0xe0, 0x54, 0xac, 0x74, 0x7b, 0x5e, 0xf7, 0xaf, 0xf0, 0xde, - 0x4a, 0x9e, 0x00, 0x29, 0x24, 0x46, 0x1b, 0x81, 0x37, 0x28, 0x04, 0x26, 0x91, 0xa2, 0x4c, 0xba, - 0x5d, 0xcf, 0x9a, 0xdb, 0xe1, 0xff, 0x85, 0xc4, 0x4f, 0x95, 0x70, 0x4d, 0x99, 0xf4, 0x7f, 0x74, - 0x80, 0x98, 0x26, 0x2c, 0xa9, 0x8a, 0x6f, 0xff, 0xe1, 0x4e, 0xfc, 0xea, 0x80, 0x7d, 0xbf, 0xe5, - 0x09, 0x38, 0x92, 0x17, 0x22, 0xc6, 0x7d, 0x03, 0x6c, 0xb3, 0x70, 0x99, 0x90, 0x67, 0xd0, 0xcd, - 0x38, 0xdb, 0x1d, 0xe3, 0xa4, 0x5d, 0xc9, 0x15, 0x67, 0x55, 0x9a, 0xf7, 0x47, 0x61, 0xe9, 0x24, - 0x6f, 0x60, 0x18, 0xf3, 0x22, 0x57, 0x28, 0xf4, 0xee, 0xa3, 0xc5, 0x59, 0x1b, 0x7a, 0x67, 0xe4, - 0x1a, 0x58, 0x11, 0xe4, 0x15, 0xf4, 0x19, 0x2d, 0x18, 0xba, 0x3d, 0x8d, 0x9e, 0xb6, 0xd1, 0x8b, - 0x52, 0xac, 0x81, 0xc6, 0x5d, 0x62, 0x2a, 0x5d, 0xa3, 0xd0, 0x7f, 0xe6, 0x00, 0x76, 0x5d, 0x8a, - 0x75, 0x4c, 0xbb, 0x4b, 0x0c, 0xb7, 0x98, 0x2b, 0x77, 0x70, 0x18, 0x5b, 0x95, 0x62, 0x1d, 0xd3, - 0xee, 0xa5, 0x03, 0xc3, 0x0f, 0x28, 0x25, 0x65, 0xe8, 0x8f, 0x61, 0x54, 0x6b, 0x81, 0x7f, 0x0e, - 0xe3, 0x46, 0x85, 0xe4, 0x11, 0xf4, 0xcb, 0x89, 0x91, 0xae, 0xe5, 0x75, 0xe7, 0x4e, 0x68, 0x02, - 0xff, 0x1c, 0xa6, 0xad, 0x1e, 0x10, 0x02, 0x3d, 0x3d, 0x5a, 0xa6, 0xfd, 0xfa, 0xdb, 0x9f, 0xc2, - 0xb8, 0x51, 0x78, 0xb9, 0xd0, 0x28, 0x69, 0xf1, 0xd3, 0x82, 0x81, 0x19, 0x68, 0x72, 0x01, 0x76, - 0x88, 0x31, 0xa6, 0x5b, 0x14, 0xe4, 0xe1, 0x41, 0xea, 0x37, 0x7f, 0xf6, 0x60, 0x9e, 0x56, 0xbb, - 0xb7, 0xc2, 0x3f, 0x7a, 0x6e, 0x91, 0x2f, 0x30, 0xd5, 0xb7, 0x03, 0x93, 0xfb, 0x7c, 0xfe, 0xe1, - 0x7c, 0xf5, 0x4b, 0x34, 0x3b, 0xfd, 0x53, 0x52, 0xed, 0x2a, 0x33, 0x2f, 0x5f, 0xc2, 0x19, 0x17, - 0x2c, 0x88, 0x33, 0x5e, 0x24, 0x37, 0xbc, 0xc8, 0x13, 0x71, 0xd7, 0x82, 0x96, 0xc7, 0x57, 0xfb, - 0xd8, 0x6c, 0xf2, 0x75, 0xa0, 0x1f, 0xb0, 0x17, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x04, 0xbd, - 0xa8, 0xa8, 0xf0, 0x04, 0x00, 0x00, -} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/envelope.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/envelope.pb.go deleted file mode 100644 index d4fa73bd..00000000 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/envelope.pb.go +++ /dev/null @@ -1,875 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: envelope.proto - -package loggregator_v2 - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Log_Type int32 - -const ( - Log_OUT Log_Type = 0 - Log_ERR Log_Type = 1 -) - -var Log_Type_name = map[int32]string{ - 0: "OUT", - 1: "ERR", -} -var Log_Type_value = map[string]int32{ - "OUT": 0, - "ERR": 1, -} - -func (x Log_Type) String() string { - return proto.EnumName(Log_Type_name, int32(x)) -} -func (Log_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{3, 0} -} - -type Envelope struct { - Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - SourceId string `protobuf:"bytes,2,opt,name=source_id,proto3" json:"source_id,omitempty"` - InstanceId string `protobuf:"bytes,8,opt,name=instance_id,proto3" json:"instance_id,omitempty"` - DeprecatedTags map[string]*Value `protobuf:"bytes,3,rep,name=deprecated_tags,proto3" json:"deprecated_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Tags map[string]string `protobuf:"bytes,9,rep,name=tags,proto3" json:"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 Message: - // *Envelope_Log - // *Envelope_Counter - // *Envelope_Gauge - // *Envelope_Timer - // *Envelope_Event - Message isEnvelope_Message `protobuf_oneof:"message"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Envelope) Reset() { *m = Envelope{} } -func (m *Envelope) String() string { return proto.CompactTextString(m) } -func (*Envelope) ProtoMessage() {} -func (*Envelope) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{0} -} -func (m *Envelope) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Envelope.Unmarshal(m, b) -} -func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Envelope.Marshal(b, m, deterministic) -} -func (dst *Envelope) XXX_Merge(src proto.Message) { - xxx_messageInfo_Envelope.Merge(dst, src) -} -func (m *Envelope) XXX_Size() int { - return xxx_messageInfo_Envelope.Size(m) -} -func (m *Envelope) XXX_DiscardUnknown() { - xxx_messageInfo_Envelope.DiscardUnknown(m) -} - -var xxx_messageInfo_Envelope proto.InternalMessageInfo - -func (m *Envelope) GetTimestamp() int64 { - if m != nil { - return m.Timestamp - } - return 0 -} - -func (m *Envelope) GetSourceId() string { - if m != nil { - return m.SourceId - } - return "" -} - -func (m *Envelope) GetInstanceId() string { - if m != nil { - return m.InstanceId - } - return "" -} - -func (m *Envelope) GetDeprecatedTags() map[string]*Value { - if m != nil { - return m.DeprecatedTags - } - return nil -} - -func (m *Envelope) GetTags() map[string]string { - if m != nil { - return m.Tags - } - return nil -} - -type isEnvelope_Message interface { - isEnvelope_Message() -} - -type Envelope_Log struct { - Log *Log `protobuf:"bytes,4,opt,name=log,proto3,oneof"` -} - -type Envelope_Counter struct { - Counter *Counter `protobuf:"bytes,5,opt,name=counter,proto3,oneof"` -} - -type Envelope_Gauge struct { - Gauge *Gauge `protobuf:"bytes,6,opt,name=gauge,proto3,oneof"` -} - -type Envelope_Timer struct { - Timer *Timer `protobuf:"bytes,7,opt,name=timer,proto3,oneof"` -} - -type Envelope_Event struct { - Event *Event `protobuf:"bytes,10,opt,name=event,proto3,oneof"` -} - -func (*Envelope_Log) isEnvelope_Message() {} - -func (*Envelope_Counter) isEnvelope_Message() {} - -func (*Envelope_Gauge) isEnvelope_Message() {} - -func (*Envelope_Timer) isEnvelope_Message() {} - -func (*Envelope_Event) isEnvelope_Message() {} - -func (m *Envelope) GetMessage() isEnvelope_Message { - if m != nil { - return m.Message - } - return nil -} - -func (m *Envelope) GetLog() *Log { - if x, ok := m.GetMessage().(*Envelope_Log); ok { - return x.Log - } - return nil -} - -func (m *Envelope) GetCounter() *Counter { - if x, ok := m.GetMessage().(*Envelope_Counter); ok { - return x.Counter - } - return nil -} - -func (m *Envelope) GetGauge() *Gauge { - if x, ok := m.GetMessage().(*Envelope_Gauge); ok { - return x.Gauge - } - return nil -} - -func (m *Envelope) GetTimer() *Timer { - if x, ok := m.GetMessage().(*Envelope_Timer); ok { - return x.Timer - } - return nil -} - -func (m *Envelope) GetEvent() *Event { - if x, ok := m.GetMessage().(*Envelope_Event); ok { - return x.Event - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Envelope) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Envelope_OneofMarshaler, _Envelope_OneofUnmarshaler, _Envelope_OneofSizer, []interface{}{ - (*Envelope_Log)(nil), - (*Envelope_Counter)(nil), - (*Envelope_Gauge)(nil), - (*Envelope_Timer)(nil), - (*Envelope_Event)(nil), - } -} - -func _Envelope_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Envelope) - // message - switch x := m.Message.(type) { - case *Envelope_Log: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Log); err != nil { - return err - } - case *Envelope_Counter: - b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Counter); err != nil { - return err - } - case *Envelope_Gauge: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Gauge); err != nil { - return err - } - case *Envelope_Timer: - b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timer); err != nil { - return err - } - case *Envelope_Event: - b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Event); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Envelope.Message has unexpected type %T", x) - } - return nil -} - -func _Envelope_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Envelope) - switch tag { - case 4: // message.log - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Log) - err := b.DecodeMessage(msg) - m.Message = &Envelope_Log{msg} - return true, err - case 5: // message.counter - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Counter) - err := b.DecodeMessage(msg) - m.Message = &Envelope_Counter{msg} - return true, err - case 6: // message.gauge - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Gauge) - err := b.DecodeMessage(msg) - m.Message = &Envelope_Gauge{msg} - return true, err - case 7: // message.timer - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Timer) - err := b.DecodeMessage(msg) - m.Message = &Envelope_Timer{msg} - return true, err - case 10: // message.event - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Event) - err := b.DecodeMessage(msg) - m.Message = &Envelope_Event{msg} - return true, err - default: - return false, nil - } -} - -func _Envelope_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Envelope) - // message - switch x := m.Message.(type) { - case *Envelope_Log: - s := proto.Size(x.Log) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Envelope_Counter: - s := proto.Size(x.Counter) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Envelope_Gauge: - s := proto.Size(x.Gauge) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Envelope_Timer: - s := proto.Size(x.Timer) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *Envelope_Event: - s := proto.Size(x.Event) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type EnvelopeBatch struct { - Batch []*Envelope `protobuf:"bytes,1,rep,name=batch,proto3" json:"batch,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnvelopeBatch) Reset() { *m = EnvelopeBatch{} } -func (m *EnvelopeBatch) String() string { return proto.CompactTextString(m) } -func (*EnvelopeBatch) ProtoMessage() {} -func (*EnvelopeBatch) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{1} -} -func (m *EnvelopeBatch) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnvelopeBatch.Unmarshal(m, b) -} -func (m *EnvelopeBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnvelopeBatch.Marshal(b, m, deterministic) -} -func (dst *EnvelopeBatch) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnvelopeBatch.Merge(dst, src) -} -func (m *EnvelopeBatch) XXX_Size() int { - return xxx_messageInfo_EnvelopeBatch.Size(m) -} -func (m *EnvelopeBatch) XXX_DiscardUnknown() { - xxx_messageInfo_EnvelopeBatch.DiscardUnknown(m) -} - -var xxx_messageInfo_EnvelopeBatch proto.InternalMessageInfo - -func (m *EnvelopeBatch) GetBatch() []*Envelope { - if m != nil { - return m.Batch - } - return nil -} - -type Value struct { - // Types that are valid to be assigned to Data: - // *Value_Text - // *Value_Integer - // *Value_Decimal - Data isValue_Data `protobuf_oneof:"data"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{2} -} -func (m *Value) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Value.Unmarshal(m, b) -} -func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Value.Marshal(b, m, deterministic) -} -func (dst *Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Value.Merge(dst, src) -} -func (m *Value) XXX_Size() int { - return xxx_messageInfo_Value.Size(m) -} -func (m *Value) XXX_DiscardUnknown() { - xxx_messageInfo_Value.DiscardUnknown(m) -} - -var xxx_messageInfo_Value proto.InternalMessageInfo - -type isValue_Data interface { - isValue_Data() -} - -type Value_Text struct { - Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` -} - -type Value_Integer struct { - Integer int64 `protobuf:"varint,2,opt,name=integer,proto3,oneof"` -} - -type Value_Decimal struct { - Decimal float64 `protobuf:"fixed64,3,opt,name=decimal,proto3,oneof"` -} - -func (*Value_Text) isValue_Data() {} - -func (*Value_Integer) isValue_Data() {} - -func (*Value_Decimal) isValue_Data() {} - -func (m *Value) GetData() isValue_Data { - if m != nil { - return m.Data - } - return nil -} - -func (m *Value) GetText() string { - if x, ok := m.GetData().(*Value_Text); ok { - return x.Text - } - return "" -} - -func (m *Value) GetInteger() int64 { - if x, ok := m.GetData().(*Value_Integer); ok { - return x.Integer - } - return 0 -} - -func (m *Value) GetDecimal() float64 { - if x, ok := m.GetData().(*Value_Decimal); ok { - return x.Decimal - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ - (*Value_Text)(nil), - (*Value_Integer)(nil), - (*Value_Decimal)(nil), - } -} - -func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Value) - // data - switch x := m.Data.(type) { - case *Value_Text: - b.EncodeVarint(1<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Text) - case *Value_Integer: - b.EncodeVarint(2<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Integer)) - case *Value_Decimal: - b.EncodeVarint(3<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.Decimal)) - case nil: - default: - return fmt.Errorf("Value.Data has unexpected type %T", x) - } - return nil -} - -func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Value) - switch tag { - case 1: // data.text - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Data = &Value_Text{x} - return true, err - case 2: // data.integer - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Data = &Value_Integer{int64(x)} - return true, err - case 3: // data.decimal - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Data = &Value_Decimal{math.Float64frombits(x)} - return true, err - default: - return false, nil - } -} - -func _Value_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Value) - // data - switch x := m.Data.(type) { - case *Value_Text: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Text))) - n += len(x.Text) - case *Value_Integer: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.Integer)) - case *Value_Decimal: - n += 1 // tag and wire - n += 8 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Log struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - Type Log_Type `protobuf:"varint,2,opt,name=type,proto3,enum=loggregator.v2.Log_Type" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{3} -} -func (m *Log) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Log.Unmarshal(m, b) -} -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) -} -func (dst *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(dst, src) -} -func (m *Log) XXX_Size() int { - return xxx_messageInfo_Log.Size(m) -} -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) -} - -var xxx_messageInfo_Log proto.InternalMessageInfo - -func (m *Log) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func (m *Log) GetType() Log_Type { - if m != nil { - return m.Type - } - return Log_OUT -} - -type Counter struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Delta uint64 `protobuf:"varint,2,opt,name=delta,proto3" json:"delta,omitempty"` - Total uint64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Counter) Reset() { *m = Counter{} } -func (m *Counter) String() string { return proto.CompactTextString(m) } -func (*Counter) ProtoMessage() {} -func (*Counter) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{4} -} -func (m *Counter) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Counter.Unmarshal(m, b) -} -func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Counter.Marshal(b, m, deterministic) -} -func (dst *Counter) XXX_Merge(src proto.Message) { - xxx_messageInfo_Counter.Merge(dst, src) -} -func (m *Counter) XXX_Size() int { - return xxx_messageInfo_Counter.Size(m) -} -func (m *Counter) XXX_DiscardUnknown() { - xxx_messageInfo_Counter.DiscardUnknown(m) -} - -var xxx_messageInfo_Counter proto.InternalMessageInfo - -func (m *Counter) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Counter) GetDelta() uint64 { - if m != nil { - return m.Delta - } - return 0 -} - -func (m *Counter) GetTotal() uint64 { - if m != nil { - return m.Total - } - return 0 -} - -type Gauge struct { - Metrics map[string]*GaugeValue `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Gauge) Reset() { *m = Gauge{} } -func (m *Gauge) String() string { return proto.CompactTextString(m) } -func (*Gauge) ProtoMessage() {} -func (*Gauge) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{5} -} -func (m *Gauge) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Gauge.Unmarshal(m, b) -} -func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Gauge.Marshal(b, m, deterministic) -} -func (dst *Gauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gauge.Merge(dst, src) -} -func (m *Gauge) XXX_Size() int { - return xxx_messageInfo_Gauge.Size(m) -} -func (m *Gauge) XXX_DiscardUnknown() { - xxx_messageInfo_Gauge.DiscardUnknown(m) -} - -var xxx_messageInfo_Gauge proto.InternalMessageInfo - -func (m *Gauge) GetMetrics() map[string]*GaugeValue { - if m != nil { - return m.Metrics - } - return nil -} - -type GaugeValue struct { - Unit string `protobuf:"bytes,1,opt,name=unit,proto3" json:"unit,omitempty"` - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GaugeValue) Reset() { *m = GaugeValue{} } -func (m *GaugeValue) String() string { return proto.CompactTextString(m) } -func (*GaugeValue) ProtoMessage() {} -func (*GaugeValue) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{6} -} -func (m *GaugeValue) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GaugeValue.Unmarshal(m, b) -} -func (m *GaugeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GaugeValue.Marshal(b, m, deterministic) -} -func (dst *GaugeValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_GaugeValue.Merge(dst, src) -} -func (m *GaugeValue) XXX_Size() int { - return xxx_messageInfo_GaugeValue.Size(m) -} -func (m *GaugeValue) XXX_DiscardUnknown() { - xxx_messageInfo_GaugeValue.DiscardUnknown(m) -} - -var xxx_messageInfo_GaugeValue proto.InternalMessageInfo - -func (m *GaugeValue) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *GaugeValue) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -type Timer struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` - Stop int64 `protobuf:"varint,3,opt,name=stop,proto3" json:"stop,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Timer) Reset() { *m = Timer{} } -func (m *Timer) String() string { return proto.CompactTextString(m) } -func (*Timer) ProtoMessage() {} -func (*Timer) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{7} -} -func (m *Timer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Timer.Unmarshal(m, b) -} -func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Timer.Marshal(b, m, deterministic) -} -func (dst *Timer) XXX_Merge(src proto.Message) { - xxx_messageInfo_Timer.Merge(dst, src) -} -func (m *Timer) XXX_Size() int { - return xxx_messageInfo_Timer.Size(m) -} -func (m *Timer) XXX_DiscardUnknown() { - xxx_messageInfo_Timer.DiscardUnknown(m) -} - -var xxx_messageInfo_Timer proto.InternalMessageInfo - -func (m *Timer) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Timer) GetStart() int64 { - if m != nil { - return m.Start - } - return 0 -} - -func (m *Timer) GetStop() int64 { - if m != nil { - return m.Stop - } - return 0 -} - -type Event struct { - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` - Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_envelope_1843aa18364a6e12, []int{8} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Event.Unmarshal(m, b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) -} -func (dst *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(dst, src) -} -func (m *Event) XXX_Size() int { - return xxx_messageInfo_Event.Size(m) -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetTitle() string { - if m != nil { - return m.Title - } - return "" -} - -func (m *Event) GetBody() string { - if m != nil { - return m.Body - } - return "" -} - -func init() { - proto.RegisterType((*Envelope)(nil), "loggregator.v2.Envelope") - proto.RegisterMapType((map[string]*Value)(nil), "loggregator.v2.Envelope.DeprecatedTagsEntry") - proto.RegisterMapType((map[string]string)(nil), "loggregator.v2.Envelope.TagsEntry") - proto.RegisterType((*EnvelopeBatch)(nil), "loggregator.v2.EnvelopeBatch") - proto.RegisterType((*Value)(nil), "loggregator.v2.Value") - proto.RegisterType((*Log)(nil), "loggregator.v2.Log") - proto.RegisterType((*Counter)(nil), "loggregator.v2.Counter") - proto.RegisterType((*Gauge)(nil), "loggregator.v2.Gauge") - proto.RegisterMapType((map[string]*GaugeValue)(nil), "loggregator.v2.Gauge.MetricsEntry") - proto.RegisterType((*GaugeValue)(nil), "loggregator.v2.GaugeValue") - proto.RegisterType((*Timer)(nil), "loggregator.v2.Timer") - proto.RegisterType((*Event)(nil), "loggregator.v2.Event") - proto.RegisterEnum("loggregator.v2.Log_Type", Log_Type_name, Log_Type_value) -} - -func init() { proto.RegisterFile("envelope.proto", fileDescriptor_envelope_1843aa18364a6e12) } - -var fileDescriptor_envelope_1843aa18364a6e12 = []byte{ - // 651 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xd1, 0x6b, 0xd4, 0x4e, - 0x10, 0xc7, 0x2f, 0x4d, 0xd2, 0x34, 0xd3, 0xfe, 0xfa, 0x2b, 0xdb, 0x8a, 0xe1, 0x10, 0x3c, 0xf2, - 0xe2, 0x81, 0x35, 0x68, 0x0b, 0x55, 0x44, 0x10, 0x4e, 0x0f, 0x4f, 0x38, 0x11, 0x96, 0xb3, 0xf8, - 0x22, 0x65, 0x9b, 0xac, 0x6b, 0x30, 0x97, 0x0d, 0xc9, 0xe6, 0x30, 0x8f, 0xfe, 0x21, 0xfe, 0xaf, - 0xb2, 0xb3, 0x89, 0x77, 0x3d, 0x73, 0xbe, 0xcd, 0xcc, 0xf7, 0x33, 0x73, 0xb3, 0x33, 0x93, 0x83, - 0x63, 0x9e, 0xaf, 0x78, 0x26, 0x0b, 0x1e, 0x15, 0xa5, 0x54, 0x92, 0x1c, 0x67, 0x52, 0x88, 0x92, - 0x0b, 0xa6, 0x64, 0x19, 0xad, 0x2e, 0xc2, 0x9f, 0x2e, 0x1c, 0x4c, 0x5b, 0x84, 0x3c, 0x00, 0x5f, - 0xa5, 0x4b, 0x5e, 0x29, 0xb6, 0x2c, 0x02, 0x6b, 0x64, 0x8d, 0x6d, 0xba, 0x0e, 0x68, 0xb5, 0x92, - 0x75, 0x19, 0xf3, 0x9b, 0x34, 0x09, 0xf6, 0x46, 0xd6, 0xd8, 0xa7, 0xeb, 0x00, 0x19, 0xc1, 0x61, - 0x9a, 0x57, 0x8a, 0xe5, 0x46, 0x3f, 0x40, 0x7d, 0x33, 0x44, 0xae, 0xe1, 0xff, 0x84, 0x17, 0x25, - 0x8f, 0x99, 0xe2, 0xc9, 0x8d, 0x62, 0xa2, 0x0a, 0xec, 0x91, 0x3d, 0x3e, 0xbc, 0x38, 0x8f, 0xee, - 0x36, 0x15, 0x75, 0x0d, 0x45, 0x6f, 0xff, 0xf0, 0x0b, 0x26, 0xaa, 0x69, 0xae, 0xca, 0x86, 0x6e, - 0x17, 0x21, 0x57, 0xe0, 0x60, 0x31, 0x1f, 0x8b, 0x85, 0x3b, 0x8b, 0xad, 0x4b, 0x20, 0x4f, 0x1e, - 0x81, 0x9d, 0x49, 0x11, 0x38, 0x23, 0x6b, 0x7c, 0x78, 0x71, 0xba, 0x9d, 0x36, 0x97, 0x62, 0x36, - 0xa0, 0x9a, 0x20, 0x97, 0xe0, 0xc5, 0xb2, 0xce, 0x15, 0x2f, 0x03, 0x17, 0xe1, 0xfb, 0xdb, 0xf0, - 0x1b, 0x23, 0xcf, 0x06, 0xb4, 0x23, 0xc9, 0x13, 0x70, 0x05, 0xab, 0x05, 0x0f, 0xf6, 0x31, 0xe5, - 0xde, 0x76, 0xca, 0x3b, 0x2d, 0xce, 0x06, 0xd4, 0x50, 0x1a, 0xd7, 0x93, 0x2e, 0x03, 0xaf, 0x1f, - 0x5f, 0x68, 0x51, 0xe3, 0x48, 0x69, 0x9c, 0xaf, 0x78, 0xae, 0x02, 0xe8, 0xc7, 0xa7, 0x5a, 0xd4, - 0x38, 0x52, 0xc3, 0xcf, 0x70, 0xda, 0x33, 0x4a, 0x72, 0x02, 0xf6, 0x77, 0xde, 0xe0, 0xa6, 0x7d, - 0xaa, 0x4d, 0xf2, 0x18, 0xdc, 0x15, 0xcb, 0x6a, 0x8e, 0xfb, 0xed, 0xa9, 0x7b, 0xad, 0x45, 0x6a, - 0x98, 0x97, 0x7b, 0x2f, 0xac, 0xe1, 0x73, 0xf0, 0xff, 0x55, 0xef, 0x6c, 0xb3, 0x9e, 0xbf, 0x91, - 0x38, 0xf1, 0xc1, 0x5b, 0xf2, 0xaa, 0x62, 0x82, 0x87, 0xaf, 0xe1, 0xbf, 0x6e, 0x49, 0x13, 0xa6, - 0xe2, 0x6f, 0x24, 0x02, 0xf7, 0x56, 0x1b, 0x81, 0x85, 0x2b, 0x0d, 0x76, 0xad, 0x94, 0x1a, 0x2c, - 0xfc, 0x02, 0x2e, 0x36, 0x46, 0xce, 0xc0, 0x51, 0xfc, 0x87, 0x32, 0x1d, 0xcc, 0x06, 0x14, 0x3d, - 0x32, 0x04, 0x2f, 0xcd, 0x15, 0x17, 0xbc, 0xc4, 0x36, 0x6c, 0xbd, 0xa6, 0x36, 0xa0, 0xb5, 0x84, - 0xc7, 0xe9, 0x92, 0x65, 0x81, 0x3d, 0xb2, 0xc6, 0x96, 0xd6, 0xda, 0xc0, 0x64, 0x1f, 0x9c, 0x84, - 0x29, 0x16, 0x0a, 0xb0, 0xe7, 0x52, 0x90, 0x00, 0xbc, 0x82, 0x35, 0x99, 0x64, 0x09, 0xd6, 0x3f, - 0xa2, 0x9d, 0x4b, 0xce, 0xc1, 0x51, 0x4d, 0x61, 0x1e, 0x79, 0xfc, 0x77, 0xbb, 0x73, 0x29, 0xa2, - 0x45, 0x53, 0x70, 0x8a, 0x54, 0x18, 0x80, 0xa3, 0x3d, 0xe2, 0x81, 0xfd, 0xf1, 0xd3, 0xe2, 0x64, - 0xa0, 0x8d, 0x29, 0xa5, 0x27, 0x56, 0xf8, 0x1e, 0xbc, 0xf6, 0x92, 0x08, 0x01, 0x27, 0x67, 0x4b, - 0xde, 0xce, 0x12, 0x6d, 0x3d, 0xcc, 0x84, 0x67, 0x8a, 0xe1, 0xef, 0x38, 0xd4, 0x38, 0x3a, 0xaa, - 0xa4, 0x6a, 0xfb, 0x77, 0xa8, 0x71, 0xc2, 0x5f, 0x16, 0xb8, 0x78, 0x62, 0xe4, 0x95, 0x1e, 0xb4, - 0x2a, 0xd3, 0xb8, 0x6a, 0xc7, 0x19, 0xf6, 0x9e, 0x62, 0xf4, 0xc1, 0x40, 0xe6, 0x0b, 0xe9, 0x52, - 0x86, 0xd7, 0x70, 0xb4, 0x29, 0xf4, 0xac, 0xf8, 0xe9, 0xdd, 0x93, 0x19, 0xf6, 0x56, 0xdf, 0xbe, - 0x9b, 0xf0, 0x0a, 0x60, 0x2d, 0xe8, 0xd7, 0xd6, 0x79, 0xaa, 0xba, 0xd7, 0x6a, 0xfb, 0xee, 0xe9, - 0x58, 0x6d, 0x6e, 0x38, 0x05, 0x17, 0x3f, 0x85, 0x5d, 0x03, 0xaa, 0x14, 0x2b, 0x95, 0x59, 0x33, - 0x35, 0x8e, 0x26, 0x2b, 0x25, 0x0b, 0x9c, 0x8f, 0x4d, 0xd1, 0x0e, 0x9f, 0x81, 0x8b, 0x9f, 0x08, - 0x4e, 0x2f, 0x55, 0x59, 0x57, 0xc7, 0x38, 0x3a, 0xe5, 0x56, 0x26, 0x4d, 0x7b, 0xb5, 0x68, 0x4f, - 0xae, 0xe0, 0xa1, 0x2c, 0x45, 0x14, 0x67, 0xb2, 0x4e, 0xbe, 0xca, 0x3a, 0x4f, 0xca, 0x66, 0xeb, - 0xa9, 0x93, 0xd3, 0xf9, 0xda, 0xef, 0x6e, 0xf4, 0x76, 0x1f, 0xff, 0x78, 0x2f, 0x7f, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x0a, 0x63, 0xfb, 0xc3, 0x8a, 0x05, 0x00, 0x00, -} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/generate.sh b/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/generate.sh deleted file mode 100644 index 6ee601b5..00000000 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/generate.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -dir_resolve() -{ - cd "$1" 2>/dev/null || return $? # cd to desired directory; if fail, quell any error messages but return exit status - echo "`pwd -P`" # output full, link-resolved path -} - -set -e - -TARGET=`dirname $0` -TARGET=`dir_resolve $TARGET` -cd $TARGET - -go get github.com/golang/protobuf/{proto,protoc-gen-go} - - -tmp_dir=$(mktemp -d) -mkdir -p $tmp_dir/loggregator - -cp $GOPATH/src/github.com/cloudfoundry/loggregator-api/v2/*proto $tmp_dir/loggregator - -protoc $tmp_dir/loggregator/*.proto --go_out=plugins=grpc:. --proto_path=$tmp_dir/loggregator - -rm -r $tmp_dir diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/ingress.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/ingress.pb.go deleted file mode 100644 index 3ab51c50..00000000 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/ingress.pb.go +++ /dev/null @@ -1,346 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: ingress.proto - -package loggregator_v2 - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type IngressResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IngressResponse) Reset() { *m = IngressResponse{} } -func (m *IngressResponse) String() string { return proto.CompactTextString(m) } -func (*IngressResponse) ProtoMessage() {} -func (*IngressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ingress_1df30cb6e71681fb, []int{0} -} -func (m *IngressResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IngressResponse.Unmarshal(m, b) -} -func (m *IngressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IngressResponse.Marshal(b, m, deterministic) -} -func (dst *IngressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IngressResponse.Merge(dst, src) -} -func (m *IngressResponse) XXX_Size() int { - return xxx_messageInfo_IngressResponse.Size(m) -} -func (m *IngressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IngressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IngressResponse proto.InternalMessageInfo - -type BatchSenderResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BatchSenderResponse) Reset() { *m = BatchSenderResponse{} } -func (m *BatchSenderResponse) String() string { return proto.CompactTextString(m) } -func (*BatchSenderResponse) ProtoMessage() {} -func (*BatchSenderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ingress_1df30cb6e71681fb, []int{1} -} -func (m *BatchSenderResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BatchSenderResponse.Unmarshal(m, b) -} -func (m *BatchSenderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BatchSenderResponse.Marshal(b, m, deterministic) -} -func (dst *BatchSenderResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BatchSenderResponse.Merge(dst, src) -} -func (m *BatchSenderResponse) XXX_Size() int { - return xxx_messageInfo_BatchSenderResponse.Size(m) -} -func (m *BatchSenderResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BatchSenderResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BatchSenderResponse proto.InternalMessageInfo - -type SendResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SendResponse) Reset() { *m = SendResponse{} } -func (m *SendResponse) String() string { return proto.CompactTextString(m) } -func (*SendResponse) ProtoMessage() {} -func (*SendResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ingress_1df30cb6e71681fb, []int{2} -} -func (m *SendResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SendResponse.Unmarshal(m, b) -} -func (m *SendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SendResponse.Marshal(b, m, deterministic) -} -func (dst *SendResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SendResponse.Merge(dst, src) -} -func (m *SendResponse) XXX_Size() int { - return xxx_messageInfo_SendResponse.Size(m) -} -func (m *SendResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SendResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SendResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IngressResponse)(nil), "loggregator.v2.IngressResponse") - proto.RegisterType((*BatchSenderResponse)(nil), "loggregator.v2.BatchSenderResponse") - proto.RegisterType((*SendResponse)(nil), "loggregator.v2.SendResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// IngressClient is the client API for Ingress service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type IngressClient interface { - Sender(ctx context.Context, opts ...grpc.CallOption) (Ingress_SenderClient, error) - BatchSender(ctx context.Context, opts ...grpc.CallOption) (Ingress_BatchSenderClient, error) - Send(ctx context.Context, in *EnvelopeBatch, opts ...grpc.CallOption) (*SendResponse, error) -} - -type ingressClient struct { - cc *grpc.ClientConn -} - -func NewIngressClient(cc *grpc.ClientConn) IngressClient { - return &ingressClient{cc} -} - -func (c *ingressClient) Sender(ctx context.Context, opts ...grpc.CallOption) (Ingress_SenderClient, error) { - stream, err := c.cc.NewStream(ctx, &_Ingress_serviceDesc.Streams[0], "/loggregator.v2.Ingress/Sender", opts...) - if err != nil { - return nil, err - } - x := &ingressSenderClient{stream} - return x, nil -} - -type Ingress_SenderClient interface { - Send(*Envelope) error - CloseAndRecv() (*IngressResponse, error) - grpc.ClientStream -} - -type ingressSenderClient struct { - grpc.ClientStream -} - -func (x *ingressSenderClient) Send(m *Envelope) error { - return x.ClientStream.SendMsg(m) -} - -func (x *ingressSenderClient) CloseAndRecv() (*IngressResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(IngressResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *ingressClient) BatchSender(ctx context.Context, opts ...grpc.CallOption) (Ingress_BatchSenderClient, error) { - stream, err := c.cc.NewStream(ctx, &_Ingress_serviceDesc.Streams[1], "/loggregator.v2.Ingress/BatchSender", opts...) - if err != nil { - return nil, err - } - x := &ingressBatchSenderClient{stream} - return x, nil -} - -type Ingress_BatchSenderClient interface { - Send(*EnvelopeBatch) error - CloseAndRecv() (*BatchSenderResponse, error) - grpc.ClientStream -} - -type ingressBatchSenderClient struct { - grpc.ClientStream -} - -func (x *ingressBatchSenderClient) Send(m *EnvelopeBatch) error { - return x.ClientStream.SendMsg(m) -} - -func (x *ingressBatchSenderClient) CloseAndRecv() (*BatchSenderResponse, error) { - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - m := new(BatchSenderResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *ingressClient) Send(ctx context.Context, in *EnvelopeBatch, opts ...grpc.CallOption) (*SendResponse, error) { - out := new(SendResponse) - err := c.cc.Invoke(ctx, "/loggregator.v2.Ingress/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IngressServer is the server API for Ingress service. -type IngressServer interface { - Sender(Ingress_SenderServer) error - BatchSender(Ingress_BatchSenderServer) error - Send(context.Context, *EnvelopeBatch) (*SendResponse, error) -} - -func RegisterIngressServer(s *grpc.Server, srv IngressServer) { - s.RegisterService(&_Ingress_serviceDesc, srv) -} - -func _Ingress_Sender_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(IngressServer).Sender(&ingressSenderServer{stream}) -} - -type Ingress_SenderServer interface { - SendAndClose(*IngressResponse) error - Recv() (*Envelope, error) - grpc.ServerStream -} - -type ingressSenderServer struct { - grpc.ServerStream -} - -func (x *ingressSenderServer) SendAndClose(m *IngressResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *ingressSenderServer) Recv() (*Envelope, error) { - m := new(Envelope) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Ingress_BatchSender_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(IngressServer).BatchSender(&ingressBatchSenderServer{stream}) -} - -type Ingress_BatchSenderServer interface { - SendAndClose(*BatchSenderResponse) error - Recv() (*EnvelopeBatch, error) - grpc.ServerStream -} - -type ingressBatchSenderServer struct { - grpc.ServerStream -} - -func (x *ingressBatchSenderServer) SendAndClose(m *BatchSenderResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *ingressBatchSenderServer) Recv() (*EnvelopeBatch, error) { - m := new(EnvelopeBatch) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func _Ingress_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EnvelopeBatch) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IngressServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/loggregator.v2.Ingress/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IngressServer).Send(ctx, req.(*EnvelopeBatch)) - } - return interceptor(ctx, in, info, handler) -} - -var _Ingress_serviceDesc = grpc.ServiceDesc{ - ServiceName: "loggregator.v2.Ingress", - HandlerType: (*IngressServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Send", - Handler: _Ingress_Send_Handler, - }, - }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Sender", - Handler: _Ingress_Sender_Handler, - ClientStreams: true, - }, - { - StreamName: "BatchSender", - Handler: _Ingress_BatchSender_Handler, - ClientStreams: true, - }, - }, - Metadata: "ingress.proto", -} - -func init() { proto.RegisterFile("ingress.proto", fileDescriptor_ingress_1df30cb6e71681fb) } - -var fileDescriptor_ingress_1df30cb6e71681fb = []byte{ - // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0xcc, 0x4b, 0x2f, - 0x4a, 0x2d, 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcb, 0xc9, 0x4f, 0x4f, 0x2f, - 0x4a, 0x4d, 0x4f, 0x2c, 0xc9, 0x2f, 0xd2, 0x2b, 0x33, 0x92, 0xe2, 0x4b, 0xcd, 0x2b, 0x4b, 0xcd, - 0xc9, 0x2f, 0x48, 0x85, 0xc8, 0x2b, 0x09, 0x72, 0xf1, 0x7b, 0x42, 0x34, 0x04, 0xa5, 0x16, 0x17, - 0xe4, 0xe7, 0x15, 0xa7, 0x2a, 0x89, 0x72, 0x09, 0x3b, 0x25, 0x96, 0x24, 0x67, 0x04, 0xa7, 0xe6, - 0xa5, 0xa4, 0x16, 0xc1, 0x85, 0xf9, 0xb8, 0x78, 0x40, 0x22, 0x30, 0xbe, 0xd1, 0x07, 0x46, 0x2e, - 0x76, 0xa8, 0x56, 0x21, 0x77, 0x2e, 0x36, 0x88, 0x6a, 0x21, 0x09, 0x3d, 0x54, 0x0b, 0xf5, 0x5c, - 0xa1, 0xf6, 0x49, 0xc9, 0xa3, 0xcb, 0xa0, 0xdb, 0xcb, 0xa0, 0xc1, 0x28, 0x14, 0xca, 0xc5, 0x8d, - 0x64, 0xb7, 0x90, 0x2c, 0x2e, 0xd3, 0xc0, 0x8a, 0xa4, 0x94, 0xd1, 0xa5, 0xb1, 0xb9, 0x1b, 0x64, - 0xac, 0x2b, 0x17, 0x0b, 0x48, 0x94, 0x90, 0x79, 0x32, 0xe8, 0xd2, 0xc8, 0x1e, 0x56, 0x62, 0x70, - 0x32, 0xe5, 0x92, 0xcf, 0x2f, 0x4a, 0xd7, 0x4b, 0xce, 0xc9, 0x2f, 0x4d, 0x49, 0xcb, 0x2f, 0xcd, - 0x4b, 0x29, 0xaa, 0x44, 0xd3, 0xe1, 0x24, 0xe4, 0x83, 0xe0, 0x43, 0x3d, 0x98, 0xc4, 0x06, 0x0e, - 0x6a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0x97, 0x11, 0x79, 0x9b, 0x01, 0x00, 0x00, -} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/syslog.go b/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/syslog.go deleted file mode 100644 index c366471b..00000000 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/syslog.go +++ /dev/null @@ -1,234 +0,0 @@ -package loggregator_v2 - -import ( - "bytes" - fmt "fmt" - "strconv" - "time" - - "code.cloudfoundry.org/rfc5424" -) - -// 47450 is the registered enterprise ID for the Cloud Foundry Foundation. -// See: https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers -const ( - gaugeStructuredDataID = "gauge@47450" - counterStructuredDataID = "counter@47450" - timerStructuredDataID = "timer@47450" - tagsStructuredDataID = "tags@47450" -) - -type syslogConfig struct { - hostname string - appName string - processID string -} - -// SyslogOption configures the behavior of Envelope.Syslog. -type SyslogOption func(*syslogConfig) - -// WithSyslogHostname changes the hostname of the resulting syslog messages. -func WithSyslogHostname(hostname string) SyslogOption { - return func(c *syslogConfig) { - c.hostname = hostname - } -} - -// WithSyslogAppName changes the app name of the resulting syslog messages. -func WithSyslogAppName(appName string) SyslogOption { - return func(c *syslogConfig) { - c.appName = appName - } -} - -// WithSyslogProcessID changes the process id of the resulting syslog messages. -func WithSyslogProcessID(processID string) SyslogOption { - return func(c *syslogConfig) { - c.processID = processID - } -} - -// Syslog converts an envelope into RFC 5424 compliant syslog messages. -// Typically, this will be a one to one (envelope to syslog) but for certain -// envelope type such as gauges a single envelope maps to multiple syslog -// messages (one per gauge metric). -func (m *Envelope) Syslog(opts ...SyslogOption) ([][]byte, error) { - c := &syslogConfig{ - processID: m.InstanceId, - appName: m.SourceId, - } - - for _, o := range opts { - o(c) - } - - priority, err := m.generatePriority() - if err != nil { - return nil, err - } - - switch m.GetMessage().(type) { - case *Envelope_Log: - msg := m.basicSyslogMessage(c, priority) - msg.Message = appendNewline(removeNulls(m.GetLog().Payload)) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - return [][]byte{d}, nil - case *Envelope_Gauge: - metrics := m.GetGauge().GetMetrics() - messages := make([][]byte, 0, len(metrics)) - for name, g := range metrics { - msg := m.basicSyslogMessage(c, priority) - msg.StructuredData = append(msg.StructuredData, rfc5424.StructuredData{ - ID: gaugeStructuredDataID, - Parameters: []rfc5424.SDParam{ - { - Name: "name", - Value: name, - }, - { - Name: "value", - Value: strconv.FormatFloat(g.GetValue(), 'g', -1, 64), - }, - { - Name: "unit", - Value: g.GetUnit(), - }, - }, - }, - ) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - messages = append(messages, d) - } - return messages, nil - case *Envelope_Counter: - msg := m.basicSyslogMessage(c, priority) - msg.StructuredData = append(msg.StructuredData, rfc5424.StructuredData{ - ID: counterStructuredDataID, - Parameters: []rfc5424.SDParam{ - { - Name: "name", - Value: m.GetCounter().GetName(), - }, - { - Name: "total", - Value: fmt.Sprint(m.GetCounter().GetTotal()), - }, - { - Name: "delta", - Value: fmt.Sprint(m.GetCounter().GetDelta()), - }, - }, - }, - ) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - return [][]byte{d}, nil - case *Envelope_Event: - msg := m.basicSyslogMessage(c, priority) - msg.Message = []byte(fmt.Sprintf( - "%s: %s\n", - m.GetEvent().GetTitle(), - m.GetEvent().GetBody(), - )) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - return [][]byte{d}, nil - case *Envelope_Timer: - msg := m.basicSyslogMessage(c, priority) - msg.StructuredData = append(msg.StructuredData, rfc5424.StructuredData{ - ID: timerStructuredDataID, - Parameters: []rfc5424.SDParam{ - { - Name: "name", - Value: m.GetTimer().GetName(), - }, - { - Name: "start", - Value: fmt.Sprint(m.GetTimer().GetStart()), - }, - { - Name: "stop", - Value: fmt.Sprint(m.GetTimer().GetStop()), - }, - }, - }, - ) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - return [][]byte{d}, nil - default: - msg := m.basicSyslogMessage(c, priority) - d, err := msg.MarshalBinary() - if err != nil { - return nil, err - } - return [][]byte{d}, nil - } -} - -func (m *Envelope) basicSyslogMessage( - c *syslogConfig, - priority rfc5424.Priority, -) rfc5424.Message { - msg := rfc5424.Message{ - Priority: priority, - Timestamp: time.Unix(0, m.GetTimestamp()).UTC(), - Hostname: c.hostname, - AppName: c.appName, - ProcessID: c.processID, - Message: []byte("\n"), - } - - tags := m.GetTags() - if len(tags) > 0 { - params := make([]rfc5424.SDParam, 0, len(tags)) - for k, v := range tags { - params = append(params, rfc5424.SDParam{Name: k, Value: v}) - } - msg.StructuredData = []rfc5424.StructuredData{ - { - ID: tagsStructuredDataID, - Parameters: params, - }, - } - } - - return msg -} - -func (m *Envelope) generatePriority() (rfc5424.Priority, error) { - if l := m.GetLog(); l != nil { - switch l.Type { - case Log_OUT: - return rfc5424.Info + rfc5424.User, nil - case Log_ERR: - return rfc5424.Error + rfc5424.User, nil - default: - return 0, fmt.Errorf("invalid log type: %s", l.Type) - } - } - return rfc5424.Info + rfc5424.User, nil -} - -func removeNulls(msg []byte) []byte { - return bytes.Replace(msg, []byte{0}, nil, -1) -} - -func appendNewline(msg []byte) []byte { - if !bytes.HasSuffix(msg, []byte("\n")) { - msg = append(msg, byte('\n')) - } - return msg -} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/LICENSE b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/LICENSE similarity index 100% rename from src/vendor/code.cloudfoundry.org/go-loggregator/LICENSE rename to src/vendor/code.cloudfoundry.org/go-loggregator/v9/LICENSE diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/NOTICE b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/NOTICE similarity index 100% rename from src/vendor/code.cloudfoundry.org/go-loggregator/NOTICE rename to src/vendor/code.cloudfoundry.org/go-loggregator/v9/NOTICE diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/doc.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/doc.go similarity index 98% rename from src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/doc.go rename to src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/doc.go index 2187e0bf..4a52c80f 100644 --- a/src/vendor/code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/doc.go +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/doc.go @@ -1,3 +1,2 @@ -package loggregator_v2 - //go:generate ./generate.sh +package loggregator_v2 diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress.pb.go new file mode 100644 index 00000000..594cf287 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress.pb.go @@ -0,0 +1,822 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.21.1 +// source: loggregator-api/v2/egress.proto + +package loggregator_v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EgressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // shard_id instructs Loggregator to shard envelopes between other + // subscriptions with the same shard_id. Loggregator will do its best to + // split the load evenly between subscriptions with the same shard_id + // (unless deterministic_name is set). + ShardId string `protobuf:"bytes,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` + // deterministic_name is used to enable deterministic routing. This implies + // that gauges and counters are routed based on name. If this is excluded, + // then they are routed to split load evenly. + DeterministicName string `protobuf:"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3" json:"deterministic_name,omitempty"` + // TODO: This can be removed once selector has been around long enough. + LegacySelector *Selector `protobuf:"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3" json:"legacy_selector,omitempty"` + // selector is the preferred (over legacy_selector) mechanism to select + // what envelope types the subscription wants. If there are no selectors + // given, no data will be sent. + Selectors []*Selector `protobuf:"bytes,4,rep,name=selectors,proto3" json:"selectors,omitempty"` + // TODO: This can be removed once the envelope.deprecated_tags is removed. + UsePreferredTags bool `protobuf:"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3" json:"use_preferred_tags,omitempty"` +} + +func (x *EgressRequest) Reset() { + *x = EgressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EgressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EgressRequest) ProtoMessage() {} + +func (x *EgressRequest) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EgressRequest.ProtoReflect.Descriptor instead. +func (*EgressRequest) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{0} +} + +func (x *EgressRequest) GetShardId() string { + if x != nil { + return x.ShardId + } + return "" +} + +func (x *EgressRequest) GetDeterministicName() string { + if x != nil { + return x.DeterministicName + } + return "" +} + +func (x *EgressRequest) GetLegacySelector() *Selector { + if x != nil { + return x.LegacySelector + } + return nil +} + +func (x *EgressRequest) GetSelectors() []*Selector { + if x != nil { + return x.Selectors + } + return nil +} + +func (x *EgressRequest) GetUsePreferredTags() bool { + if x != nil { + return x.UsePreferredTags + } + return false +} + +type EgressBatchRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // shard_id instructs Loggregator to shard envelopes between other + // subscriptions with the same shard_id. Loggregator will do its best to + // split the load evenly between subscriptions with the same shard_id + // (unless deterministic_name is set). + ShardId string `protobuf:"bytes,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"` + // deterministic_name is used to enable deterministic routing. This implies + // that gauges and counters are routed based on name. If this is excluded, + // then they are routed to split load evenly. + DeterministicName string `protobuf:"bytes,5,opt,name=deterministic_name,json=deterministicName,proto3" json:"deterministic_name,omitempty"` + // TODO: This can be removed once selector has been around long enough. + LegacySelector *Selector `protobuf:"bytes,2,opt,name=legacy_selector,json=legacySelector,proto3" json:"legacy_selector,omitempty"` + // selector is the preferred (over legacy_selector) mechanism to select + // what envelope types the subscription wants. If there are no selectors + // given, no data will be sent. + Selectors []*Selector `protobuf:"bytes,4,rep,name=selectors,proto3" json:"selectors,omitempty"` + // TODO: This can be removed once the envelope.deprecated_tags is removed. + UsePreferredTags bool `protobuf:"varint,3,opt,name=use_preferred_tags,json=usePreferredTags,proto3" json:"use_preferred_tags,omitempty"` +} + +func (x *EgressBatchRequest) Reset() { + *x = EgressBatchRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EgressBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EgressBatchRequest) ProtoMessage() {} + +func (x *EgressBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EgressBatchRequest.ProtoReflect.Descriptor instead. +func (*EgressBatchRequest) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{1} +} + +func (x *EgressBatchRequest) GetShardId() string { + if x != nil { + return x.ShardId + } + return "" +} + +func (x *EgressBatchRequest) GetDeterministicName() string { + if x != nil { + return x.DeterministicName + } + return "" +} + +func (x *EgressBatchRequest) GetLegacySelector() *Selector { + if x != nil { + return x.LegacySelector + } + return nil +} + +func (x *EgressBatchRequest) GetSelectors() []*Selector { + if x != nil { + return x.Selectors + } + return nil +} + +func (x *EgressBatchRequest) GetUsePreferredTags() bool { + if x != nil { + return x.UsePreferredTags + } + return false +} + +// Selector instructs Loggregator to only send envelopes that match the given +// criteria. +type Selector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + // Types that are assignable to Message: + // *Selector_Log + // *Selector_Counter + // *Selector_Gauge + // *Selector_Timer + // *Selector_Event + Message isSelector_Message `protobuf_oneof:"Message"` +} + +func (x *Selector) Reset() { + *x = Selector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Selector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Selector) ProtoMessage() {} + +func (x *Selector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Selector.ProtoReflect.Descriptor instead. +func (*Selector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{2} +} + +func (x *Selector) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +func (m *Selector) GetMessage() isSelector_Message { + if m != nil { + return m.Message + } + return nil +} + +func (x *Selector) GetLog() *LogSelector { + if x, ok := x.GetMessage().(*Selector_Log); ok { + return x.Log + } + return nil +} + +func (x *Selector) GetCounter() *CounterSelector { + if x, ok := x.GetMessage().(*Selector_Counter); ok { + return x.Counter + } + return nil +} + +func (x *Selector) GetGauge() *GaugeSelector { + if x, ok := x.GetMessage().(*Selector_Gauge); ok { + return x.Gauge + } + return nil +} + +func (x *Selector) GetTimer() *TimerSelector { + if x, ok := x.GetMessage().(*Selector_Timer); ok { + return x.Timer + } + return nil +} + +func (x *Selector) GetEvent() *EventSelector { + if x, ok := x.GetMessage().(*Selector_Event); ok { + return x.Event + } + return nil +} + +type isSelector_Message interface { + isSelector_Message() +} + +type Selector_Log struct { + Log *LogSelector `protobuf:"bytes,2,opt,name=log,proto3,oneof"` +} + +type Selector_Counter struct { + Counter *CounterSelector `protobuf:"bytes,3,opt,name=counter,proto3,oneof"` +} + +type Selector_Gauge struct { + Gauge *GaugeSelector `protobuf:"bytes,4,opt,name=gauge,proto3,oneof"` +} + +type Selector_Timer struct { + Timer *TimerSelector `protobuf:"bytes,5,opt,name=timer,proto3,oneof"` +} + +type Selector_Event struct { + Event *EventSelector `protobuf:"bytes,6,opt,name=event,proto3,oneof"` +} + +func (*Selector_Log) isSelector_Message() {} + +func (*Selector_Counter) isSelector_Message() {} + +func (*Selector_Gauge) isSelector_Message() {} + +func (*Selector_Timer) isSelector_Message() {} + +func (*Selector_Event) isSelector_Message() {} + +// LogSelector instructs Loggregator to egress Log envelopes to the given +// subscription. +type LogSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LogSelector) Reset() { + *x = LogSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogSelector) ProtoMessage() {} + +func (x *LogSelector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogSelector.ProtoReflect.Descriptor instead. +func (*LogSelector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{3} +} + +// GaugeSelector instructs Loggregator to egress Gauge envelopes to the +// given subscription. +type GaugeSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Any egress Gauge envelope must consist of the given names. + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` +} + +func (x *GaugeSelector) Reset() { + *x = GaugeSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GaugeSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GaugeSelector) ProtoMessage() {} + +func (x *GaugeSelector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GaugeSelector.ProtoReflect.Descriptor instead. +func (*GaugeSelector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{4} +} + +func (x *GaugeSelector) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +// CounterSelector instructs Loggregator to egress Counter envelopes to the +// given subscription +type CounterSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Any egress Counter envelope must have the given name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CounterSelector) Reset() { + *x = CounterSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CounterSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CounterSelector) ProtoMessage() {} + +func (x *CounterSelector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CounterSelector.ProtoReflect.Descriptor instead. +func (*CounterSelector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{5} +} + +func (x *CounterSelector) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// TimerSelector instructs Loggregator to egress Timer envelopes to the given +// subscription. +type TimerSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *TimerSelector) Reset() { + *x = TimerSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimerSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimerSelector) ProtoMessage() {} + +func (x *TimerSelector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimerSelector.ProtoReflect.Descriptor instead. +func (*TimerSelector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{6} +} + +// EventSelector instructs Loggregator to egress Event envelopes to the given +// subscription. +type EventSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *EventSelector) Reset() { + *x = EventSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventSelector) ProtoMessage() {} + +func (x *EventSelector) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_egress_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EventSelector.ProtoReflect.Descriptor instead. +func (*EventSelector) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_egress_proto_rawDescGZIP(), []int{7} +} + +var File_loggregator_api_v2_egress_proto protoreflect.FileDescriptor + +var file_loggregator_api_v2_egress_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x1a, 0x21, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x02, 0x0a, 0x0d, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, + 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, + 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, + 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x41, 0x0a, 0x0f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x52, 0x0e, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, + 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, 0x50, 0x72, 0x65, 0x66, + 0x65, 0x72, 0x72, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x12, 0x45, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x73, 0x68, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x68, 0x61, 0x72, 0x64, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x64, + 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, + 0x6e, 0x69, 0x73, 0x74, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x6c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x0e, 0x6c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, + 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x75, 0x73, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x54, + 0x61, 0x67, 0x73, 0x22, 0xc5, 0x02, 0x0a, 0x08, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, + 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6c, 0x6f, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x67, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x3b, + 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x67, + 0x61, 0x75, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x61, 0x75, 0x67, + 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x67, 0x61, 0x75, + 0x67, 0x65, 0x12, 0x35, 0x0a, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x48, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x42, 0x09, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, + 0x6f, 0x67, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x0d, 0x47, 0x61, + 0x75, 0x67, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x22, 0x25, 0x0a, 0x0f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x32, 0xab, 0x01, 0x0a, 0x06, 0x45, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x58, + 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x22, 0x00, 0x30, 0x01, 0x42, 0x6d, 0x0a, 0x1f, 0x6f, 0x72, 0x67, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x6c, 0x6f, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x4c, 0x6f, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5a, 0x37, + 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, + 0x79, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_loggregator_api_v2_egress_proto_rawDescOnce sync.Once + file_loggregator_api_v2_egress_proto_rawDescData = file_loggregator_api_v2_egress_proto_rawDesc +) + +func file_loggregator_api_v2_egress_proto_rawDescGZIP() []byte { + file_loggregator_api_v2_egress_proto_rawDescOnce.Do(func() { + file_loggregator_api_v2_egress_proto_rawDescData = protoimpl.X.CompressGZIP(file_loggregator_api_v2_egress_proto_rawDescData) + }) + return file_loggregator_api_v2_egress_proto_rawDescData +} + +var file_loggregator_api_v2_egress_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_loggregator_api_v2_egress_proto_goTypes = []interface{}{ + (*EgressRequest)(nil), // 0: loggregator.v2.EgressRequest + (*EgressBatchRequest)(nil), // 1: loggregator.v2.EgressBatchRequest + (*Selector)(nil), // 2: loggregator.v2.Selector + (*LogSelector)(nil), // 3: loggregator.v2.LogSelector + (*GaugeSelector)(nil), // 4: loggregator.v2.GaugeSelector + (*CounterSelector)(nil), // 5: loggregator.v2.CounterSelector + (*TimerSelector)(nil), // 6: loggregator.v2.TimerSelector + (*EventSelector)(nil), // 7: loggregator.v2.EventSelector + (*Envelope)(nil), // 8: loggregator.v2.Envelope + (*EnvelopeBatch)(nil), // 9: loggregator.v2.EnvelopeBatch +} +var file_loggregator_api_v2_egress_proto_depIdxs = []int32{ + 2, // 0: loggregator.v2.EgressRequest.legacy_selector:type_name -> loggregator.v2.Selector + 2, // 1: loggregator.v2.EgressRequest.selectors:type_name -> loggregator.v2.Selector + 2, // 2: loggregator.v2.EgressBatchRequest.legacy_selector:type_name -> loggregator.v2.Selector + 2, // 3: loggregator.v2.EgressBatchRequest.selectors:type_name -> loggregator.v2.Selector + 3, // 4: loggregator.v2.Selector.log:type_name -> loggregator.v2.LogSelector + 5, // 5: loggregator.v2.Selector.counter:type_name -> loggregator.v2.CounterSelector + 4, // 6: loggregator.v2.Selector.gauge:type_name -> loggregator.v2.GaugeSelector + 6, // 7: loggregator.v2.Selector.timer:type_name -> loggregator.v2.TimerSelector + 7, // 8: loggregator.v2.Selector.event:type_name -> loggregator.v2.EventSelector + 0, // 9: loggregator.v2.Egress.Receiver:input_type -> loggregator.v2.EgressRequest + 1, // 10: loggregator.v2.Egress.BatchedReceiver:input_type -> loggregator.v2.EgressBatchRequest + 8, // 11: loggregator.v2.Egress.Receiver:output_type -> loggregator.v2.Envelope + 9, // 12: loggregator.v2.Egress.BatchedReceiver:output_type -> loggregator.v2.EnvelopeBatch + 11, // [11:13] is the sub-list for method output_type + 9, // [9:11] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_loggregator_api_v2_egress_proto_init() } +func file_loggregator_api_v2_egress_proto_init() { + if File_loggregator_api_v2_egress_proto != nil { + return + } + file_loggregator_api_v2_envelope_proto_init() + if !protoimpl.UnsafeEnabled { + file_loggregator_api_v2_egress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EgressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EgressBatchRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Selector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LogSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GaugeSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CounterSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimerSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_egress_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_loggregator_api_v2_egress_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Selector_Log)(nil), + (*Selector_Counter)(nil), + (*Selector_Gauge)(nil), + (*Selector_Timer)(nil), + (*Selector_Event)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_loggregator_api_v2_egress_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_loggregator_api_v2_egress_proto_goTypes, + DependencyIndexes: file_loggregator_api_v2_egress_proto_depIdxs, + MessageInfos: file_loggregator_api_v2_egress_proto_msgTypes, + }.Build() + File_loggregator_api_v2_egress_proto = out.File + file_loggregator_api_v2_egress_proto_rawDesc = nil + file_loggregator_api_v2_egress_proto_goTypes = nil + file_loggregator_api_v2_egress_proto_depIdxs = nil +} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress_grpc.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress_grpc.pb.go new file mode 100644 index 00000000..58f33c78 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/egress_grpc.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.1 +// source: loggregator-api/v2/egress.proto + +package loggregator_v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// EgressClient is the client API for Egress service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type EgressClient interface { + Receiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error) + BatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error) +} + +type egressClient struct { + cc grpc.ClientConnInterface +} + +func NewEgressClient(cc grpc.ClientConnInterface) EgressClient { + return &egressClient{cc} +} + +func (c *egressClient) Receiver(ctx context.Context, in *EgressRequest, opts ...grpc.CallOption) (Egress_ReceiverClient, error) { + stream, err := c.cc.NewStream(ctx, &Egress_ServiceDesc.Streams[0], "/loggregator.v2.Egress/Receiver", opts...) + if err != nil { + return nil, err + } + x := &egressReceiverClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Egress_ReceiverClient interface { + Recv() (*Envelope, error) + grpc.ClientStream +} + +type egressReceiverClient struct { + grpc.ClientStream +} + +func (x *egressReceiverClient) Recv() (*Envelope, error) { + m := new(Envelope) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *egressClient) BatchedReceiver(ctx context.Context, in *EgressBatchRequest, opts ...grpc.CallOption) (Egress_BatchedReceiverClient, error) { + stream, err := c.cc.NewStream(ctx, &Egress_ServiceDesc.Streams[1], "/loggregator.v2.Egress/BatchedReceiver", opts...) + if err != nil { + return nil, err + } + x := &egressBatchedReceiverClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Egress_BatchedReceiverClient interface { + Recv() (*EnvelopeBatch, error) + grpc.ClientStream +} + +type egressBatchedReceiverClient struct { + grpc.ClientStream +} + +func (x *egressBatchedReceiverClient) Recv() (*EnvelopeBatch, error) { + m := new(EnvelopeBatch) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// EgressServer is the server API for Egress service. +// All implementations must embed UnimplementedEgressServer +// for forward compatibility +type EgressServer interface { + Receiver(*EgressRequest, Egress_ReceiverServer) error + BatchedReceiver(*EgressBatchRequest, Egress_BatchedReceiverServer) error + mustEmbedUnimplementedEgressServer() +} + +// UnimplementedEgressServer must be embedded to have forward compatible implementations. +type UnimplementedEgressServer struct { +} + +func (UnimplementedEgressServer) Receiver(*EgressRequest, Egress_ReceiverServer) error { + return status.Errorf(codes.Unimplemented, "method Receiver not implemented") +} +func (UnimplementedEgressServer) BatchedReceiver(*EgressBatchRequest, Egress_BatchedReceiverServer) error { + return status.Errorf(codes.Unimplemented, "method BatchedReceiver not implemented") +} +func (UnimplementedEgressServer) mustEmbedUnimplementedEgressServer() {} + +// UnsafeEgressServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EgressServer will +// result in compilation errors. +type UnsafeEgressServer interface { + mustEmbedUnimplementedEgressServer() +} + +func RegisterEgressServer(s grpc.ServiceRegistrar, srv EgressServer) { + s.RegisterService(&Egress_ServiceDesc, srv) +} + +func _Egress_Receiver_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(EgressRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(EgressServer).Receiver(m, &egressReceiverServer{stream}) +} + +type Egress_ReceiverServer interface { + Send(*Envelope) error + grpc.ServerStream +} + +type egressReceiverServer struct { + grpc.ServerStream +} + +func (x *egressReceiverServer) Send(m *Envelope) error { + return x.ServerStream.SendMsg(m) +} + +func _Egress_BatchedReceiver_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(EgressBatchRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(EgressServer).BatchedReceiver(m, &egressBatchedReceiverServer{stream}) +} + +type Egress_BatchedReceiverServer interface { + Send(*EnvelopeBatch) error + grpc.ServerStream +} + +type egressBatchedReceiverServer struct { + grpc.ServerStream +} + +func (x *egressBatchedReceiverServer) Send(m *EnvelopeBatch) error { + return x.ServerStream.SendMsg(m) +} + +// Egress_ServiceDesc is the grpc.ServiceDesc for Egress service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Egress_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "loggregator.v2.Egress", + HandlerType: (*EgressServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Receiver", + Handler: _Egress_Receiver_Handler, + ServerStreams: true, + }, + { + StreamName: "BatchedReceiver", + Handler: _Egress_BatchedReceiver_Handler, + ServerStreams: true, + }, + }, + Metadata: "loggregator-api/v2/egress.proto", +} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/envelope.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/envelope.pb.go new file mode 100644 index 00000000..dc30eb11 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/envelope.pb.go @@ -0,0 +1,1004 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.21.1 +// source: loggregator-api/v2/envelope.proto + +package loggregator_v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Log_Type int32 + +const ( + Log_OUT Log_Type = 0 + Log_ERR Log_Type = 1 +) + +// Enum value maps for Log_Type. +var ( + Log_Type_name = map[int32]string{ + 0: "OUT", + 1: "ERR", + } + Log_Type_value = map[string]int32{ + "OUT": 0, + "ERR": 1, + } +) + +func (x Log_Type) Enum() *Log_Type { + p := new(Log_Type) + *p = x + return p +} + +func (x Log_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Log_Type) Descriptor() protoreflect.EnumDescriptor { + return file_loggregator_api_v2_envelope_proto_enumTypes[0].Descriptor() +} + +func (Log_Type) Type() protoreflect.EnumType { + return &file_loggregator_api_v2_envelope_proto_enumTypes[0] +} + +func (x Log_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Log_Type.Descriptor instead. +func (Log_Type) EnumDescriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{3, 0} +} + +type Envelope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + SourceId string `protobuf:"bytes,2,opt,name=source_id,proto3" json:"source_id,omitempty"` + InstanceId string `protobuf:"bytes,8,opt,name=instance_id,proto3" json:"instance_id,omitempty"` + DeprecatedTags map[string]*Value `protobuf:"bytes,3,rep,name=deprecated_tags,proto3" json:"deprecated_tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Tags map[string]string `protobuf:"bytes,9,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Types that are assignable to Message: + // *Envelope_Log + // *Envelope_Counter + // *Envelope_Gauge + // *Envelope_Timer + // *Envelope_Event + Message isEnvelope_Message `protobuf_oneof:"message"` +} + +func (x *Envelope) Reset() { + *x = Envelope{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Envelope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Envelope) ProtoMessage() {} + +func (x *Envelope) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Envelope.ProtoReflect.Descriptor instead. +func (*Envelope) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{0} +} + +func (x *Envelope) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Envelope) GetSourceId() string { + if x != nil { + return x.SourceId + } + return "" +} + +func (x *Envelope) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *Envelope) GetDeprecatedTags() map[string]*Value { + if x != nil { + return x.DeprecatedTags + } + return nil +} + +func (x *Envelope) GetTags() map[string]string { + if x != nil { + return x.Tags + } + return nil +} + +func (m *Envelope) GetMessage() isEnvelope_Message { + if m != nil { + return m.Message + } + return nil +} + +func (x *Envelope) GetLog() *Log { + if x, ok := x.GetMessage().(*Envelope_Log); ok { + return x.Log + } + return nil +} + +func (x *Envelope) GetCounter() *Counter { + if x, ok := x.GetMessage().(*Envelope_Counter); ok { + return x.Counter + } + return nil +} + +func (x *Envelope) GetGauge() *Gauge { + if x, ok := x.GetMessage().(*Envelope_Gauge); ok { + return x.Gauge + } + return nil +} + +func (x *Envelope) GetTimer() *Timer { + if x, ok := x.GetMessage().(*Envelope_Timer); ok { + return x.Timer + } + return nil +} + +func (x *Envelope) GetEvent() *Event { + if x, ok := x.GetMessage().(*Envelope_Event); ok { + return x.Event + } + return nil +} + +type isEnvelope_Message interface { + isEnvelope_Message() +} + +type Envelope_Log struct { + Log *Log `protobuf:"bytes,4,opt,name=log,proto3,oneof"` +} + +type Envelope_Counter struct { + Counter *Counter `protobuf:"bytes,5,opt,name=counter,proto3,oneof"` +} + +type Envelope_Gauge struct { + Gauge *Gauge `protobuf:"bytes,6,opt,name=gauge,proto3,oneof"` +} + +type Envelope_Timer struct { + Timer *Timer `protobuf:"bytes,7,opt,name=timer,proto3,oneof"` +} + +type Envelope_Event struct { + Event *Event `protobuf:"bytes,10,opt,name=event,proto3,oneof"` +} + +func (*Envelope_Log) isEnvelope_Message() {} + +func (*Envelope_Counter) isEnvelope_Message() {} + +func (*Envelope_Gauge) isEnvelope_Message() {} + +func (*Envelope_Timer) isEnvelope_Message() {} + +func (*Envelope_Event) isEnvelope_Message() {} + +type EnvelopeBatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Batch []*Envelope `protobuf:"bytes,1,rep,name=batch,proto3" json:"batch,omitempty"` +} + +func (x *EnvelopeBatch) Reset() { + *x = EnvelopeBatch{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvelopeBatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvelopeBatch) ProtoMessage() {} + +func (x *EnvelopeBatch) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvelopeBatch.ProtoReflect.Descriptor instead. +func (*EnvelopeBatch) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{1} +} + +func (x *EnvelopeBatch) GetBatch() []*Envelope { + if x != nil { + return x.Batch + } + return nil +} + +type Value struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Data: + // *Value_Text + // *Value_Integer + // *Value_Decimal + Data isValue_Data `protobuf_oneof:"data"` +} + +func (x *Value) Reset() { + *x = Value{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Value) ProtoMessage() {} + +func (x *Value) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Value.ProtoReflect.Descriptor instead. +func (*Value) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{2} +} + +func (m *Value) GetData() isValue_Data { + if m != nil { + return m.Data + } + return nil +} + +func (x *Value) GetText() string { + if x, ok := x.GetData().(*Value_Text); ok { + return x.Text + } + return "" +} + +func (x *Value) GetInteger() int64 { + if x, ok := x.GetData().(*Value_Integer); ok { + return x.Integer + } + return 0 +} + +func (x *Value) GetDecimal() float64 { + if x, ok := x.GetData().(*Value_Decimal); ok { + return x.Decimal + } + return 0 +} + +type isValue_Data interface { + isValue_Data() +} + +type Value_Text struct { + Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"` +} + +type Value_Integer struct { + Integer int64 `protobuf:"varint,2,opt,name=integer,proto3,oneof"` +} + +type Value_Decimal struct { + Decimal float64 `protobuf:"fixed64,3,opt,name=decimal,proto3,oneof"` +} + +func (*Value_Text) isValue_Data() {} + +func (*Value_Integer) isValue_Data() {} + +func (*Value_Decimal) isValue_Data() {} + +type Log struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + Type Log_Type `protobuf:"varint,2,opt,name=type,proto3,enum=loggregator.v2.Log_Type" json:"type,omitempty"` +} + +func (x *Log) Reset() { + *x = Log{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Log) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Log) ProtoMessage() {} + +func (x *Log) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Log.ProtoReflect.Descriptor instead. +func (*Log) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{3} +} + +func (x *Log) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + +func (x *Log) GetType() Log_Type { + if x != nil { + return x.Type + } + return Log_OUT +} + +type Counter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Delta uint64 `protobuf:"varint,2,opt,name=delta,proto3" json:"delta,omitempty"` + Total uint64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` +} + +func (x *Counter) Reset() { + *x = Counter{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Counter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Counter) ProtoMessage() {} + +func (x *Counter) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Counter.ProtoReflect.Descriptor instead. +func (*Counter) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{4} +} + +func (x *Counter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Counter) GetDelta() uint64 { + if x != nil { + return x.Delta + } + return 0 +} + +func (x *Counter) GetTotal() uint64 { + if x != nil { + return x.Total + } + return 0 +} + +type Gauge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metrics map[string]*GaugeValue `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Gauge) Reset() { + *x = Gauge{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Gauge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gauge) ProtoMessage() {} + +func (x *Gauge) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gauge.ProtoReflect.Descriptor instead. +func (*Gauge) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{5} +} + +func (x *Gauge) GetMetrics() map[string]*GaugeValue { + if x != nil { + return x.Metrics + } + return nil +} + +type GaugeValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Unit string `protobuf:"bytes,1,opt,name=unit,proto3" json:"unit,omitempty"` + Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GaugeValue) Reset() { + *x = GaugeValue{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GaugeValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GaugeValue) ProtoMessage() {} + +func (x *GaugeValue) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GaugeValue.ProtoReflect.Descriptor instead. +func (*GaugeValue) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{6} +} + +func (x *GaugeValue) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +func (x *GaugeValue) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +type Timer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Start int64 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + Stop int64 `protobuf:"varint,3,opt,name=stop,proto3" json:"stop,omitempty"` +} + +func (x *Timer) Reset() { + *x = Timer{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Timer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Timer) ProtoMessage() {} + +func (x *Timer) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Timer.ProtoReflect.Descriptor instead. +func (*Timer) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{7} +} + +func (x *Timer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Timer) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Timer) GetStop() int64 { + if x != nil { + return x.Stop + } + return 0 +} + +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_envelope_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_envelope_proto_rawDescGZIP(), []int{8} +} + +func (x *Event) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Event) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +var File_loggregator_api_v2_envelope_proto protoreflect.FileDescriptor + +var file_loggregator_api_v2_envelope_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x22, 0x81, 0x05, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x56, + 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x36, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, 0x54, + 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x27, + 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x67, + 0x48, 0x00, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x33, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x05, + 0x67, 0x61, 0x75, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x6f, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x61, 0x75, + 0x67, 0x65, 0x48, 0x00, 0x52, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, + 0x69, 0x6d, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x05, 0x74, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0x58, 0x0a, 0x13, 0x44, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x09, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3f, 0x0a, 0x0d, 0x45, 0x6e, 0x76, 0x65, 0x6c, + 0x6f, 0x70, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x2e, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, + 0x65, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, 0x5d, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x07, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x07, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x42, + 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x67, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x18, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, + 0x0a, 0x03, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x52, 0x52, 0x10, 0x01, + 0x22, 0x49, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, + 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x9d, 0x01, 0x0a, 0x05, + 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x2e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x1a, 0x56, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x0a, 0x47, + 0x61, 0x75, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x45, 0x0a, 0x05, 0x54, 0x69, 0x6d, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x74, 0x6f, 0x70, 0x22, 0x31, 0x0a, 0x05, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x42, 0x6f, 0x0a, + 0x1f, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, + 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x42, 0x13, 0x4c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x76, + 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5a, 0x37, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x6f, 0x2d, + 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x32, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_loggregator_api_v2_envelope_proto_rawDescOnce sync.Once + file_loggregator_api_v2_envelope_proto_rawDescData = file_loggregator_api_v2_envelope_proto_rawDesc +) + +func file_loggregator_api_v2_envelope_proto_rawDescGZIP() []byte { + file_loggregator_api_v2_envelope_proto_rawDescOnce.Do(func() { + file_loggregator_api_v2_envelope_proto_rawDescData = protoimpl.X.CompressGZIP(file_loggregator_api_v2_envelope_proto_rawDescData) + }) + return file_loggregator_api_v2_envelope_proto_rawDescData +} + +var file_loggregator_api_v2_envelope_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_loggregator_api_v2_envelope_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_loggregator_api_v2_envelope_proto_goTypes = []interface{}{ + (Log_Type)(0), // 0: loggregator.v2.Log.Type + (*Envelope)(nil), // 1: loggregator.v2.Envelope + (*EnvelopeBatch)(nil), // 2: loggregator.v2.EnvelopeBatch + (*Value)(nil), // 3: loggregator.v2.Value + (*Log)(nil), // 4: loggregator.v2.Log + (*Counter)(nil), // 5: loggregator.v2.Counter + (*Gauge)(nil), // 6: loggregator.v2.Gauge + (*GaugeValue)(nil), // 7: loggregator.v2.GaugeValue + (*Timer)(nil), // 8: loggregator.v2.Timer + (*Event)(nil), // 9: loggregator.v2.Event + nil, // 10: loggregator.v2.Envelope.DeprecatedTagsEntry + nil, // 11: loggregator.v2.Envelope.TagsEntry + nil, // 12: loggregator.v2.Gauge.MetricsEntry +} +var file_loggregator_api_v2_envelope_proto_depIdxs = []int32{ + 10, // 0: loggregator.v2.Envelope.deprecated_tags:type_name -> loggregator.v2.Envelope.DeprecatedTagsEntry + 11, // 1: loggregator.v2.Envelope.tags:type_name -> loggregator.v2.Envelope.TagsEntry + 4, // 2: loggregator.v2.Envelope.log:type_name -> loggregator.v2.Log + 5, // 3: loggregator.v2.Envelope.counter:type_name -> loggregator.v2.Counter + 6, // 4: loggregator.v2.Envelope.gauge:type_name -> loggregator.v2.Gauge + 8, // 5: loggregator.v2.Envelope.timer:type_name -> loggregator.v2.Timer + 9, // 6: loggregator.v2.Envelope.event:type_name -> loggregator.v2.Event + 1, // 7: loggregator.v2.EnvelopeBatch.batch:type_name -> loggregator.v2.Envelope + 0, // 8: loggregator.v2.Log.type:type_name -> loggregator.v2.Log.Type + 12, // 9: loggregator.v2.Gauge.metrics:type_name -> loggregator.v2.Gauge.MetricsEntry + 3, // 10: loggregator.v2.Envelope.DeprecatedTagsEntry.value:type_name -> loggregator.v2.Value + 7, // 11: loggregator.v2.Gauge.MetricsEntry.value:type_name -> loggregator.v2.GaugeValue + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_loggregator_api_v2_envelope_proto_init() } +func file_loggregator_api_v2_envelope_proto_init() { + if File_loggregator_api_v2_envelope_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_loggregator_api_v2_envelope_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Envelope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvelopeBatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Value); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Counter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Gauge); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GaugeValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Timer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_loggregator_api_v2_envelope_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Envelope_Log)(nil), + (*Envelope_Counter)(nil), + (*Envelope_Gauge)(nil), + (*Envelope_Timer)(nil), + (*Envelope_Event)(nil), + } + file_loggregator_api_v2_envelope_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Value_Text)(nil), + (*Value_Integer)(nil), + (*Value_Decimal)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_loggregator_api_v2_envelope_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_loggregator_api_v2_envelope_proto_goTypes, + DependencyIndexes: file_loggregator_api_v2_envelope_proto_depIdxs, + EnumInfos: file_loggregator_api_v2_envelope_proto_enumTypes, + MessageInfos: file_loggregator_api_v2_envelope_proto_msgTypes, + }.Build() + File_loggregator_api_v2_envelope_proto = out.File + file_loggregator_api_v2_envelope_proto_rawDesc = nil + file_loggregator_api_v2_envelope_proto_goTypes = nil + file_loggregator_api_v2_envelope_proto_depIdxs = nil +} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/generate.sh b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/generate.sh new file mode 100644 index 00000000..214c5231 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/generate.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -eu + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +go install google.golang.org/protobuf/cmd/protoc-gen-go@latest +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + +TMP_DIR=$(mktemp -d) +git clone https://github.com/cloudfoundry/loggregator-api.git $TMP_DIR/loggregator-api + +pushd $SCRIPT_DIR/../.. + protoc -I=$TMP_DIR --go_out=. --go-grpc_out=. $TMP_DIR/loggregator-api/v2/*.proto + mv code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2/* rpc/loggregator_v2/ + rm -rf code.cloudfoundry.org +popd + +rm -rf $TMP_DIR diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress.pb.go new file mode 100644 index 00000000..688c55b8 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress.pb.go @@ -0,0 +1,270 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.0 +// protoc v3.21.1 +// source: loggregator-api/v2/ingress.proto + +package loggregator_v2 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type IngressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *IngressResponse) Reset() { + *x = IngressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IngressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IngressResponse) ProtoMessage() {} + +func (x *IngressResponse) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IngressResponse.ProtoReflect.Descriptor instead. +func (*IngressResponse) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_ingress_proto_rawDescGZIP(), []int{0} +} + +type BatchSenderResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BatchSenderResponse) Reset() { + *x = BatchSenderResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BatchSenderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BatchSenderResponse) ProtoMessage() {} + +func (x *BatchSenderResponse) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BatchSenderResponse.ProtoReflect.Descriptor instead. +func (*BatchSenderResponse) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_ingress_proto_rawDescGZIP(), []int{1} +} + +type SendResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SendResponse) Reset() { + *x = SendResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendResponse) ProtoMessage() {} + +func (x *SendResponse) ProtoReflect() protoreflect.Message { + mi := &file_loggregator_api_v2_ingress_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendResponse.ProtoReflect.Descriptor instead. +func (*SendResponse) Descriptor() ([]byte, []int) { + return file_loggregator_api_v2_ingress_proto_rawDescGZIP(), []int{2} +} + +var File_loggregator_api_v2_ingress_proto protoreflect.FileDescriptor + +var file_loggregator_api_v2_ingress_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2d, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x32, 0x1a, 0x21, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2d, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x11, 0x0a, 0x0f, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x0e, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xf0, 0x01, 0x0a, 0x07, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x47, 0x0a, 0x06, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x1a, + 0x1f, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x32, + 0x2e, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x28, 0x01, 0x12, 0x55, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0x45, 0x0a, 0x04, 0x53, + 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x6e, 0x0a, 0x1f, 0x6f, 0x72, 0x67, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x66, + 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x4c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5a, 0x37, 0x63, 0x6f, 0x64, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x79, 0x2e, 0x6f, 0x72, 0x67, + 0x2f, 0x67, 0x6f, 0x2d, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x72, 0x70, 0x63, 0x2f, 0x6c, 0x6f, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_loggregator_api_v2_ingress_proto_rawDescOnce sync.Once + file_loggregator_api_v2_ingress_proto_rawDescData = file_loggregator_api_v2_ingress_proto_rawDesc +) + +func file_loggregator_api_v2_ingress_proto_rawDescGZIP() []byte { + file_loggregator_api_v2_ingress_proto_rawDescOnce.Do(func() { + file_loggregator_api_v2_ingress_proto_rawDescData = protoimpl.X.CompressGZIP(file_loggregator_api_v2_ingress_proto_rawDescData) + }) + return file_loggregator_api_v2_ingress_proto_rawDescData +} + +var file_loggregator_api_v2_ingress_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_loggregator_api_v2_ingress_proto_goTypes = []interface{}{ + (*IngressResponse)(nil), // 0: loggregator.v2.IngressResponse + (*BatchSenderResponse)(nil), // 1: loggregator.v2.BatchSenderResponse + (*SendResponse)(nil), // 2: loggregator.v2.SendResponse + (*Envelope)(nil), // 3: loggregator.v2.Envelope + (*EnvelopeBatch)(nil), // 4: loggregator.v2.EnvelopeBatch +} +var file_loggregator_api_v2_ingress_proto_depIdxs = []int32{ + 3, // 0: loggregator.v2.Ingress.Sender:input_type -> loggregator.v2.Envelope + 4, // 1: loggregator.v2.Ingress.BatchSender:input_type -> loggregator.v2.EnvelopeBatch + 4, // 2: loggregator.v2.Ingress.Send:input_type -> loggregator.v2.EnvelopeBatch + 0, // 3: loggregator.v2.Ingress.Sender:output_type -> loggregator.v2.IngressResponse + 1, // 4: loggregator.v2.Ingress.BatchSender:output_type -> loggregator.v2.BatchSenderResponse + 2, // 5: loggregator.v2.Ingress.Send:output_type -> loggregator.v2.SendResponse + 3, // [3:6] is the sub-list for method output_type + 0, // [0:3] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_loggregator_api_v2_ingress_proto_init() } +func file_loggregator_api_v2_ingress_proto_init() { + if File_loggregator_api_v2_ingress_proto != nil { + return + } + file_loggregator_api_v2_envelope_proto_init() + if !protoimpl.UnsafeEnabled { + file_loggregator_api_v2_ingress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IngressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_ingress_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BatchSenderResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_loggregator_api_v2_ingress_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_loggregator_api_v2_ingress_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_loggregator_api_v2_ingress_proto_goTypes, + DependencyIndexes: file_loggregator_api_v2_ingress_proto_depIdxs, + MessageInfos: file_loggregator_api_v2_ingress_proto_msgTypes, + }.Build() + File_loggregator_api_v2_ingress_proto = out.File + file_loggregator_api_v2_ingress_proto_rawDesc = nil + file_loggregator_api_v2_ingress_proto_goTypes = nil + file_loggregator_api_v2_ingress_proto_depIdxs = nil +} diff --git a/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress_grpc.pb.go b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress_grpc.pb.go new file mode 100644 index 00000000..f3334ab5 --- /dev/null +++ b/src/vendor/code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2/ingress_grpc.pb.go @@ -0,0 +1,246 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.21.1 +// source: loggregator-api/v2/ingress.proto + +package loggregator_v2 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// IngressClient is the client API for Ingress service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type IngressClient interface { + Sender(ctx context.Context, opts ...grpc.CallOption) (Ingress_SenderClient, error) + BatchSender(ctx context.Context, opts ...grpc.CallOption) (Ingress_BatchSenderClient, error) + Send(ctx context.Context, in *EnvelopeBatch, opts ...grpc.CallOption) (*SendResponse, error) +} + +type ingressClient struct { + cc grpc.ClientConnInterface +} + +func NewIngressClient(cc grpc.ClientConnInterface) IngressClient { + return &ingressClient{cc} +} + +func (c *ingressClient) Sender(ctx context.Context, opts ...grpc.CallOption) (Ingress_SenderClient, error) { + stream, err := c.cc.NewStream(ctx, &Ingress_ServiceDesc.Streams[0], "/loggregator.v2.Ingress/Sender", opts...) + if err != nil { + return nil, err + } + x := &ingressSenderClient{stream} + return x, nil +} + +type Ingress_SenderClient interface { + Send(*Envelope) error + CloseAndRecv() (*IngressResponse, error) + grpc.ClientStream +} + +type ingressSenderClient struct { + grpc.ClientStream +} + +func (x *ingressSenderClient) Send(m *Envelope) error { + return x.ClientStream.SendMsg(m) +} + +func (x *ingressSenderClient) CloseAndRecv() (*IngressResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(IngressResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *ingressClient) BatchSender(ctx context.Context, opts ...grpc.CallOption) (Ingress_BatchSenderClient, error) { + stream, err := c.cc.NewStream(ctx, &Ingress_ServiceDesc.Streams[1], "/loggregator.v2.Ingress/BatchSender", opts...) + if err != nil { + return nil, err + } + x := &ingressBatchSenderClient{stream} + return x, nil +} + +type Ingress_BatchSenderClient interface { + Send(*EnvelopeBatch) error + CloseAndRecv() (*BatchSenderResponse, error) + grpc.ClientStream +} + +type ingressBatchSenderClient struct { + grpc.ClientStream +} + +func (x *ingressBatchSenderClient) Send(m *EnvelopeBatch) error { + return x.ClientStream.SendMsg(m) +} + +func (x *ingressBatchSenderClient) CloseAndRecv() (*BatchSenderResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(BatchSenderResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *ingressClient) Send(ctx context.Context, in *EnvelopeBatch, opts ...grpc.CallOption) (*SendResponse, error) { + out := new(SendResponse) + err := c.cc.Invoke(ctx, "/loggregator.v2.Ingress/Send", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IngressServer is the server API for Ingress service. +// All implementations must embed UnimplementedIngressServer +// for forward compatibility +type IngressServer interface { + Sender(Ingress_SenderServer) error + BatchSender(Ingress_BatchSenderServer) error + Send(context.Context, *EnvelopeBatch) (*SendResponse, error) + mustEmbedUnimplementedIngressServer() +} + +// UnimplementedIngressServer must be embedded to have forward compatible implementations. +type UnimplementedIngressServer struct { +} + +func (UnimplementedIngressServer) Sender(Ingress_SenderServer) error { + return status.Errorf(codes.Unimplemented, "method Sender not implemented") +} +func (UnimplementedIngressServer) BatchSender(Ingress_BatchSenderServer) error { + return status.Errorf(codes.Unimplemented, "method BatchSender not implemented") +} +func (UnimplementedIngressServer) Send(context.Context, *EnvelopeBatch) (*SendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") +} +func (UnimplementedIngressServer) mustEmbedUnimplementedIngressServer() {} + +// UnsafeIngressServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to IngressServer will +// result in compilation errors. +type UnsafeIngressServer interface { + mustEmbedUnimplementedIngressServer() +} + +func RegisterIngressServer(s grpc.ServiceRegistrar, srv IngressServer) { + s.RegisterService(&Ingress_ServiceDesc, srv) +} + +func _Ingress_Sender_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(IngressServer).Sender(&ingressSenderServer{stream}) +} + +type Ingress_SenderServer interface { + SendAndClose(*IngressResponse) error + Recv() (*Envelope, error) + grpc.ServerStream +} + +type ingressSenderServer struct { + grpc.ServerStream +} + +func (x *ingressSenderServer) SendAndClose(m *IngressResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *ingressSenderServer) Recv() (*Envelope, error) { + m := new(Envelope) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Ingress_BatchSender_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(IngressServer).BatchSender(&ingressBatchSenderServer{stream}) +} + +type Ingress_BatchSenderServer interface { + SendAndClose(*BatchSenderResponse) error + Recv() (*EnvelopeBatch, error) + grpc.ServerStream +} + +type ingressBatchSenderServer struct { + grpc.ServerStream +} + +func (x *ingressBatchSenderServer) SendAndClose(m *BatchSenderResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *ingressBatchSenderServer) Recv() (*EnvelopeBatch, error) { + m := new(EnvelopeBatch) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Ingress_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnvelopeBatch) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IngressServer).Send(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/loggregator.v2.Ingress/Send", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IngressServer).Send(ctx, req.(*EnvelopeBatch)) + } + return interceptor(ctx, in, info, handler) +} + +// Ingress_ServiceDesc is the grpc.ServiceDesc for Ingress service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Ingress_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "loggregator.v2.Ingress", + HandlerType: (*IngressServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Send", + Handler: _Ingress_Send_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Sender", + Handler: _Ingress_Sender_Handler, + ClientStreams: true, + }, + { + StreamName: "BatchSender", + Handler: _Ingress_BatchSender_Handler, + ClientStreams: true, + }, + }, + Metadata: "loggregator-api/v2/ingress.proto", +} diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/.travis.yml b/src/vendor/code.cloudfoundry.org/rfc5424/.travis.yml deleted file mode 100644 index d15fd7c0..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go - -go: - - 1.10 - - 1.11 diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/LICENSE b/src/vendor/code.cloudfoundry.org/rfc5424/LICENSE deleted file mode 100644 index b4a8ea6d..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSD 2-Clause License - -Copyright (c) 2016, Ross Kinder -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/README.md b/src/vendor/code.cloudfoundry.org/rfc5424/README.md deleted file mode 100644 index 990975b5..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/README.md +++ /dev/null @@ -1,28 +0,0 @@ - -[![Build Status](https://travis-ci.org/crewjam/rfc5424.png)](https://travis-ci.org/crewjam/rfc5424) - -[![](https://godoc.org/github.com/crewjam/rfc5424?status.png)](http://godoc.org/github.com/crewjam/rfc5424) - -This is a Go library that can read and write RFC-5424 syslog messages: - -Example usage: - - m := rfc5424.Message{ - Priority: rfc5424.Daemon | rfc5424.Info, - Timestamp: time.Now(), - Hostname: "myhostname", - AppName: "someapp", - Message: []byte("Hello, World!"), - } - m.AddDatum("foo@1234", "Revision", "1.2.3.4") - m.WriteTo(os.Stdout) - -Produces output like: - - 107 <7>1 2016-02-28T09:57:10.804642398-05:00 myhostname someapp - - [foo@1234 Revision="1.2.3.4"] Hello, World! - -You can also use the library to parse syslog messages: - - m := rfc5424.Message{} - _, err := m.ReadFrom(os.Stdin) - fmt.Printf("%s\n", m.Message) diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/marshal.go b/src/vendor/code.cloudfoundry.org/rfc5424/marshal.go deleted file mode 100644 index a2904887..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/marshal.go +++ /dev/null @@ -1,179 +0,0 @@ -package rfc5424 - -import ( - "bytes" - "fmt" - "unicode/utf8" -) - -// allowLongSdNames is true to allow names longer than the RFC-specified limit -// of 32-characters. (When true, this violates RFC-5424). -const allowLongSdNames = true - -// RFC5424TimeOffsetNum is the timestamp defined by RFC-5424 with the -// NUMOFFSET instead of Z. -const RFC5424TimeOffsetNum = "2006-01-02T15:04:05.999999-07:00" - -// RFC5424TimeOffsetUTC is the timestamp defined by RFC-5424 with the offset -// set to 0 for UTC. -const RFC5424TimeOffsetUTC = "2006-01-02T15:04:05.999999Z" - -// ErrInvalidValue is returned when a log message cannot be emitted because one -// of the values is invalid. -type ErrInvalidValue struct { - Property string - Value interface{} -} - -func (e ErrInvalidValue) Error() string { - return fmt.Sprintf("Message cannot be serialized because %s is invalid: %v", - e.Property, e.Value) -} - -// invalidValue returns an invalid value error with the given property -func invalidValue(property string, value interface{}) error { - return ErrInvalidValue{Property: property, Value: value} -} - -func nilify(x string) string { - if x == "" { - return "-" - } - return x -} - -func escapeSDParam(s string) string { - escapeCount := 0 - for i := 0; i < len(s); i++ { - switch s[i] { - case '\\', '"', ']': - escapeCount++ - } - } - if escapeCount == 0 { - return s - } - - t := make([]byte, len(s)+escapeCount) - j := 0 - for i := 0; i < len(s); i++ { - switch c := s[i]; c { - case '\\', '"', ']': - t[j] = '\\' - t[j+1] = c - j += 2 - default: - t[j] = s[i] - j++ - } - } - return string(t) -} - -func isPrintableUsASCII(s string) bool { - for _, ch := range s { - if ch < 33 || ch > 126 { - return false - } - } - return true -} - -func isValidSdName(s string) bool { - if !allowLongSdNames && len(s) > 32 { - return false - } - for _, ch := range s { - if ch < 33 || ch > 126 { - return false - } - if ch == '=' || ch == ']' || ch == '"' { - return false - } - } - return true -} - -func (m Message) assertValid() error { - - // HOSTNAME = NILVALUE / 1*255PRINTUSASCII - if !isPrintableUsASCII(m.Hostname) { - return invalidValue("Hostname", m.Hostname) - } - if len(m.Hostname) > 255 { - return invalidValue("Hostname", m.Hostname) - } - - // APP-NAME = NILVALUE / 1*48PRINTUSASCII - if !isPrintableUsASCII(m.AppName) { - return invalidValue("AppName", m.AppName) - } - if len(m.AppName) > 48 { - return invalidValue("AppName", m.AppName) - } - - // PROCID = NILVALUE / 1*128PRINTUSASCII - if !isPrintableUsASCII(m.ProcessID) { - return invalidValue("ProcessID", m.ProcessID) - } - if len(m.ProcessID) > 128 { - return invalidValue("ProcessID", m.ProcessID) - } - - // MSGID = NILVALUE / 1*32PRINTUSASCII - if !isPrintableUsASCII(m.MessageID) { - return invalidValue("MessageID", m.MessageID) - } - if len(m.MessageID) > 32 { - return invalidValue("MessageID", m.MessageID) - } - - for _, sdElement := range m.StructuredData { - if !isValidSdName(sdElement.ID) { - return invalidValue("StructuredData/ID", sdElement.ID) - } - for _, sdParam := range sdElement.Parameters { - if !isValidSdName(sdParam.Name) { - return invalidValue("StructuredData/Name", sdParam.Name) - } - if !utf8.ValidString(sdParam.Value) { - return invalidValue("StructuredData/Value", sdParam.Value) - } - } - } - return nil -} - -// MarshalBinary marshals the message to a byte slice, or returns an error -func (m Message) MarshalBinary() ([]byte, error) { - if err := m.assertValid(); err != nil { - return nil, err - } - - b := bytes.NewBuffer(nil) - fmt.Fprintf(b, "<%d>1 %s %s %s %s %s ", - m.Priority, - m.Timestamp.Format(RFC5424TimeOffsetNum), - nilify(m.Hostname), - nilify(m.AppName), - nilify(m.ProcessID), - nilify(m.MessageID)) - - if len(m.StructuredData) == 0 { - fmt.Fprint(b, "-") - } - for _, sdElement := range m.StructuredData { - fmt.Fprintf(b, "[%s", sdElement.ID) - for _, sdParam := range sdElement.Parameters { - fmt.Fprintf(b, " %s=\"%s\"", sdParam.Name, - escapeSDParam(sdParam.Value)) - } - fmt.Fprintf(b, "]") - } - - if len(m.Message) > 0 { - fmt.Fprint(b, " ") - b.Write(m.Message) - } - return b.Bytes(), nil -} diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/message.go b/src/vendor/code.cloudfoundry.org/rfc5424/message.go deleted file mode 100644 index a6bbec5e..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/message.go +++ /dev/null @@ -1,76 +0,0 @@ -// Pacakge rfc5424 is a library for parsing and serializing RFC-5424 structured -// syslog messages. -// -// Example usage: -// -// m := rfc5424.Message{ -// Priority: rfc5424.Daemon | rfc5424.Info, -// Timestamp: time.Now(), -// Hostname: "myhostname", -// AppName: "someapp", -// Message: []byte("Hello, World!"), -// } -// m.AddDatum("foo@1234", "Revision", "1.2.3.4") -// m.WriteTo(os.Stdout) -// -// Produces output like: -// -// 107 <7>1 2016-02-28T09:57:10.804642398-05:00 myhostname someapp - - [foo@1234 Revision="1.2.3.4"] Hello, World! -// -// You can also use the library to parse syslog messages: -// -// m := rfc5424.Message{} -// _, err := m.ReadFrom(os.Stdin) -// fmt.Printf("%s\n", m.Message) -package rfc5424 - -import "time" - -// Message represents a log message as defined by RFC-5424 -// (https://tools.ietf.org/html/rfc5424) -type Message struct { - Priority Priority - Timestamp time.Time - Hostname string - AppName string - ProcessID string - MessageID string - StructuredData []StructuredData - Message []byte -} - -// SDParam represents parameters for structured data -type SDParam struct { - Name string - Value string -} - -// StructuredData represents structured data within a log message -type StructuredData struct { - ID string - Parameters []SDParam -} - -// AddDatum adds structured data to a log message -func (m *Message) AddDatum(ID string, Name string, Value string) { - if m.StructuredData == nil { - m.StructuredData = []StructuredData{} - } - for i, sd := range m.StructuredData { - if sd.ID == ID { - sd.Parameters = append(sd.Parameters, SDParam{Name: Name, Value: Value}) - m.StructuredData[i] = sd - return - } - } - - m.StructuredData = append(m.StructuredData, StructuredData{ - ID: ID, - Parameters: []SDParam{ - { - Name: Name, - Value: Value, - }, - }, - }) -} diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/rfc5424.go b/src/vendor/code.cloudfoundry.org/rfc5424/rfc5424.go deleted file mode 100644 index e1432933..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/rfc5424.go +++ /dev/null @@ -1,40 +0,0 @@ -package rfc5424 - -const severityMask = 0x07 -const facilityMask = 0xf8 - -type Priority int - -const ( - Emergency Priority = iota - Alert - Crit - Error - Warning - Notice - Info - Debug -) - -const ( - Kern Priority = iota << 3 - User - Mail - Daemon - Auth - Syslog - Lpr - News - Uucp - Cron - Authpriv - Ftp - Local0 - Local1 - Local2 - Local3 - Local4 - Local5 - Local6 - Local7 -) diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/stream.go b/src/vendor/code.cloudfoundry.org/rfc5424/stream.go deleted file mode 100644 index 9cc56cae..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/stream.go +++ /dev/null @@ -1,63 +0,0 @@ -package rfc5424 - -import ( - "fmt" - "io" - "io/ioutil" - "strconv" -) - -// WriteTo writes the message to a stream of messages in the style defined -// by RFC-5425. (It does not implement the TLS stuff described in the RFC, just -// the length delimiting. -func (m Message) WriteTo(w io.Writer) (int64, error) { - b, err := m.MarshalBinary() - if err != nil { - return 0, err - } - n, err := fmt.Fprintf(w, "%d %s", len(b), b) - - return int64(n), err -} - -func readUntilSpace(r io.Reader) ([]byte, int, error) { - buf := []byte{} - nbytes := 0 - for { - b := []byte{0} - n, err := r.Read(b) - nbytes += n - if err != nil { - return nil, nbytes, err - } - if b[0] == ' ' { - return buf, nbytes, nil - } - buf = append(buf, b...) - } -} - -// ReadFrom reads a single record from an RFC-5425 style stream of messages -func (m *Message) ReadFrom(r io.Reader) (int64, error) { - lengthBuf, n1, err := readUntilSpace(r) - if err != nil { - return 0, err - } - length, err := strconv.Atoi(string(lengthBuf)) - if err != nil { - return 0, err - } - r2 := io.LimitReader(r, int64(length)) - buf, err := ioutil.ReadAll(r2) - if err != nil { - return int64(n1 + len(buf)), err - } - if len(buf) != int(length) { - return int64(n1 + len(buf)), fmt.Errorf("Expected to read %d bytes, got %d", length, len(buf)) - } - err = m.UnmarshalBinary(buf) - if err != nil { - return 0, err - } - return int64(n1 + len(buf)), err -} diff --git a/src/vendor/code.cloudfoundry.org/rfc5424/unmarshal.go b/src/vendor/code.cloudfoundry.org/rfc5424/unmarshal.go deleted file mode 100644 index 000e24c5..00000000 --- a/src/vendor/code.cloudfoundry.org/rfc5424/unmarshal.go +++ /dev/null @@ -1,452 +0,0 @@ -package rfc5424 - -import ( - "bytes" - "fmt" - "io" - "strconv" - "time" - "unicode" -) - -// ErrBadFormat is the error that is returned when a log message cannot be parsed -type ErrBadFormat struct { - Property string -} - -func (e ErrBadFormat) Error() string { - return fmt.Sprintf("Message cannot be unmarshaled because it is not well formed (%s)", - e.Property) -} - -// badFormat returns a bad format error with the given property -func badFormat(property string) error { - return ErrBadFormat{Property: property} -} - -// UnmarshalBinary unmarshals a byte slice into a message -func (m *Message) UnmarshalBinary(inputBuffer []byte) error { - r := bytes.NewBuffer(inputBuffer) - - // RFC-5424 - // SYSLOG-MSG = HEADER SP STRUCTURED-DATA [SP MSG] - if err := m.readHeader(r); err != nil { - return err - } - - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readStructuredData(r); err != nil { - return err - } - - // MSG is optional - ch, _, err := r.ReadRune() - if err == io.EOF { - return nil - } else if ch != ' ' { - return badFormat("MSG") // unreachable - } - - // TODO(ross): detect and handle UTF-8 BOM (\xef\xbb\xbf) - // - // MSG = MSG-ANY / MSG-UTF8 - // MSG-ANY = *OCTET ; not starting with BOM - // MSG-UTF8 = BOM UTF-8-STRING - // BOM = %xEF.BB.BF - - // To be on the safe side, remaining stuff is copied over - m.Message = copyFrom(r.Bytes()) - return nil -} - -// readHeader reads a HEADER as defined in RFC-5424 -// -// HEADER = PRI VERSION SP TIMESTAMP SP HOSTNAME -// SP APP-NAME SP PROCID SP MSGID -// PRI = "<" PRIVAL ">" -// PRIVAL = 1*3DIGIT ; range 0 .. 191 -// VERSION = NONZERO-DIGIT 0*2DIGIT -// HOSTNAME = NILVALUE / 1*255PRINTUSASCII -// -// APP-NAME = NILVALUE / 1*48PRINTUSASCII -// PROCID = NILVALUE / 1*128PRINTUSASCII -// MSGID = NILVALUE / 1*32PRINTUSASCII -// -// TIMESTAMP = NILVALUE / FULL-DATE "T" FULL-TIME -// FULL-DATE = DATE-FULLYEAR "-" DATE-MONTH "-" DATE-MDAY -// DATE-FULLYEAR = 4DIGIT -// DATE-MONTH = 2DIGIT ; 01-12 -// DATE-MDAY = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on -// ; month/year -// FULL-TIME = PARTIAL-TIME TIME-OFFSET -// PARTIAL-TIME = TIME-HOUR ":" TIME-MINUTE ":" TIME-SECOND -// [TIME-SECFRAC] -// TIME-HOUR = 2DIGIT ; 00-23 -// TIME-MINUTE = 2DIGIT ; 00-59 -// TIME-SECOND = 2DIGIT ; 00-59 -// TIME-SECFRAC = "." 1*6DIGIT -// TIME-OFFSET = "Z" / TIME-NUMOFFSET -// TIME-NUMOFFSET = ("+" / "-") TIME-HOUR ":" TIME-MINUTE -// -func (m *Message) readHeader(r io.RuneScanner) error { - if err := m.readPriority(r); err != nil { - return err - } - if err := m.readVersion(r); err != nil { - return err - } - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readTimestamp(r); err != nil { - return err - } - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readHostname(r); err != nil { - return err - } - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readAppName(r); err != nil { - return err - } - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readProcID(r); err != nil { - return err - } - if err := readSpace(r); err != nil { - return err // unreachable - } - if err := m.readMsgID(r); err != nil { - return err - } - return nil -} - -// readPriority reads the PRI as defined in RFC-5424 and assigns Severity and -// Facility accordingly. -func (m *Message) readPriority(r io.RuneScanner) error { - ch, _, err := r.ReadRune() - if err != nil { - return err - } - if ch != '<' { - return badFormat("Priority") - } - - rv := &bytes.Buffer{} - for { - ch, _, err := r.ReadRune() - if err != nil { - return err - } - if unicode.IsDigit(ch) { - rv.WriteRune(ch) - continue - } - if ch != '>' { - return badFormat("Priority") - } - - // We have a complete integer expression - priority, err := strconv.ParseInt(string(rv.Bytes()), 10, 32) - if err != nil { - return badFormat("Priority") - } - m.Priority = Priority(priority) - return nil - } -} - -// readVersion reads the version string fails if it isn't `1` -func (m *Message) readVersion(r io.RuneScanner) error { - ch, _, err := r.ReadRune() - if err != nil { - return err - } - if ch != '1' { - return badFormat("Version") - } - return nil -} - -// readTimestamp reads a TIMESTAMP as defined in RFC-5424 and assigns -// m.Timestamp -// -// TIMESTAMP = NILVALUE / FULL-DATE "T" FULL-TIME -// FULL-DATE = DATE-FULLYEAR "-" DATE-MONTH "-" DATE-MDAY -// DATE-FULLYEAR = 4DIGIT -// DATE-MONTH = 2DIGIT ; 01-12 -// DATE-MDAY = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on -// ; month/year -// FULL-TIME = PARTIAL-TIME TIME-OFFSET -// PARTIAL-TIME = TIME-HOUR ":" TIME-MINUTE ":" TIME-SECOND -// [TIME-SECFRAC] -// TIME-HOUR = 2DIGIT ; 00-23 -// TIME-MINUTE = 2DIGIT ; 00-59 -// TIME-SECOND = 2DIGIT ; 00-59 -// TIME-SECFRAC = "." 1*6DIGIT -// TIME-OFFSET = "Z" / TIME-NUMOFFSET -// TIME-NUMOFFSET = ("+" / "-") TIME-HOUR ":" TIME-MINUTE -func (m *Message) readTimestamp(r io.RuneScanner) error { - timestampString, err := readWord(r) - if err != nil { - return err - } - - m.Timestamp, err = time.Parse(RFC5424TimeOffsetNum, timestampString) - if err == nil { - return nil - } - - m.Timestamp, err = time.Parse(RFC5424TimeOffsetUTC, timestampString) - if err == nil { - return nil - } - - return err -} - -func (m *Message) readHostname(r io.RuneScanner) (err error) { - m.Hostname, err = readWord(r) - return err -} - -func (m *Message) readAppName(r io.RuneScanner) (err error) { - m.AppName, err = readWord(r) - return err -} - -func (m *Message) readProcID(r io.RuneScanner) (err error) { - m.ProcessID, err = readWord(r) - return err -} - -func (m *Message) readMsgID(r io.RuneScanner) (err error) { - m.MessageID, err = readWord(r) - return err -} - -// readStructuredData reads a STRUCTURED-DATA (as defined in RFC-5424) -// from `r` and assigns the StructuredData member. -// -// STRUCTURED-DATA = NILVALUE / 1*SD-ELEMENT -// SD-ELEMENT = "[" SD-ID *(SP SD-PARAM) "]" -// SD-PARAM = PARAM-NAME "=" %d34 PARAM-VALUE %d34 -// SD-ID = SD-NAME -// PARAM-NAME = SD-NAME -// PARAM-VALUE = UTF-8-STRING ; characters '"', '\' and ']' MUST be escaped. -// SD-NAME = 1*32PRINTUSASCII except '=', SP, ']', %d34 (") -func (m *Message) readStructuredData(r io.RuneScanner) (err error) { - m.StructuredData = []StructuredData{} - - ch, _, err := r.ReadRune() - if err != nil { - return err - } - if ch == '-' { - return nil - } - r.UnreadRune() - - for { - ch, _, err := r.ReadRune() - if err == io.EOF { - return nil - } else if err != nil { - return err // hard to reach without underlying IO error - } else if ch == ' ' { - r.UnreadRune() - return nil - } else if ch == '[' { - r.UnreadRune() - sde, err := readSDElement(r) - if err != nil { - return err - } - m.StructuredData = append(m.StructuredData, sde) - } else { - return badFormat("StructuredData") - } - } -} - -// readSDElement reads an SD-ELEMENT as defined by RFC-5424 -// -// SD-ELEMENT = "[" SD-ID *(SP SD-PARAM) "]" -// SD-PARAM = PARAM-NAME "=" %d34 PARAM-VALUE %d34 -// SD-ID = SD-NAME -// PARAM-NAME = SD-NAME -// PARAM-VALUE = UTF-8-STRING ; characters '"', '\' and ']' MUST be escaped. -// SD-NAME = 1*32PRINTUSASCII except '=', SP, ']', %d34 (") -func readSDElement(r io.RuneScanner) (element StructuredData, err error) { - ch, _, err := r.ReadRune() - if err != nil { - return element, err // hard to reach without underlying IO error - } - if ch != '[' { - return element, badFormat("StructuredData[]") // unreachable - } - element.ID, err = readSdID(r) - if err != nil { - return element, err - } - for { - ch, _, err := r.ReadRune() - if err != nil { - return element, err - } else if ch == ']' { - return element, nil - } else if ch == ' ' { - param, err := readSdParam(r) - if err != nil { - return element, err - } - element.Parameters = append(element.Parameters, *param) - } else { - return element, badFormat("StructuredData[]") - } - } -} - -// readSDID reads an SD-ID as defined by RFC-5424 -// SD-ID = SD-NAME -// SD-NAME = 1*32PRINTUSASCII except '=', SP, ']', %d34 (") -func readSdID(r io.RuneScanner) (string, error) { - rv := &bytes.Buffer{} - for { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } - if ch == ' ' || ch == ']' { - r.UnreadRune() - return string(rv.Bytes()), nil - } - rv.WriteRune(ch) - } -} - -// readSdParam reads an SD-PARAM as defined by RFC-5424 -// SD-PARAM = PARAM-NAME "=" %d34 PARAM-VALUE %d34 -// SD-ID = SD-NAME -// PARAM-NAME = SD-NAME -// PARAM-VALUE = UTF-8-STRING ; characters '"', '\' and ']' MUST be escaped. -// SD-NAME = 1*32PRINTUSASCII except '=', SP, ']', %d34 (") -func readSdParam(r io.RuneScanner) (sdp *SDParam, err error) { - sdp = &SDParam{} - sdp.Name, err = readSdParamName(r) - if err != nil { - return nil, err - } - ch, _, err := r.ReadRune() - if err != nil { - return nil, err // hard to reach - } - if ch != '=' { - return nil, badFormat("StructuredData[].Parameters") // not reachable - } - - sdp.Value, err = readSdParamValue(r) - if err != nil { - return nil, err - } - return sdp, nil -} - -// readSdParam reads a PARAM-NAME as defined by RFC-5424 -// SD-PARAM = PARAM-NAME "=" %d34 PARAM-VALUE %d34 -// PARAM-NAME = SD-NAME -// SD-NAME = 1*32PRINTUSASCII except '=', SP, ']', %d34 (") -func readSdParamName(r io.RuneScanner) (string, error) { - rv := &bytes.Buffer{} - for { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } - if ch == '=' { - r.UnreadRune() - return string(rv.Bytes()), nil - } - rv.WriteRune(ch) - } -} - -// readSdParamValue reads an PARAM-VALUE as defined by RFC-5424 -// SD-PARAM = PARAM-NAME "=" %d34 PARAM-VALUE %d34 -// PARAM-VALUE = UTF-8-STRING ; characters '"', '\' and ']' MUST be escaped. -func readSdParamValue(r io.RuneScanner) (string, error) { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } - if ch != '"' { - return "", badFormat("StructuredData[].Parameters[]") // hard to reach - } - - rv := &bytes.Buffer{} - for { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } - if ch == '\\' { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } - rv.WriteRune(ch) - continue - } - if ch == '"' { - return string(rv.Bytes()), nil - } - rv.WriteRune(ch) - } -} - -// readSpace reads a single space -func readSpace(r io.RuneScanner) error { - ch, _, err := r.ReadRune() - if err != nil { - return err - } - if ch != ' ' { - return badFormat("expected space") - } - return nil -} - -// readWord reads `r` until it encounters a space (0x20) -func readWord(r io.RuneScanner) (string, error) { - rv := &bytes.Buffer{} - for { - ch, _, err := r.ReadRune() - if err != nil { - return "", err - } else if ch != ' ' { - rv.WriteRune(ch) - } else { - r.UnreadRune() - rvString := string(rv.Bytes()) - if rvString == "-" { - rvString = "" - } - return rvString, nil - } - } -} - -func copyFrom(in []byte) []byte { - out := make([]byte, len(in)) - copy(out, in) - return out -} diff --git a/src/vendor/golang.org/x/net/context/context.go b/src/vendor/golang.org/x/net/context/context.go deleted file mode 100644 index a3c021d3..00000000 --- a/src/vendor/golang.org/x/net/context/context.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package context defines the Context type, which carries deadlines, -// cancelation signals, and other request-scoped values across API boundaries -// and between processes. -// As of Go 1.7 this package is available in the standard library under the -// name context. https://golang.org/pkg/context. -// -// Incoming requests to a server should create a Context, and outgoing calls to -// servers should accept a Context. The chain of function calls between must -// propagate the Context, optionally replacing it with a modified copy created -// using WithDeadline, WithTimeout, WithCancel, or WithValue. -// -// Programs that use Contexts should follow these rules to keep interfaces -// consistent across packages and enable static analysis tools to check context -// propagation: -// -// Do not store Contexts inside a struct type; instead, pass a Context -// explicitly to each function that needs it. The Context should be the first -// parameter, typically named ctx: -// -// func DoSomething(ctx context.Context, arg Arg) error { -// // ... use ctx ... -// } -// -// Do not pass a nil Context, even if a function permits it. Pass context.TODO -// if you are unsure about which Context to use. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -// -// The same Context may be passed to functions running in different goroutines; -// Contexts are safe for simultaneous use by multiple goroutines. -// -// See http://blog.golang.org/context for example code for a server that uses -// Contexts. -package context // import "golang.org/x/net/context" - -// Background returns a non-nil, empty Context. It is never canceled, has no -// values, and has no deadline. It is typically used by the main function, -// initialization, and tests, and as the top-level Context for incoming -// requests. -func Background() Context { - return background -} - -// TODO returns a non-nil, empty Context. Code should use context.TODO when -// it's unclear which Context to use or it is not yet available (because the -// surrounding function has not yet been extended to accept a Context -// parameter). TODO is recognized by static analysis tools that determine -// whether Contexts are propagated correctly in a program. -func TODO() Context { - return todo -} diff --git a/src/vendor/golang.org/x/net/context/go17.go b/src/vendor/golang.org/x/net/context/go17.go deleted file mode 100644 index 344bd143..00000000 --- a/src/vendor/golang.org/x/net/context/go17.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.7 -// +build go1.7 - -package context - -import ( - "context" // standard library's context, as of Go 1.7 - "time" -) - -var ( - todo = context.TODO() - background = context.Background() -) - -// Canceled is the error returned by Context.Err when the context is canceled. -var Canceled = context.Canceled - -// DeadlineExceeded is the error returned by Context.Err when the context's -// deadline passes. -var DeadlineExceeded = context.DeadlineExceeded - -// WithCancel returns a copy of parent with a new Done channel. The returned -// context's Done channel is closed when the returned cancel function is called -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - ctx, f := context.WithCancel(parent) - return ctx, CancelFunc(f) -} - -// WithDeadline returns a copy of the parent context with the deadline adjusted -// to be no later than d. If the parent's deadline is already earlier than d, -// WithDeadline(parent, d) is semantically equivalent to parent. The returned -// context's Done channel is closed when the deadline expires, when the returned -// cancel function is called, or when the parent context's Done channel is -// closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { - ctx, f := context.WithDeadline(parent, deadline) - return ctx, CancelFunc(f) -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return WithDeadline(parent, time.Now().Add(timeout)) -} - -// WithValue returns a copy of parent in which the value associated with key is -// val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -func WithValue(parent Context, key interface{}, val interface{}) Context { - return context.WithValue(parent, key, val) -} diff --git a/src/vendor/golang.org/x/net/context/go19.go b/src/vendor/golang.org/x/net/context/go19.go deleted file mode 100644 index 64d31ecc..00000000 --- a/src/vendor/golang.org/x/net/context/go19.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.9 -// +build go1.9 - -package context - -import "context" // standard library's context, as of Go 1.7 - -// A Context carries a deadline, a cancelation signal, and other values across -// API boundaries. -// -// Context's methods may be called by multiple goroutines simultaneously. -type Context = context.Context - -// A CancelFunc tells an operation to abandon its work. -// A CancelFunc does not wait for the work to stop. -// After the first call, subsequent calls to a CancelFunc do nothing. -type CancelFunc = context.CancelFunc diff --git a/src/vendor/golang.org/x/net/context/pre_go17.go b/src/vendor/golang.org/x/net/context/pre_go17.go deleted file mode 100644 index 5270db5d..00000000 --- a/src/vendor/golang.org/x/net/context/pre_go17.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.7 -// +build !go1.7 - -package context - -import ( - "errors" - "fmt" - "sync" - "time" -) - -// An emptyCtx is never canceled, has no values, and has no deadline. It is not -// struct{}, since vars of this type must have distinct addresses. -type emptyCtx int - -func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { - return -} - -func (*emptyCtx) Done() <-chan struct{} { - return nil -} - -func (*emptyCtx) Err() error { - return nil -} - -func (*emptyCtx) Value(key interface{}) interface{} { - return nil -} - -func (e *emptyCtx) String() string { - switch e { - case background: - return "context.Background" - case todo: - return "context.TODO" - } - return "unknown empty Context" -} - -var ( - background = new(emptyCtx) - todo = new(emptyCtx) -) - -// Canceled is the error returned by Context.Err when the context is canceled. -var Canceled = errors.New("context canceled") - -// DeadlineExceeded is the error returned by Context.Err when the context's -// deadline passes. -var DeadlineExceeded = errors.New("context deadline exceeded") - -// WithCancel returns a copy of parent with a new Done channel. The returned -// context's Done channel is closed when the returned cancel function is called -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - c := newCancelCtx(parent) - propagateCancel(parent, c) - return c, func() { c.cancel(true, Canceled) } -} - -// newCancelCtx returns an initialized cancelCtx. -func newCancelCtx(parent Context) *cancelCtx { - return &cancelCtx{ - Context: parent, - done: make(chan struct{}), - } -} - -// propagateCancel arranges for child to be canceled when parent is. -func propagateCancel(parent Context, child canceler) { - if parent.Done() == nil { - return // parent is never canceled - } - if p, ok := parentCancelCtx(parent); ok { - p.mu.Lock() - if p.err != nil { - // parent has already been canceled - child.cancel(false, p.err) - } else { - if p.children == nil { - p.children = make(map[canceler]bool) - } - p.children[child] = true - } - p.mu.Unlock() - } else { - go func() { - select { - case <-parent.Done(): - child.cancel(false, parent.Err()) - case <-child.Done(): - } - }() - } -} - -// parentCancelCtx follows a chain of parent references until it finds a -// *cancelCtx. This function understands how each of the concrete types in this -// package represents its parent. -func parentCancelCtx(parent Context) (*cancelCtx, bool) { - for { - switch c := parent.(type) { - case *cancelCtx: - return c, true - case *timerCtx: - return c.cancelCtx, true - case *valueCtx: - parent = c.Context - default: - return nil, false - } - } -} - -// removeChild removes a context from its parent. -func removeChild(parent Context, child canceler) { - p, ok := parentCancelCtx(parent) - if !ok { - return - } - p.mu.Lock() - if p.children != nil { - delete(p.children, child) - } - p.mu.Unlock() -} - -// A canceler is a context type that can be canceled directly. The -// implementations are *cancelCtx and *timerCtx. -type canceler interface { - cancel(removeFromParent bool, err error) - Done() <-chan struct{} -} - -// A cancelCtx can be canceled. When canceled, it also cancels any children -// that implement canceler. -type cancelCtx struct { - Context - - done chan struct{} // closed by the first cancel call. - - mu sync.Mutex - children map[canceler]bool // set to nil by the first cancel call - err error // set to non-nil by the first cancel call -} - -func (c *cancelCtx) Done() <-chan struct{} { - return c.done -} - -func (c *cancelCtx) Err() error { - c.mu.Lock() - defer c.mu.Unlock() - return c.err -} - -func (c *cancelCtx) String() string { - return fmt.Sprintf("%v.WithCancel", c.Context) -} - -// cancel closes c.done, cancels each of c's children, and, if -// removeFromParent is true, removes c from its parent's children. -func (c *cancelCtx) cancel(removeFromParent bool, err error) { - if err == nil { - panic("context: internal error: missing cancel error") - } - c.mu.Lock() - if c.err != nil { - c.mu.Unlock() - return // already canceled - } - c.err = err - close(c.done) - for child := range c.children { - // NOTE: acquiring the child's lock while holding parent's lock. - child.cancel(false, err) - } - c.children = nil - c.mu.Unlock() - - if removeFromParent { - removeChild(c.Context, c) - } -} - -// WithDeadline returns a copy of the parent context with the deadline adjusted -// to be no later than d. If the parent's deadline is already earlier than d, -// WithDeadline(parent, d) is semantically equivalent to parent. The returned -// context's Done channel is closed when the deadline expires, when the returned -// cancel function is called, or when the parent context's Done channel is -// closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { - if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { - // The current deadline is already sooner than the new one. - return WithCancel(parent) - } - c := &timerCtx{ - cancelCtx: newCancelCtx(parent), - deadline: deadline, - } - propagateCancel(parent, c) - d := deadline.Sub(time.Now()) - if d <= 0 { - c.cancel(true, DeadlineExceeded) // deadline has already passed - return c, func() { c.cancel(true, Canceled) } - } - c.mu.Lock() - defer c.mu.Unlock() - if c.err == nil { - c.timer = time.AfterFunc(d, func() { - c.cancel(true, DeadlineExceeded) - }) - } - return c, func() { c.cancel(true, Canceled) } -} - -// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to -// implement Done and Err. It implements cancel by stopping its timer then -// delegating to cancelCtx.cancel. -type timerCtx struct { - *cancelCtx - timer *time.Timer // Under cancelCtx.mu. - - deadline time.Time -} - -func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { - return c.deadline, true -} - -func (c *timerCtx) String() string { - return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) -} - -func (c *timerCtx) cancel(removeFromParent bool, err error) { - c.cancelCtx.cancel(false, err) - if removeFromParent { - // Remove this timerCtx from its parent cancelCtx's children. - removeChild(c.cancelCtx.Context, c) - } - c.mu.Lock() - if c.timer != nil { - c.timer.Stop() - c.timer = nil - } - c.mu.Unlock() -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return WithDeadline(parent, time.Now().Add(timeout)) -} - -// WithValue returns a copy of parent in which the value associated with key is -// val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -func WithValue(parent Context, key interface{}, val interface{}) Context { - return &valueCtx{parent, key, val} -} - -// A valueCtx carries a key-value pair. It implements Value for that key and -// delegates all other calls to the embedded Context. -type valueCtx struct { - Context - key, val interface{} -} - -func (c *valueCtx) String() string { - return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) -} - -func (c *valueCtx) Value(key interface{}) interface{} { - if c.key == key { - return c.val - } - return c.Context.Value(key) -} diff --git a/src/vendor/golang.org/x/net/context/pre_go19.go b/src/vendor/golang.org/x/net/context/pre_go19.go deleted file mode 100644 index 1f971534..00000000 --- a/src/vendor/golang.org/x/net/context/pre_go19.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.9 -// +build !go1.9 - -package context - -import "time" - -// A Context carries a deadline, a cancelation signal, and other values across -// API boundaries. -// -// Context's methods may be called by multiple goroutines simultaneously. -type Context interface { - // Deadline returns the time when work done on behalf of this context - // should be canceled. Deadline returns ok==false when no deadline is - // set. Successive calls to Deadline return the same results. - Deadline() (deadline time.Time, ok bool) - - // Done returns a channel that's closed when work done on behalf of this - // context should be canceled. Done may return nil if this context can - // never be canceled. Successive calls to Done return the same value. - // - // WithCancel arranges for Done to be closed when cancel is called; - // WithDeadline arranges for Done to be closed when the deadline - // expires; WithTimeout arranges for Done to be closed when the timeout - // elapses. - // - // Done is provided for use in select statements: - // - // // Stream generates values with DoSomething and sends them to out - // // until DoSomething returns an error or ctx.Done is closed. - // func Stream(ctx context.Context, out chan<- Value) error { - // for { - // v, err := DoSomething(ctx) - // if err != nil { - // return err - // } - // select { - // case <-ctx.Done(): - // return ctx.Err() - // case out <- v: - // } - // } - // } - // - // See http://blog.golang.org/pipelines for more examples of how to use - // a Done channel for cancelation. - Done() <-chan struct{} - - // Err returns a non-nil error value after Done is closed. Err returns - // Canceled if the context was canceled or DeadlineExceeded if the - // context's deadline passed. No other values for Err are defined. - // After Done is closed, successive calls to Err return the same value. - Err() error - - // Value returns the value associated with this context for key, or nil - // if no value is associated with key. Successive calls to Value with - // the same key returns the same result. - // - // Use context values only for request-scoped data that transits - // processes and API boundaries, not for passing optional parameters to - // functions. - // - // A key identifies a specific value in a Context. Functions that wish - // to store values in Context typically allocate a key in a global - // variable then use that key as the argument to context.WithValue and - // Context.Value. A key can be any type that supports equality; - // packages should define keys as an unexported type to avoid - // collisions. - // - // Packages that define a Context key should provide type-safe accessors - // for the values stores using that key: - // - // // Package user defines a User type that's stored in Contexts. - // package user - // - // import "golang.org/x/net/context" - // - // // User is the type of value stored in the Contexts. - // type User struct {...} - // - // // key is an unexported type for keys defined in this package. - // // This prevents collisions with keys defined in other packages. - // type key int - // - // // userKey is the key for user.User values in Contexts. It is - // // unexported; clients use user.NewContext and user.FromContext - // // instead of using this key directly. - // var userKey key = 0 - // - // // NewContext returns a new Context that carries value u. - // func NewContext(ctx context.Context, u *User) context.Context { - // return context.WithValue(ctx, userKey, u) - // } - // - // // FromContext returns the User value stored in ctx, if any. - // func FromContext(ctx context.Context) (*User, bool) { - // u, ok := ctx.Value(userKey).(*User) - // return u, ok - // } - Value(key interface{}) interface{} -} - -// A CancelFunc tells an operation to abandon its work. -// A CancelFunc does not wait for the work to stop. -// After the first call, subsequent calls to a CancelFunc do nothing. -type CancelFunc func() diff --git a/src/vendor/golang.org/x/tools/go/ast/inspector/typeof.go b/src/vendor/golang.org/x/tools/go/ast/inspector/typeof.go index d61301b1..b6b00cf2 100644 --- a/src/vendor/golang.org/x/tools/go/ast/inspector/typeof.go +++ b/src/vendor/golang.org/x/tools/go/ast/inspector/typeof.go @@ -1,3 +1,7 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package inspector // This file defines func typeOf(ast.Node) uint64. diff --git a/src/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/src/vendor/google.golang.org/protobuf/encoding/protowire/wire.go index a427f8b7..9c61112f 100644 --- a/src/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +++ b/src/vendor/google.golang.org/protobuf/encoding/protowire/wire.go @@ -21,10 +21,11 @@ import ( type Number int32 const ( - MinValidNumber Number = 1 - FirstReservedNumber Number = 19000 - LastReservedNumber Number = 19999 - MaxValidNumber Number = 1<<29 - 1 + MinValidNumber Number = 1 + FirstReservedNumber Number = 19000 + LastReservedNumber Number = 19999 + MaxValidNumber Number = 1<<29 - 1 + DefaultRecursionLimit = 10000 ) // IsValid reports whether the field number is semantically valid. @@ -55,6 +56,7 @@ const ( errCodeOverflow errCodeReserved errCodeEndGroup + errCodeRecursionDepth ) var ( @@ -112,6 +114,10 @@ func ConsumeField(b []byte) (Number, Type, int) { // When parsing a group, the length includes the end group marker and // the end group is verified to match the starting field number. func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { + return consumeFieldValueD(num, typ, b, DefaultRecursionLimit) +} + +func consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) { switch typ { case VarintType: _, n = ConsumeVarint(b) @@ -126,6 +132,9 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { _, n = ConsumeBytes(b) return n case StartGroupType: + if depth < 0 { + return errCodeRecursionDepth + } n0 := len(b) for { num2, typ2, n := ConsumeTag(b) @@ -140,7 +149,7 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) { return n0 - len(b) } - n = ConsumeFieldValue(num2, typ2, b) + n = consumeFieldValueD(num2, typ2, b, depth-1) if n < 0 { return n // forward error code } diff --git a/src/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/src/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index eb10ea10..37803773 100644 --- a/src/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/src/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -381,7 +381,7 @@ func (d *Decoder) currentOpenKind() (Kind, byte) { case '[': return ListOpen, ']' } - panic(fmt.Sprintf("Decoder: openStack contains invalid byte %s", string(openCh))) + panic(fmt.Sprintf("Decoder: openStack contains invalid byte %c", openCh)) } func (d *Decoder) pushOpenStack(ch byte) { diff --git a/src/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/src/vendor/google.golang.org/protobuf/internal/errors/is_go112.go index f90e909b..fbcd3492 100644 --- a/src/vendor/google.golang.org/protobuf/internal/errors/is_go112.go +++ b/src/vendor/google.golang.org/protobuf/internal/errors/is_go112.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !go1.13 // +build !go1.13 package errors diff --git a/src/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/src/vendor/google.golang.org/protobuf/internal/errors/is_go113.go index dc05f419..5e72f1cd 100644 --- a/src/vendor/google.golang.org/protobuf/internal/errors/is_go113.go +++ b/src/vendor/google.golang.org/protobuf/internal/errors/is_go113.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.13 // +build go1.13 package errors diff --git a/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go b/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go index a72995f0..bda8e8cf 100644 --- a/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go +++ b/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !protolegacy // +build !protolegacy package flags diff --git a/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go b/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go index 772e2f0e..6d8d9bd6 100644 --- a/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go +++ b/src/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build protolegacy // +build protolegacy package flags diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go index 2706bb67..4b15493f 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !go1.12 // +build !go1.12 package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go index 1533ef60..0b31b66e 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.12 // +build go1.12 package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/src/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go index 90705e3a..145c577b 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/src/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go index e118af1e..757642e2 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/decode.go b/src/vendor/google.golang.org/protobuf/internal/impl/decode.go index 949dc49a..c65b0325 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/decode.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/decode.go @@ -18,6 +18,7 @@ import ( ) var errDecode = errors.New("cannot parse invalid wire-format data") +var errRecursionDepth = errors.New("exceeded maximum recursion depth") type unmarshalOptions struct { flags protoiface.UnmarshalInputFlags @@ -25,6 +26,7 @@ type unmarshalOptions struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + depth int } func (o unmarshalOptions) Options() proto.UnmarshalOptions { @@ -44,6 +46,7 @@ func (o unmarshalOptions) IsDefault() bool { var lazyUnmarshalOptions = unmarshalOptions{ resolver: preg.GlobalTypes, + depth: protowire.DefaultRecursionLimit, } type unmarshalOutput struct { @@ -62,6 +65,7 @@ func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutp out, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{ flags: in.Flags, resolver: in.Resolver, + depth: in.Depth, }) var flags piface.UnmarshalOutputFlags if out.initialized { @@ -82,6 +86,10 @@ var errUnknown = errors.New("unknown") func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) { mi.init() + opts.depth-- + if opts.depth < 0 { + return out, errRecursionDepth + } if flags.ProtoLegacy && mi.isMessageSet { return unmarshalMessageSet(mi, b, p, opts) } diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/src/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 9e3ed821..4c491bdf 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/src/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 9ecf23a8..ee0e0573 100644 --- a/src/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/src/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package impl diff --git a/src/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/src/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go index 85e074c9..a1f6f333 100644 --- a/src/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go +++ b/src/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package strs diff --git a/src/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/src/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go index 2160c701..56a8a4ed 100644 --- a/src/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go +++ b/src/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package strs diff --git a/src/vendor/google.golang.org/protobuf/internal/version/version.go b/src/vendor/google.golang.org/protobuf/internal/version/version.go index 14e774fb..3d40d524 100644 --- a/src/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/src/vendor/google.golang.org/protobuf/internal/version/version.go @@ -52,8 +52,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 27 - Patch = 1 + Minor = 28 + Patch = 0 PreRelease = "" ) diff --git a/src/vendor/google.golang.org/protobuf/proto/decode.go b/src/vendor/google.golang.org/protobuf/proto/decode.go index 49f9b8c8..11bf7173 100644 --- a/src/vendor/google.golang.org/protobuf/proto/decode.go +++ b/src/vendor/google.golang.org/protobuf/proto/decode.go @@ -42,18 +42,25 @@ type UnmarshalOptions struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + + // RecursionLimit limits how deeply messages may be nested. + // If zero, a default limit is applied. + RecursionLimit int } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func Unmarshal(b []byte, m Message) error { - _, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect()) + _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect()) return err } // Unmarshal parses the wire-format message in b and places the result in m. // The provided message must be mutable (e.g., a non-nil pointer to a message). func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { + if o.RecursionLimit == 0 { + o.RecursionLimit = protowire.DefaultRecursionLimit + } _, err := o.unmarshal(b, m.ProtoReflect()) return err } @@ -63,6 +70,9 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error { // This method permits fine-grained control over the unmarshaler. // Most users should use Unmarshal instead. func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + if o.RecursionLimit == 0 { + o.RecursionLimit = protowire.DefaultRecursionLimit + } return o.unmarshal(in.Buf, in.Message) } @@ -86,12 +96,17 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto Message: m, Buf: b, Resolver: o.Resolver, + Depth: o.RecursionLimit, } if o.DiscardUnknown { in.Flags |= protoiface.UnmarshalDiscardUnknown } out, err = methods.Unmarshal(in) } else { + o.RecursionLimit-- + if o.RecursionLimit < 0 { + return out, errors.New("exceeded max recursion depth") + } err = o.unmarshalMessageSlow(b, m) } if err != nil { diff --git a/src/vendor/google.golang.org/protobuf/proto/proto_methods.go b/src/vendor/google.golang.org/protobuf/proto/proto_methods.go index d8dd604f..465e057b 100644 --- a/src/vendor/google.golang.org/protobuf/proto/proto_methods.go +++ b/src/vendor/google.golang.org/protobuf/proto/proto_methods.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The protoreflect build tag disables use of fast-path methods. +//go:build !protoreflect // +build !protoreflect package proto diff --git a/src/vendor/google.golang.org/protobuf/proto/proto_reflect.go b/src/vendor/google.golang.org/protobuf/proto/proto_reflect.go index b103d432..494d6cee 100644 --- a/src/vendor/google.golang.org/protobuf/proto/proto_reflect.go +++ b/src/vendor/google.golang.org/protobuf/proto/proto_reflect.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // The protoreflect build tag disables use of fast-path methods. +//go:build protoreflect // +build protoreflect package proto diff --git a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go index 6be5d16e..d5d5af6e 100644 --- a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go +++ b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go @@ -53,6 +53,7 @@ type ( FindExtensionByName(field FullName) (ExtensionType, error) FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) } + Depth int } unmarshalOutput = struct { pragma.NoUnkeyedLiterals diff --git a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go index 918e685e..7ced876f 100644 --- a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build purego || appengine // +build purego appengine package protoreflect diff --git a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index 5a341472..eb7764c3 100644 --- a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -41,6 +41,31 @@ import ( // Converting to/from a Value and a concrete Go value panics on type mismatch. // For example, ValueOf("hello").Int() panics because this attempts to // retrieve an int64 from a string. +// +// List, Map, and Message Values are called "composite" values. +// +// A composite Value may alias (reference) memory at some location, +// such that changes to the Value updates the that location. +// A composite value acquired with a Mutable method, such as Message.Mutable, +// always references the source object. +// +// For example: +// // Append a 0 to a "repeated int32" field. +// // Since the Value returned by Mutable is guaranteed to alias +// // the source message, modifying the Value modifies the message. +// message.Mutable(fieldDesc).(List).Append(protoreflect.ValueOfInt32(0)) +// +// // Assign [0] to a "repeated int32" field by creating a new Value, +// // modifying it, and assigning it. +// list := message.NewField(fieldDesc).(List) +// list.Append(protoreflect.ValueOfInt32(0)) +// message.Set(fieldDesc, list) +// // ERROR: Since it is not defined whether Set aliases the source, +// // appending to the List here may or may not modify the message. +// list.Append(protoreflect.ValueOfInt32(0)) +// +// Some operations, such as Message.Get, may return an "empty, read-only" +// composite Value. Modifying an empty, read-only value panics. type Value value // The protoreflect API uses a custom Value union type instead of interface{} diff --git a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go index c45debdc..702ddf22 100644 --- a/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go +++ b/src/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !purego && !appengine // +build !purego,!appengine package protoreflect diff --git a/src/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/src/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go index 32c04f67..44cf467d 100644 --- a/src/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go +++ b/src/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go @@ -103,6 +103,7 @@ type UnmarshalInput = struct { FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) } + Depth int } // UnmarshalOutput is output from the Unmarshal method. diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt index 930e36aa..e4b2a567 100644 --- a/src/vendor/modules.txt +++ b/src/vendor/modules.txt @@ -4,12 +4,9 @@ code.cloudfoundry.org/go-batching # code.cloudfoundry.org/go-envstruct v1.5.0 ## explicit; go 1.12 code.cloudfoundry.org/go-envstruct -# code.cloudfoundry.org/go-loggregator v0.0.0-20190813173818-049b6bf8152a -## explicit; go 1.12 -code.cloudfoundry.org/go-loggregator/rpc/loggregator_v2 -# code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a -## explicit -code.cloudfoundry.org/rfc5424 +# code.cloudfoundry.org/go-loggregator/v9 v9.0.2 +## explicit; go 1.18 +code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2 # code.cloudfoundry.org/tlsconfig v0.0.0-20200131000646-bbe0f8da39b3 ## explicit; go 1.13 code.cloudfoundry.org/tlsconfig @@ -125,7 +122,6 @@ github.com/tklauser/numcpus github.com/yusufpapurcu/wmi # golang.org/x/net v0.0.0-20220225172249-27dd8689420f ## explicit; go 1.17 -golang.org/x/net/context golang.org/x/net/html golang.org/x/net/html/atom golang.org/x/net/html/charset @@ -163,7 +159,7 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e +# golang.org/x/tools v0.0.0-20210106214847-113979e3529a ## explicit; go 1.12 golang.org/x/tools/go/ast/inspector # google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 @@ -219,8 +215,8 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.27.1 -## explicit; go 1.9 +# google.golang.org/protobuf v1.28.0 +## explicit; go 1.11 google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire