diff --git a/cli/board/list.go b/cli/board/list.go index f622dc9556f..f89984c4d65 100644 --- a/cli/board/list.go +++ b/cli/board/list.go @@ -25,7 +25,6 @@ import ( "github.com/arduino/arduino-cli/cli/errorcodes" "github.com/arduino/arduino-cli/cli/feedback" "github.com/arduino/arduino-cli/cli/instance" - "github.com/arduino/arduino-cli/commands" "github.com/arduino/arduino-cli/commands/board" rpc "github.com/arduino/arduino-cli/rpc/commands" "github.com/arduino/arduino-cli/table" @@ -90,8 +89,7 @@ func runListCommand(cmd *cobra.Command, args []string) { } func watchList(cmd *cobra.Command, inst *rpc.Instance) { - pm := commands.GetPackageManager(inst.Id) - eventsChan, err := commands.WatchListBoards(pm) + eventsChan, err := board.Watch(inst.Id, nil) if err != nil { feedback.Errorf("Error detecting boards: %v", err) os.Exit(errorcodes.ErrNetwork) @@ -105,28 +103,13 @@ func watchList(cmd *cobra.Command, inst *rpc.Instance) { } for event := range eventsChan { - boards := []*rpc.BoardListItem{} - if event.Type == "add" { - boards, err = board.Identify(pm, &commands.BoardPort{ - Address: event.Port.Address, - Label: event.Port.AddressLabel, - Prefs: event.Port.Properties, - IdentificationPrefs: event.Port.IdentificationProperties, - Protocol: event.Port.Protocol, - ProtocolLabel: event.Port.ProtocolLabel, - }) - if err != nil { - feedback.Errorf("Error identifying board: %v", err) - os.Exit(errorcodes.ErrNetwork) - } - } - feedback.PrintResult(watchEvent{ - Type: event.Type, + Type: event.EventType, Address: event.Port.Address, Protocol: event.Port.Protocol, ProtocolLabel: event.Port.ProtocolLabel, - Boards: boards, + Boards: event.Port.Boards, + Error: event.Error, }) } } @@ -198,6 +181,7 @@ type watchEvent struct { Protocol string `json:"protocol,omitempty"` ProtocolLabel string `json:"protocol_label,omitempty"` Boards []*rpc.BoardListItem `json:"boards,omitempty"` + Error string `json:"error,omitempty"` } func (dr watchEvent) Data() interface{} { diff --git a/client_example/go.sum b/client_example/go.sum index f391851418d..4730b8a867e 100644 --- a/client_example/go.sum +++ b/client_example/go.sum @@ -10,6 +10,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/arduino/board-discovery v0.0.0-20180823133458-1ba29327fb0c/go.mod h1:HK7SpkEax/3P+0w78iRQx1sz1vCDYYw9RXwHjQTB5i8= github.com/arduino/go-paths-helper v1.0.1/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= github.com/arduino/go-paths-helper v1.2.0/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= +github.com/arduino/go-paths-helper v1.3.2/go.mod h1:HpxtKph+g238EJHq4geEPv9p+gl3v5YYu35Yb+w31Ck= github.com/arduino/go-properties-orderedmap v0.0.0-20190828172252-05018b28ff6c/go.mod h1:kiSuHm7yz3chiy8rb2MphC7ECn3MlkQFAIe4SXmQg6o= github.com/arduino/go-properties-orderedmap v1.3.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk= github.com/arduino/go-timeutils v0.0.0-20171220113728-d1dd9e313b1b/go.mod h1:uwGy5PpN4lqW97FiLnbcx+xx8jly5YuPMJWfVwwjJiQ= @@ -20,10 +21,12 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cmaglie/go.rice v1.0.3/go.mod h1:AF3bOWkvdOpp8/S3UL8qbQ4N7DiISIbJtj54GWFPAsc= github.com/cmaglie/pb v1.0.27 h1:ynGj8vBXR+dtj4B7Q/W/qGt31771Ux5iFfRQBnwdQiA= github.com/cmaglie/pb v1.0.27/go.mod h1:GilkKZMXYjBA4NxItWFfO+lwkp59PLHQ+IOW/b/kmZI= github.com/codeclysm/cc v1.2.2/go.mod h1:XtW4ArCNgQwFphcRGG9+sPX5WM1J6/u0gMy5ZdV3obA= github.com/codeclysm/extract v2.2.0+incompatible/go.mod h1:2nhFMPHiU9At61hz+12bfrlpXSUrOnK+wR+KlGO4Uks= +github.com/codeclysm/extract/v3 v3.0.2/go.mod h1:NKsw+hqua9H+Rlwy/w/3Qgt9jDonYEgB6wJu+25eOKw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= @@ -82,6 +85,7 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/h2non/filetype v1.0.6/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= github.com/h2non/filetype v1.0.8/go.mod h1:isekKqOuhMj+s/7r3rIeTErIRy4Rub5uBWHfvMusLMU= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/imjasonmiller/godice v0.1.2/go.mod h1:8cTkdnVI+NglU2d6sv+ilYcNaJ5VSTBwvMbFULJd/QQ= @@ -89,9 +93,16 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/clock v0.0.0-20180524022203-d293bb356ca4/go.mod h1:nD0vlnrUjcjJhqN5WuCWZyzfd5AHZAC9/ajvbSx69xA= +github.com/juju/errors v0.0.0-20150916125642-1b5e39b83d18/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20170605014607-8232ab8918d9/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/retry v0.0.0-20160928201858-1998d01ba1c3/go.mod h1:OohPQGsr4pnxwD5YljhQ+TZnuVRYpa5irjugL1Yuif4= github.com/juju/testing v0.0.0-20190429233213-dfc56b8c09fc/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/juju/testing v0.0.0-20200510222523-6c8c298c77a0/go.mod h1:hpGvhGHPVbNBraRLZEhoQwFLMrjK8PSlO4D3nDjKYXo= +github.com/juju/utils v0.0.0-20180808125547-9dfc6dbfb02b/go.mod h1:6/KLg8Wz/y2KVGWEpkK9vMNGkOnu4k/cqs8Z1fKjTOk= +github.com/juju/version v0.0.0-20161031051906-1f41e27e54f2/go.mod h1:kE8gK5X0CImdr7qpSKl3xB2PmpySSmfj7zVbkZFs81U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 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= @@ -117,7 +128,9 @@ github.com/miekg/dns v1.0.5/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nr github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= +github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/oleksandr/bonjour v0.0.0-20160508152359-5dcf00d8b228/go.mod h1:MGuVJ1+5TX1SCoO2Sx0eAnjpdRytYla2uC1YIZfkC9c= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -180,11 +193,13 @@ go.bug.st/downloader v1.1.0/go.mod h1:l+RPbNbrTB+MoAIp8nrZsP22nRPDy26XJZQqmm4gNT go.bug.st/downloader/v2 v2.0.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII= go.bug.st/relaxed-semver v0.0.0-20190922224835-391e10178d18/go.mod h1:Cx1VqMtEhE9pIkEyUj3LVVVPkv89dgW8aCKrRPDR/uE= go.bug.st/serial v1.0.0/go.mod h1:rpXPISGjuNjPTRTcMlxi9lN6LoIPxd1ixVjBd8aSk/Q= +go.bug.st/serial v1.1.1/go.mod h1:VmYBeyJWp5BnJ0tw2NUJHZdJTGl2ecBGABHlzRK1knY= go.bug.st/serial.v1 v0.0.0-20180827123349-5f7892a7bb45/go.mod h1:dRSl/CVCTf56CkXgJMDOdSwNfo2g1orOGE/gBGdvjZw= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180214000028-650f4a345ab4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -192,6 +207,7 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180406214816-61147c48b25b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -222,6 +238,8 @@ golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9 h1:ZBzSG/7F4eNKz2L3GE9o300RX golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009 h1:W0lCpv29Hv0UaM1LXb9QlBHLNP8UFfcKjblhVCWftOM= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -261,11 +279,15 @@ google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20160818015218-f2b6f6c918c4/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170712054546-1be3d31502d6/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/client_example/main.go b/client_example/main.go index 265382f3949..4a6164b7686 100644 --- a/client_example/main.go +++ b/client_example/main.go @@ -26,6 +26,7 @@ import ( "path" "path/filepath" "strings" + "time" rpc "github.com/arduino/arduino-cli/rpc/commands" dbg "github.com/arduino/arduino-cli/rpc/debug" @@ -154,6 +155,10 @@ func main() { log.Println("calling BoardList()") callBoardList(client, instance) + // Watch for boards connection and disconnection + log.Println("calling BoardListWatch()") + callBoardListWatch(client, instance) + // Uninstall a platform log.Println("calling PlatformUninstall(arduino:samd)") callPlatformUnInstall(client, instance) @@ -592,6 +597,41 @@ func callBoardList(client rpc.ArduinoCoreClient, instance *rpc.Instance) { } } +func callBoardListWatch(client rpc.ArduinoCoreClient, instance *rpc.Instance) { + watchClient, err := client.BoardListWatch(context.Background()) + if err != nil { + log.Fatalf("Board list watch error: %s\n", err) + } + + // Start the watcher + watchClient.Send(&rpc.BoardListWatchReq{ + Instance: instance, + }) + + go func() { + for { + res, err := watchClient.Recv() + if err != nil { + log.Fatalf("Board list watch error: %s\n", err) + } + + log.Printf("event: %s, address: %s\n", res.EventType, res.Port.Address) + if res.EventType == "add" { + log.Printf("protocol: %s, ", res.Port.Protocol) + log.Printf("protocolLabel: %s, ", res.Port.ProtocolLabel) + log.Printf("boards: %s\n\n", res.Port.Boards) + } + } + }() + + // Watch for 10 seconds and then interrupts + timer := time.NewTicker(time.Duration(10 * time.Second)) + <-timer.C + watchClient.Send(&rpc.BoardListWatchReq{ + Interrupt: true, + }) +} + func callPlatformUnInstall(client rpc.ArduinoCoreClient, instance *rpc.Instance) { uninstallRespStream, err := client.PlatformUninstall(context.Background(), &rpc.PlatformUninstallReq{ diff --git a/commands/board/list.go b/commands/board/list.go index 93798cce0ab..bae50fd9e53 100644 --- a/commands/board/list.go +++ b/commands/board/list.go @@ -108,8 +108,8 @@ func identifyViaCloudAPI(port *commands.BoardPort) ([]*rpc.BoardListItem, error) return apiByVidPid(id.Get("vid"), id.Get("pid")) } -// Identify returns a list of boards checking first the installed platforms or the Cloud API -func Identify(pm *packagemanager.PackageManager, port *commands.BoardPort) ([]*rpc.BoardListItem, error) { +// identify returns a list of boards checking first the installed platforms or the Cloud API +func identify(pm *packagemanager.PackageManager, port *commands.BoardPort) ([]*rpc.BoardListItem, error) { boards := []*rpc.BoardListItem{} // first query installed cores through the Package Manager @@ -169,7 +169,7 @@ func List(instanceID int32) (r []*rpc.DetectedPort, e error) { retVal := []*rpc.DetectedPort{} for _, port := range ports { - boards, err := Identify(pm, port) + boards, err := identify(pm, port) if err != nil { return nil, err } @@ -187,3 +187,52 @@ func List(instanceID int32) (r []*rpc.DetectedPort, e error) { return retVal, nil } + +// Watch returns a channel that receives boards connection and disconnection events. +// The discovery process can be interrupted by sending a message to the interrupt channel. +func Watch(instanceID int32, interrupt <-chan bool) (<-chan *rpc.BoardListWatchResp, error) { + pm := commands.GetPackageManager(instanceID) + eventsChan, err := commands.WatchListBoards(pm) + if err != nil { + return nil, err + } + + outChan := make(chan *rpc.BoardListWatchResp) + go func() { + for { + select { + case event := <-eventsChan: + boards := []*rpc.BoardListItem{} + boardsError := "" + if event.Type == "add" { + boards, err = identify(pm, &commands.BoardPort{ + Address: event.Port.Address, + Label: event.Port.AddressLabel, + Prefs: event.Port.Properties, + IdentificationPrefs: event.Port.IdentificationProperties, + Protocol: event.Port.Protocol, + ProtocolLabel: event.Port.ProtocolLabel, + }) + if err != nil { + boardsError = err.Error() + } + } + + outChan <- &rpc.BoardListWatchResp{ + EventType: event.Type, + Port: &rpc.DetectedPort{ + Address: event.Port.Address, + Protocol: event.Port.Protocol, + ProtocolLabel: event.Port.ProtocolLabel, + Boards: boards, + }, + Error: boardsError, + } + case <-interrupt: + break + } + } + }() + + return outChan, nil +} diff --git a/commands/daemon/daemon.go b/commands/daemon/daemon.go index eea21591a1e..c18308da050 100644 --- a/commands/daemon/daemon.go +++ b/commands/daemon/daemon.go @@ -19,6 +19,7 @@ package daemon import ( "context" + "io" "github.com/arduino/arduino-cli/arduino/utils" "github.com/arduino/arduino-cli/commands" @@ -58,6 +59,39 @@ func (s *ArduinoCoreServerImpl) BoardListAll(ctx context.Context, req *rpc.Board return board.ListAll(ctx, req) } +// BoardListWatch FIXMEDOC +func (s *ArduinoCoreServerImpl) BoardListWatch(stream rpc.ArduinoCore_BoardListWatchServer) error { + msg, err := stream.Recv() + if err == io.EOF { + return nil + } + if err != nil { + return err + } + + interrupt := make(chan bool) + go func() { + msg, err := stream.Recv() + if err != nil { + interrupt <- true + } + if msg != nil { + interrupt <- msg.Interrupt + } + }() + + eventsChan, err := board.Watch(msg.Instance.Id, interrupt) + if err != nil { + return err + } + + for event := range eventsChan { + stream.Send(event) + } + + return nil +} + // BoardAttach FIXMEDOC func (s *ArduinoCoreServerImpl) BoardAttach(req *rpc.BoardAttachReq, stream rpc.ArduinoCore_BoardAttachServer) error { diff --git a/rpc/commands/board.pb.go b/rpc/commands/board.pb.go index 58d6d9df89a..56b1028f62e 100644 --- a/rpc/commands/board.pb.go +++ b/rpc/commands/board.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/board.proto package commands @@ -1305,6 +1305,129 @@ func (x *BoardListAllResp) GetBoards() []*BoardListItem { return nil } +type BoardListWatchReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Arduino Core Service instance from the `Init` response. + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // Set this to true to stop the discovery process + Interrupt bool `protobuf:"varint,2,opt,name=interrupt,proto3" json:"interrupt,omitempty"` +} + +func (x *BoardListWatchReq) Reset() { + *x = BoardListWatchReq{} + if protoimpl.UnsafeEnabled { + mi := &file_commands_board_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoardListWatchReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoardListWatchReq) ProtoMessage() {} + +func (x *BoardListWatchReq) ProtoReflect() protoreflect.Message { + mi := &file_commands_board_proto_msgTypes[18] + 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 BoardListWatchReq.ProtoReflect.Descriptor instead. +func (*BoardListWatchReq) Descriptor() ([]byte, []int) { + return file_commands_board_proto_rawDescGZIP(), []int{18} +} + +func (x *BoardListWatchReq) GetInstance() *Instance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *BoardListWatchReq) GetInterrupt() bool { + if x != nil { + return x.Interrupt + } + return false +} + +type BoardListWatchResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Event type as received from the serial discovery tool + EventType string `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` + // Information about the port + Port *DetectedPort `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + // Eventual errors when detecting connected boards + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *BoardListWatchResp) Reset() { + *x = BoardListWatchResp{} + if protoimpl.UnsafeEnabled { + mi := &file_commands_board_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoardListWatchResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoardListWatchResp) ProtoMessage() {} + +func (x *BoardListWatchResp) ProtoReflect() protoreflect.Message { + mi := &file_commands_board_proto_msgTypes[19] + 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 BoardListWatchResp.ProtoReflect.Descriptor instead. +func (*BoardListWatchResp) Descriptor() ([]byte, []int) { + return file_commands_board_proto_rawDescGZIP(), []int{19} +} + +func (x *BoardListWatchResp) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *BoardListWatchResp) GetPort() *DetectedPort { + if x != nil { + return x.Port + } + return nil +} + +func (x *BoardListWatchResp) GetError() string { + if x != nil { + return x.Error + } + return "" +} + type BoardListItem struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1321,7 +1444,7 @@ type BoardListItem struct { func (x *BoardListItem) Reset() { *x = BoardListItem{} if protoimpl.UnsafeEnabled { - mi := &file_commands_board_proto_msgTypes[18] + mi := &file_commands_board_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1334,7 +1457,7 @@ func (x *BoardListItem) String() string { func (*BoardListItem) ProtoMessage() {} func (x *BoardListItem) ProtoReflect() protoreflect.Message { - mi := &file_commands_board_proto_msgTypes[18] + mi := &file_commands_board_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1347,7 +1470,7 @@ func (x *BoardListItem) ProtoReflect() protoreflect.Message { // Deprecated: Use BoardListItem.ProtoReflect.Descriptor instead. func (*BoardListItem) Descriptor() ([]byte, []int) { - return file_commands_board_proto_rawDescGZIP(), []int{18} + return file_commands_board_proto_rawDescGZIP(), []int{20} } func (x *BoardListItem) GetName() string { @@ -1547,16 +1670,31 @@ var file_commands_board_proto_rawDesc = []byte{ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x06, 0x62, - 0x6f, 0x61, 0x72, 0x64, 0x73, 0x22, 0x54, 0x0a, 0x0d, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x51, - 0x42, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x46, 0x51, 0x42, 0x4e, 0x12, 0x1b, - 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x69, 0x73, 0x48, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x42, 0x2d, 0x5a, 0x2b, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, - 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, - 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6f, 0x61, 0x72, 0x64, 0x73, 0x22, 0x70, 0x0a, 0x11, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x12, 0x3d, 0x0a, 0x08, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x12, 0x42, 0x6f, 0x61, 0x72, + 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x63, + 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x6f, + 0x72, 0x74, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x54, + 0x0a, 0x0d, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x51, 0x42, 0x4e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x46, 0x51, 0x42, 0x4e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x68, 0x69, + 0x64, 0x64, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x48, 0x69, + 0x64, 0x64, 0x65, 0x6e, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1571,7 +1709,7 @@ func file_commands_board_proto_rawDescGZIP() []byte { return file_commands_board_proto_rawDescData } -var file_commands_board_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_commands_board_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_commands_board_proto_goTypes = []interface{}{ (*BoardDetailsReq)(nil), // 0: cc.arduino.cli.commands.BoardDetailsReq (*BoardDetailsResp)(nil), // 1: cc.arduino.cli.commands.BoardDetailsResp @@ -1591,35 +1729,39 @@ var file_commands_board_proto_goTypes = []interface{}{ (*DetectedPort)(nil), // 15: cc.arduino.cli.commands.DetectedPort (*BoardListAllReq)(nil), // 16: cc.arduino.cli.commands.BoardListAllReq (*BoardListAllResp)(nil), // 17: cc.arduino.cli.commands.BoardListAllResp - (*BoardListItem)(nil), // 18: cc.arduino.cli.commands.BoardListItem - (*Instance)(nil), // 19: cc.arduino.cli.commands.Instance - (*Programmer)(nil), // 20: cc.arduino.cli.commands.Programmer - (*TaskProgress)(nil), // 21: cc.arduino.cli.commands.TaskProgress + (*BoardListWatchReq)(nil), // 18: cc.arduino.cli.commands.BoardListWatchReq + (*BoardListWatchResp)(nil), // 19: cc.arduino.cli.commands.BoardListWatchResp + (*BoardListItem)(nil), // 20: cc.arduino.cli.commands.BoardListItem + (*Instance)(nil), // 21: cc.arduino.cli.commands.Instance + (*Programmer)(nil), // 22: cc.arduino.cli.commands.Programmer + (*TaskProgress)(nil), // 23: cc.arduino.cli.commands.TaskProgress } var file_commands_board_proto_depIdxs = []int32{ - 19, // 0: cc.arduino.cli.commands.BoardDetailsReq.instance:type_name -> cc.arduino.cli.commands.Instance + 21, // 0: cc.arduino.cli.commands.BoardDetailsReq.instance:type_name -> cc.arduino.cli.commands.Instance 4, // 1: cc.arduino.cli.commands.BoardDetailsResp.package:type_name -> cc.arduino.cli.commands.Package 6, // 2: cc.arduino.cli.commands.BoardDetailsResp.platform:type_name -> cc.arduino.cli.commands.BoardPlatform 7, // 3: cc.arduino.cli.commands.BoardDetailsResp.toolsDependencies:type_name -> cc.arduino.cli.commands.ToolsDependencies 9, // 4: cc.arduino.cli.commands.BoardDetailsResp.config_options:type_name -> cc.arduino.cli.commands.ConfigOption 2, // 5: cc.arduino.cli.commands.BoardDetailsResp.identification_pref:type_name -> cc.arduino.cli.commands.IdentificationPref - 20, // 6: cc.arduino.cli.commands.BoardDetailsResp.programmers:type_name -> cc.arduino.cli.commands.Programmer + 22, // 6: cc.arduino.cli.commands.BoardDetailsResp.programmers:type_name -> cc.arduino.cli.commands.Programmer 3, // 7: cc.arduino.cli.commands.IdentificationPref.usbID:type_name -> cc.arduino.cli.commands.USBID 5, // 8: cc.arduino.cli.commands.Package.help:type_name -> cc.arduino.cli.commands.Help 8, // 9: cc.arduino.cli.commands.ToolsDependencies.systems:type_name -> cc.arduino.cli.commands.Systems 10, // 10: cc.arduino.cli.commands.ConfigOption.values:type_name -> cc.arduino.cli.commands.ConfigValue - 19, // 11: cc.arduino.cli.commands.BoardAttachReq.instance:type_name -> cc.arduino.cli.commands.Instance - 21, // 12: cc.arduino.cli.commands.BoardAttachResp.task_progress:type_name -> cc.arduino.cli.commands.TaskProgress - 19, // 13: cc.arduino.cli.commands.BoardListReq.instance:type_name -> cc.arduino.cli.commands.Instance + 21, // 11: cc.arduino.cli.commands.BoardAttachReq.instance:type_name -> cc.arduino.cli.commands.Instance + 23, // 12: cc.arduino.cli.commands.BoardAttachResp.task_progress:type_name -> cc.arduino.cli.commands.TaskProgress + 21, // 13: cc.arduino.cli.commands.BoardListReq.instance:type_name -> cc.arduino.cli.commands.Instance 15, // 14: cc.arduino.cli.commands.BoardListResp.ports:type_name -> cc.arduino.cli.commands.DetectedPort - 18, // 15: cc.arduino.cli.commands.DetectedPort.boards:type_name -> cc.arduino.cli.commands.BoardListItem - 19, // 16: cc.arduino.cli.commands.BoardListAllReq.instance:type_name -> cc.arduino.cli.commands.Instance - 18, // 17: cc.arduino.cli.commands.BoardListAllResp.boards:type_name -> cc.arduino.cli.commands.BoardListItem - 18, // [18:18] is the sub-list for method output_type - 18, // [18:18] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 20, // 15: cc.arduino.cli.commands.DetectedPort.boards:type_name -> cc.arduino.cli.commands.BoardListItem + 21, // 16: cc.arduino.cli.commands.BoardListAllReq.instance:type_name -> cc.arduino.cli.commands.Instance + 20, // 17: cc.arduino.cli.commands.BoardListAllResp.boards:type_name -> cc.arduino.cli.commands.BoardListItem + 21, // 18: cc.arduino.cli.commands.BoardListWatchReq.instance:type_name -> cc.arduino.cli.commands.Instance + 15, // 19: cc.arduino.cli.commands.BoardListWatchResp.port:type_name -> cc.arduino.cli.commands.DetectedPort + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_commands_board_proto_init() } @@ -1846,6 +1988,30 @@ func file_commands_board_proto_init() { } } file_commands_board_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoardListWatchReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commands_board_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoardListWatchResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_commands_board_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BoardListItem); i { case 0: return &v.state @@ -1864,7 +2030,7 @@ func file_commands_board_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_commands_board_proto_rawDesc, NumEnums: 0, - NumMessages: 19, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/rpc/commands/board.proto b/rpc/commands/board.proto index 9f2edf736dc..b3274889eb4 100644 --- a/rpc/commands/board.proto +++ b/rpc/commands/board.proto @@ -206,6 +206,22 @@ message BoardListAllResp { repeated BoardListItem boards = 1; } +message BoardListWatchReq { + // Arduino Core Service instance from the `Init` response. + Instance instance = 1; + // Set this to true to stop the discovery process + bool interrupt = 2; +} + +message BoardListWatchResp { + // Event type as received from the serial discovery tool + string event_type = 1; + // Information about the port + DetectedPort port = 2; + // Eventual errors when detecting connected boards + string error = 3; +} + message BoardListItem { // The name for use when identifying the board to a human. string name = 1; diff --git a/rpc/commands/commands.pb.go b/rpc/commands/commands.pb.go index 2a3ad97b189..aa98c81e252 100644 --- a/rpc/commands/commands.pb.go +++ b/rpc/commands/commands.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/commands.proto package commands @@ -1361,7 +1361,7 @@ var file_commands_commands_proto_rawDesc = []byte{ 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x69, 0x72, 0x22, 0x13, 0x0a, 0x11, 0x41, 0x72, 0x63, 0x68, - 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x32, 0xc9, 0x1d, + 0x69, 0x76, 0x65, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x32, 0xb8, 0x1e, 0x0a, 0x0b, 0x41, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x4f, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x20, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, @@ -1456,152 +1456,159 @@ var file_commands_commands_proto_rawDesc = []byte{ 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x56, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x2e, - 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2b, 0x2e, + 0x73, 0x70, 0x12, 0x6d, 0x0a, 0x0e, 0x42, 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, + 0x6f, 0x61, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, + 0x1a, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x6f, 0x61, 0x72, 0x64, + 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x28, 0x01, 0x30, + 0x01, 0x12, 0x56, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x12, 0x23, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x24, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2b, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x10, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x10, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2c, - 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x63, - 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, - 0x11, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x71, 0x1a, 0x2e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x63, 0x63, + 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x11, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, - 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, - 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x30, 0x01, 0x12, 0x53, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x22, 0x2e, - 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x71, 0x1a, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, - 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, - 0x65, 0x72, 0x12, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x32, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x1a, 0x2e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x30, 0x01, 0x12, 0x6e, 0x0a, 0x0f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, - 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0xa2, 0x01, 0x0a, 0x21, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, - 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, - 0x64, 0x12, 0x3d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, - 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, - 0x1a, 0x3e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, + 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x30, 0x01, 0x12, 0x53, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x22, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, + 0x1a, 0x23, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, + 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x12, 0x31, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x1a, 0x32, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x55, + 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x73, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, + 0x6d, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0xa2, 0x01, 0x0a, 0x21, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x3d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x6b, 0x0a, 0x0e, 0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, - 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x75, 0x72, - 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x2b, - 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, - 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x69, 0x0a, - 0x0e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, - 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x63, 0x63, - 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, - 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, - 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6e, 0x0a, - 0x0f, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, - 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, + 0x62, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, + 0x3e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x6b, 0x0a, 0x0e, 0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, + 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x75, 0x72, 0x6e, + 0x42, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, - 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x6b, 0x0a, - 0x0e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, - 0x2a, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x42, 0x6f, 0x6f, 0x74, + 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x69, 0x0a, 0x0e, + 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x2a, + 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, + 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x63, 0x63, 0x2e, + 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, + 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, + 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6e, 0x0a, 0x0f, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x2b, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x63, 0x63, - 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x11, 0x5a, 0x69, - 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, - 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2e, + 0x79, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x6f, + 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x6b, 0x0a, 0x0e, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2a, + 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x63, 0x63, 0x2e, + 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x11, 0x5a, 0x69, 0x70, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, - 0x12, 0x74, 0x0a, 0x11, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, - 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, - 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, + 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, + 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x5a, 0x69, 0x70, 0x4c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, + 0x74, 0x0a, 0x11, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x47, 0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x10, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2c, 0x2e, 0x63, 0x63, 0x2e, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, - 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x11, 0x4c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x2d, - 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, + 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, + 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x47, 0x69, + 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x71, 0x0a, 0x10, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, + 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x2c, 0x2e, 0x63, 0x63, 0x2e, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, + 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x74, 0x0a, 0x11, 0x4c, 0x69, 0x62, 0x72, + 0x61, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x2d, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, - 0x8d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x36, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x63, + 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x30, 0x01, 0x12, 0x8d, + 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, + 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x36, 0x2e, + 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x37, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x66, + 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, + 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x63, 0x63, 0x2e, + 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0b, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, + 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, + 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x37, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, - 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x44, - 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x66, 0x0a, 0x0d, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x12, 0x29, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, - 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x63, 0x63, - 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x60, 0x0a, 0x0b, 0x4c, 0x69, 0x62, 0x72, 0x61, - 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, - 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, - 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x28, 0x2e, 0x63, 0x63, 0x2e, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2e, 0x63, 0x6c, 0x69, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2f, 0x61, + 0x72, 0x64, 0x75, 0x69, 0x6e, 0x6f, 0x2d, 0x63, 0x6c, 0x69, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1649,50 +1656,52 @@ var file_commands_commands_proto_goTypes = []interface{}{ (*BoardAttachReq)(nil), // 28: cc.arduino.cli.commands.BoardAttachReq (*BoardListReq)(nil), // 29: cc.arduino.cli.commands.BoardListReq (*BoardListAllReq)(nil), // 30: cc.arduino.cli.commands.BoardListAllReq - (*CompileReq)(nil), // 31: cc.arduino.cli.commands.CompileReq - (*PlatformInstallReq)(nil), // 32: cc.arduino.cli.commands.PlatformInstallReq - (*PlatformDownloadReq)(nil), // 33: cc.arduino.cli.commands.PlatformDownloadReq - (*PlatformUninstallReq)(nil), // 34: cc.arduino.cli.commands.PlatformUninstallReq - (*PlatformUpgradeReq)(nil), // 35: cc.arduino.cli.commands.PlatformUpgradeReq - (*UploadReq)(nil), // 36: cc.arduino.cli.commands.UploadReq - (*UploadUsingProgrammerReq)(nil), // 37: cc.arduino.cli.commands.UploadUsingProgrammerReq - (*ListProgrammersAvailableForUploadReq)(nil), // 38: cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq - (*BurnBootloaderReq)(nil), // 39: cc.arduino.cli.commands.BurnBootloaderReq - (*PlatformSearchReq)(nil), // 40: cc.arduino.cli.commands.PlatformSearchReq - (*PlatformListReq)(nil), // 41: cc.arduino.cli.commands.PlatformListReq - (*LibraryDownloadReq)(nil), // 42: cc.arduino.cli.commands.LibraryDownloadReq - (*LibraryInstallReq)(nil), // 43: cc.arduino.cli.commands.LibraryInstallReq - (*ZipLibraryInstallReq)(nil), // 44: cc.arduino.cli.commands.ZipLibraryInstallReq - (*GitLibraryInstallReq)(nil), // 45: cc.arduino.cli.commands.GitLibraryInstallReq - (*LibraryUninstallReq)(nil), // 46: cc.arduino.cli.commands.LibraryUninstallReq - (*LibraryUpgradeAllReq)(nil), // 47: cc.arduino.cli.commands.LibraryUpgradeAllReq - (*LibraryResolveDependenciesReq)(nil), // 48: cc.arduino.cli.commands.LibraryResolveDependenciesReq - (*LibrarySearchReq)(nil), // 49: cc.arduino.cli.commands.LibrarySearchReq - (*LibraryListReq)(nil), // 50: cc.arduino.cli.commands.LibraryListReq - (*BoardDetailsResp)(nil), // 51: cc.arduino.cli.commands.BoardDetailsResp - (*BoardAttachResp)(nil), // 52: cc.arduino.cli.commands.BoardAttachResp - (*BoardListResp)(nil), // 53: cc.arduino.cli.commands.BoardListResp - (*BoardListAllResp)(nil), // 54: cc.arduino.cli.commands.BoardListAllResp - (*CompileResp)(nil), // 55: cc.arduino.cli.commands.CompileResp - (*PlatformInstallResp)(nil), // 56: cc.arduino.cli.commands.PlatformInstallResp - (*PlatformDownloadResp)(nil), // 57: cc.arduino.cli.commands.PlatformDownloadResp - (*PlatformUninstallResp)(nil), // 58: cc.arduino.cli.commands.PlatformUninstallResp - (*PlatformUpgradeResp)(nil), // 59: cc.arduino.cli.commands.PlatformUpgradeResp - (*UploadResp)(nil), // 60: cc.arduino.cli.commands.UploadResp - (*UploadUsingProgrammerResp)(nil), // 61: cc.arduino.cli.commands.UploadUsingProgrammerResp - (*ListProgrammersAvailableForUploadResp)(nil), // 62: cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp - (*BurnBootloaderResp)(nil), // 63: cc.arduino.cli.commands.BurnBootloaderResp - (*PlatformSearchResp)(nil), // 64: cc.arduino.cli.commands.PlatformSearchResp - (*PlatformListResp)(nil), // 65: cc.arduino.cli.commands.PlatformListResp - (*LibraryDownloadResp)(nil), // 66: cc.arduino.cli.commands.LibraryDownloadResp - (*LibraryInstallResp)(nil), // 67: cc.arduino.cli.commands.LibraryInstallResp - (*ZipLibraryInstallResp)(nil), // 68: cc.arduino.cli.commands.ZipLibraryInstallResp - (*GitLibraryInstallResp)(nil), // 69: cc.arduino.cli.commands.GitLibraryInstallResp - (*LibraryUninstallResp)(nil), // 70: cc.arduino.cli.commands.LibraryUninstallResp - (*LibraryUpgradeAllResp)(nil), // 71: cc.arduino.cli.commands.LibraryUpgradeAllResp - (*LibraryResolveDependenciesResp)(nil), // 72: cc.arduino.cli.commands.LibraryResolveDependenciesResp - (*LibrarySearchResp)(nil), // 73: cc.arduino.cli.commands.LibrarySearchResp - (*LibraryListResp)(nil), // 74: cc.arduino.cli.commands.LibraryListResp + (*BoardListWatchReq)(nil), // 31: cc.arduino.cli.commands.BoardListWatchReq + (*CompileReq)(nil), // 32: cc.arduino.cli.commands.CompileReq + (*PlatformInstallReq)(nil), // 33: cc.arduino.cli.commands.PlatformInstallReq + (*PlatformDownloadReq)(nil), // 34: cc.arduino.cli.commands.PlatformDownloadReq + (*PlatformUninstallReq)(nil), // 35: cc.arduino.cli.commands.PlatformUninstallReq + (*PlatformUpgradeReq)(nil), // 36: cc.arduino.cli.commands.PlatformUpgradeReq + (*UploadReq)(nil), // 37: cc.arduino.cli.commands.UploadReq + (*UploadUsingProgrammerReq)(nil), // 38: cc.arduino.cli.commands.UploadUsingProgrammerReq + (*ListProgrammersAvailableForUploadReq)(nil), // 39: cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq + (*BurnBootloaderReq)(nil), // 40: cc.arduino.cli.commands.BurnBootloaderReq + (*PlatformSearchReq)(nil), // 41: cc.arduino.cli.commands.PlatformSearchReq + (*PlatformListReq)(nil), // 42: cc.arduino.cli.commands.PlatformListReq + (*LibraryDownloadReq)(nil), // 43: cc.arduino.cli.commands.LibraryDownloadReq + (*LibraryInstallReq)(nil), // 44: cc.arduino.cli.commands.LibraryInstallReq + (*ZipLibraryInstallReq)(nil), // 45: cc.arduino.cli.commands.ZipLibraryInstallReq + (*GitLibraryInstallReq)(nil), // 46: cc.arduino.cli.commands.GitLibraryInstallReq + (*LibraryUninstallReq)(nil), // 47: cc.arduino.cli.commands.LibraryUninstallReq + (*LibraryUpgradeAllReq)(nil), // 48: cc.arduino.cli.commands.LibraryUpgradeAllReq + (*LibraryResolveDependenciesReq)(nil), // 49: cc.arduino.cli.commands.LibraryResolveDependenciesReq + (*LibrarySearchReq)(nil), // 50: cc.arduino.cli.commands.LibrarySearchReq + (*LibraryListReq)(nil), // 51: cc.arduino.cli.commands.LibraryListReq + (*BoardDetailsResp)(nil), // 52: cc.arduino.cli.commands.BoardDetailsResp + (*BoardAttachResp)(nil), // 53: cc.arduino.cli.commands.BoardAttachResp + (*BoardListResp)(nil), // 54: cc.arduino.cli.commands.BoardListResp + (*BoardListAllResp)(nil), // 55: cc.arduino.cli.commands.BoardListAllResp + (*BoardListWatchResp)(nil), // 56: cc.arduino.cli.commands.BoardListWatchResp + (*CompileResp)(nil), // 57: cc.arduino.cli.commands.CompileResp + (*PlatformInstallResp)(nil), // 58: cc.arduino.cli.commands.PlatformInstallResp + (*PlatformDownloadResp)(nil), // 59: cc.arduino.cli.commands.PlatformDownloadResp + (*PlatformUninstallResp)(nil), // 60: cc.arduino.cli.commands.PlatformUninstallResp + (*PlatformUpgradeResp)(nil), // 61: cc.arduino.cli.commands.PlatformUpgradeResp + (*UploadResp)(nil), // 62: cc.arduino.cli.commands.UploadResp + (*UploadUsingProgrammerResp)(nil), // 63: cc.arduino.cli.commands.UploadUsingProgrammerResp + (*ListProgrammersAvailableForUploadResp)(nil), // 64: cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp + (*BurnBootloaderResp)(nil), // 65: cc.arduino.cli.commands.BurnBootloaderResp + (*PlatformSearchResp)(nil), // 66: cc.arduino.cli.commands.PlatformSearchResp + (*PlatformListResp)(nil), // 67: cc.arduino.cli.commands.PlatformListResp + (*LibraryDownloadResp)(nil), // 68: cc.arduino.cli.commands.LibraryDownloadResp + (*LibraryInstallResp)(nil), // 69: cc.arduino.cli.commands.LibraryInstallResp + (*ZipLibraryInstallResp)(nil), // 70: cc.arduino.cli.commands.ZipLibraryInstallResp + (*GitLibraryInstallResp)(nil), // 71: cc.arduino.cli.commands.GitLibraryInstallResp + (*LibraryUninstallResp)(nil), // 72: cc.arduino.cli.commands.LibraryUninstallResp + (*LibraryUpgradeAllResp)(nil), // 73: cc.arduino.cli.commands.LibraryUpgradeAllResp + (*LibraryResolveDependenciesResp)(nil), // 74: cc.arduino.cli.commands.LibraryResolveDependenciesResp + (*LibrarySearchResp)(nil), // 75: cc.arduino.cli.commands.LibrarySearchResp + (*LibraryListResp)(nil), // 76: cc.arduino.cli.commands.LibraryListResp } var file_commands_commands_proto_depIdxs = []int32{ 22, // 0: cc.arduino.cli.commands.InitResp.instance:type_name -> cc.arduino.cli.commands.Instance @@ -1728,63 +1737,65 @@ var file_commands_commands_proto_depIdxs = []int32{ 28, // 30: cc.arduino.cli.commands.ArduinoCore.BoardAttach:input_type -> cc.arduino.cli.commands.BoardAttachReq 29, // 31: cc.arduino.cli.commands.ArduinoCore.BoardList:input_type -> cc.arduino.cli.commands.BoardListReq 30, // 32: cc.arduino.cli.commands.ArduinoCore.BoardListAll:input_type -> cc.arduino.cli.commands.BoardListAllReq - 31, // 33: cc.arduino.cli.commands.ArduinoCore.Compile:input_type -> cc.arduino.cli.commands.CompileReq - 32, // 34: cc.arduino.cli.commands.ArduinoCore.PlatformInstall:input_type -> cc.arduino.cli.commands.PlatformInstallReq - 33, // 35: cc.arduino.cli.commands.ArduinoCore.PlatformDownload:input_type -> cc.arduino.cli.commands.PlatformDownloadReq - 34, // 36: cc.arduino.cli.commands.ArduinoCore.PlatformUninstall:input_type -> cc.arduino.cli.commands.PlatformUninstallReq - 35, // 37: cc.arduino.cli.commands.ArduinoCore.PlatformUpgrade:input_type -> cc.arduino.cli.commands.PlatformUpgradeReq - 36, // 38: cc.arduino.cli.commands.ArduinoCore.Upload:input_type -> cc.arduino.cli.commands.UploadReq - 37, // 39: cc.arduino.cli.commands.ArduinoCore.UploadUsingProgrammer:input_type -> cc.arduino.cli.commands.UploadUsingProgrammerReq - 38, // 40: cc.arduino.cli.commands.ArduinoCore.ListProgrammersAvailableForUpload:input_type -> cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq - 39, // 41: cc.arduino.cli.commands.ArduinoCore.BurnBootloader:input_type -> cc.arduino.cli.commands.BurnBootloaderReq - 40, // 42: cc.arduino.cli.commands.ArduinoCore.PlatformSearch:input_type -> cc.arduino.cli.commands.PlatformSearchReq - 41, // 43: cc.arduino.cli.commands.ArduinoCore.PlatformList:input_type -> cc.arduino.cli.commands.PlatformListReq - 42, // 44: cc.arduino.cli.commands.ArduinoCore.LibraryDownload:input_type -> cc.arduino.cli.commands.LibraryDownloadReq - 43, // 45: cc.arduino.cli.commands.ArduinoCore.LibraryInstall:input_type -> cc.arduino.cli.commands.LibraryInstallReq - 44, // 46: cc.arduino.cli.commands.ArduinoCore.ZipLibraryInstall:input_type -> cc.arduino.cli.commands.ZipLibraryInstallReq - 45, // 47: cc.arduino.cli.commands.ArduinoCore.GitLibraryInstall:input_type -> cc.arduino.cli.commands.GitLibraryInstallReq - 46, // 48: cc.arduino.cli.commands.ArduinoCore.LibraryUninstall:input_type -> cc.arduino.cli.commands.LibraryUninstallReq - 47, // 49: cc.arduino.cli.commands.ArduinoCore.LibraryUpgradeAll:input_type -> cc.arduino.cli.commands.LibraryUpgradeAllReq - 48, // 50: cc.arduino.cli.commands.ArduinoCore.LibraryResolveDependencies:input_type -> cc.arduino.cli.commands.LibraryResolveDependenciesReq - 49, // 51: cc.arduino.cli.commands.ArduinoCore.LibrarySearch:input_type -> cc.arduino.cli.commands.LibrarySearchReq - 50, // 52: cc.arduino.cli.commands.ArduinoCore.LibraryList:input_type -> cc.arduino.cli.commands.LibraryListReq - 1, // 53: cc.arduino.cli.commands.ArduinoCore.Init:output_type -> cc.arduino.cli.commands.InitResp - 3, // 54: cc.arduino.cli.commands.ArduinoCore.Destroy:output_type -> cc.arduino.cli.commands.DestroyResp - 5, // 55: cc.arduino.cli.commands.ArduinoCore.Rescan:output_type -> cc.arduino.cli.commands.RescanResp - 7, // 56: cc.arduino.cli.commands.ArduinoCore.UpdateIndex:output_type -> cc.arduino.cli.commands.UpdateIndexResp - 9, // 57: cc.arduino.cli.commands.ArduinoCore.UpdateLibrariesIndex:output_type -> cc.arduino.cli.commands.UpdateLibrariesIndexResp - 11, // 58: cc.arduino.cli.commands.ArduinoCore.UpdateCoreLibrariesIndex:output_type -> cc.arduino.cli.commands.UpdateCoreLibrariesIndexResp - 13, // 59: cc.arduino.cli.commands.ArduinoCore.Outdated:output_type -> cc.arduino.cli.commands.OutdatedResp - 15, // 60: cc.arduino.cli.commands.ArduinoCore.Upgrade:output_type -> cc.arduino.cli.commands.UpgradeResp - 17, // 61: cc.arduino.cli.commands.ArduinoCore.Version:output_type -> cc.arduino.cli.commands.VersionResp - 19, // 62: cc.arduino.cli.commands.ArduinoCore.LoadSketch:output_type -> cc.arduino.cli.commands.LoadSketchResp - 21, // 63: cc.arduino.cli.commands.ArduinoCore.ArchiveSketch:output_type -> cc.arduino.cli.commands.ArchiveSketchResp - 51, // 64: cc.arduino.cli.commands.ArduinoCore.BoardDetails:output_type -> cc.arduino.cli.commands.BoardDetailsResp - 52, // 65: cc.arduino.cli.commands.ArduinoCore.BoardAttach:output_type -> cc.arduino.cli.commands.BoardAttachResp - 53, // 66: cc.arduino.cli.commands.ArduinoCore.BoardList:output_type -> cc.arduino.cli.commands.BoardListResp - 54, // 67: cc.arduino.cli.commands.ArduinoCore.BoardListAll:output_type -> cc.arduino.cli.commands.BoardListAllResp - 55, // 68: cc.arduino.cli.commands.ArduinoCore.Compile:output_type -> cc.arduino.cli.commands.CompileResp - 56, // 69: cc.arduino.cli.commands.ArduinoCore.PlatformInstall:output_type -> cc.arduino.cli.commands.PlatformInstallResp - 57, // 70: cc.arduino.cli.commands.ArduinoCore.PlatformDownload:output_type -> cc.arduino.cli.commands.PlatformDownloadResp - 58, // 71: cc.arduino.cli.commands.ArduinoCore.PlatformUninstall:output_type -> cc.arduino.cli.commands.PlatformUninstallResp - 59, // 72: cc.arduino.cli.commands.ArduinoCore.PlatformUpgrade:output_type -> cc.arduino.cli.commands.PlatformUpgradeResp - 60, // 73: cc.arduino.cli.commands.ArduinoCore.Upload:output_type -> cc.arduino.cli.commands.UploadResp - 61, // 74: cc.arduino.cli.commands.ArduinoCore.UploadUsingProgrammer:output_type -> cc.arduino.cli.commands.UploadUsingProgrammerResp - 62, // 75: cc.arduino.cli.commands.ArduinoCore.ListProgrammersAvailableForUpload:output_type -> cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp - 63, // 76: cc.arduino.cli.commands.ArduinoCore.BurnBootloader:output_type -> cc.arduino.cli.commands.BurnBootloaderResp - 64, // 77: cc.arduino.cli.commands.ArduinoCore.PlatformSearch:output_type -> cc.arduino.cli.commands.PlatformSearchResp - 65, // 78: cc.arduino.cli.commands.ArduinoCore.PlatformList:output_type -> cc.arduino.cli.commands.PlatformListResp - 66, // 79: cc.arduino.cli.commands.ArduinoCore.LibraryDownload:output_type -> cc.arduino.cli.commands.LibraryDownloadResp - 67, // 80: cc.arduino.cli.commands.ArduinoCore.LibraryInstall:output_type -> cc.arduino.cli.commands.LibraryInstallResp - 68, // 81: cc.arduino.cli.commands.ArduinoCore.ZipLibraryInstall:output_type -> cc.arduino.cli.commands.ZipLibraryInstallResp - 69, // 82: cc.arduino.cli.commands.ArduinoCore.GitLibraryInstall:output_type -> cc.arduino.cli.commands.GitLibraryInstallResp - 70, // 83: cc.arduino.cli.commands.ArduinoCore.LibraryUninstall:output_type -> cc.arduino.cli.commands.LibraryUninstallResp - 71, // 84: cc.arduino.cli.commands.ArduinoCore.LibraryUpgradeAll:output_type -> cc.arduino.cli.commands.LibraryUpgradeAllResp - 72, // 85: cc.arduino.cli.commands.ArduinoCore.LibraryResolveDependencies:output_type -> cc.arduino.cli.commands.LibraryResolveDependenciesResp - 73, // 86: cc.arduino.cli.commands.ArduinoCore.LibrarySearch:output_type -> cc.arduino.cli.commands.LibrarySearchResp - 74, // 87: cc.arduino.cli.commands.ArduinoCore.LibraryList:output_type -> cc.arduino.cli.commands.LibraryListResp - 53, // [53:88] is the sub-list for method output_type - 18, // [18:53] is the sub-list for method input_type + 31, // 33: cc.arduino.cli.commands.ArduinoCore.BoardListWatch:input_type -> cc.arduino.cli.commands.BoardListWatchReq + 32, // 34: cc.arduino.cli.commands.ArduinoCore.Compile:input_type -> cc.arduino.cli.commands.CompileReq + 33, // 35: cc.arduino.cli.commands.ArduinoCore.PlatformInstall:input_type -> cc.arduino.cli.commands.PlatformInstallReq + 34, // 36: cc.arduino.cli.commands.ArduinoCore.PlatformDownload:input_type -> cc.arduino.cli.commands.PlatformDownloadReq + 35, // 37: cc.arduino.cli.commands.ArduinoCore.PlatformUninstall:input_type -> cc.arduino.cli.commands.PlatformUninstallReq + 36, // 38: cc.arduino.cli.commands.ArduinoCore.PlatformUpgrade:input_type -> cc.arduino.cli.commands.PlatformUpgradeReq + 37, // 39: cc.arduino.cli.commands.ArduinoCore.Upload:input_type -> cc.arduino.cli.commands.UploadReq + 38, // 40: cc.arduino.cli.commands.ArduinoCore.UploadUsingProgrammer:input_type -> cc.arduino.cli.commands.UploadUsingProgrammerReq + 39, // 41: cc.arduino.cli.commands.ArduinoCore.ListProgrammersAvailableForUpload:input_type -> cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq + 40, // 42: cc.arduino.cli.commands.ArduinoCore.BurnBootloader:input_type -> cc.arduino.cli.commands.BurnBootloaderReq + 41, // 43: cc.arduino.cli.commands.ArduinoCore.PlatformSearch:input_type -> cc.arduino.cli.commands.PlatformSearchReq + 42, // 44: cc.arduino.cli.commands.ArduinoCore.PlatformList:input_type -> cc.arduino.cli.commands.PlatformListReq + 43, // 45: cc.arduino.cli.commands.ArduinoCore.LibraryDownload:input_type -> cc.arduino.cli.commands.LibraryDownloadReq + 44, // 46: cc.arduino.cli.commands.ArduinoCore.LibraryInstall:input_type -> cc.arduino.cli.commands.LibraryInstallReq + 45, // 47: cc.arduino.cli.commands.ArduinoCore.ZipLibraryInstall:input_type -> cc.arduino.cli.commands.ZipLibraryInstallReq + 46, // 48: cc.arduino.cli.commands.ArduinoCore.GitLibraryInstall:input_type -> cc.arduino.cli.commands.GitLibraryInstallReq + 47, // 49: cc.arduino.cli.commands.ArduinoCore.LibraryUninstall:input_type -> cc.arduino.cli.commands.LibraryUninstallReq + 48, // 50: cc.arduino.cli.commands.ArduinoCore.LibraryUpgradeAll:input_type -> cc.arduino.cli.commands.LibraryUpgradeAllReq + 49, // 51: cc.arduino.cli.commands.ArduinoCore.LibraryResolveDependencies:input_type -> cc.arduino.cli.commands.LibraryResolveDependenciesReq + 50, // 52: cc.arduino.cli.commands.ArduinoCore.LibrarySearch:input_type -> cc.arduino.cli.commands.LibrarySearchReq + 51, // 53: cc.arduino.cli.commands.ArduinoCore.LibraryList:input_type -> cc.arduino.cli.commands.LibraryListReq + 1, // 54: cc.arduino.cli.commands.ArduinoCore.Init:output_type -> cc.arduino.cli.commands.InitResp + 3, // 55: cc.arduino.cli.commands.ArduinoCore.Destroy:output_type -> cc.arduino.cli.commands.DestroyResp + 5, // 56: cc.arduino.cli.commands.ArduinoCore.Rescan:output_type -> cc.arduino.cli.commands.RescanResp + 7, // 57: cc.arduino.cli.commands.ArduinoCore.UpdateIndex:output_type -> cc.arduino.cli.commands.UpdateIndexResp + 9, // 58: cc.arduino.cli.commands.ArduinoCore.UpdateLibrariesIndex:output_type -> cc.arduino.cli.commands.UpdateLibrariesIndexResp + 11, // 59: cc.arduino.cli.commands.ArduinoCore.UpdateCoreLibrariesIndex:output_type -> cc.arduino.cli.commands.UpdateCoreLibrariesIndexResp + 13, // 60: cc.arduino.cli.commands.ArduinoCore.Outdated:output_type -> cc.arduino.cli.commands.OutdatedResp + 15, // 61: cc.arduino.cli.commands.ArduinoCore.Upgrade:output_type -> cc.arduino.cli.commands.UpgradeResp + 17, // 62: cc.arduino.cli.commands.ArduinoCore.Version:output_type -> cc.arduino.cli.commands.VersionResp + 19, // 63: cc.arduino.cli.commands.ArduinoCore.LoadSketch:output_type -> cc.arduino.cli.commands.LoadSketchResp + 21, // 64: cc.arduino.cli.commands.ArduinoCore.ArchiveSketch:output_type -> cc.arduino.cli.commands.ArchiveSketchResp + 52, // 65: cc.arduino.cli.commands.ArduinoCore.BoardDetails:output_type -> cc.arduino.cli.commands.BoardDetailsResp + 53, // 66: cc.arduino.cli.commands.ArduinoCore.BoardAttach:output_type -> cc.arduino.cli.commands.BoardAttachResp + 54, // 67: cc.arduino.cli.commands.ArduinoCore.BoardList:output_type -> cc.arduino.cli.commands.BoardListResp + 55, // 68: cc.arduino.cli.commands.ArduinoCore.BoardListAll:output_type -> cc.arduino.cli.commands.BoardListAllResp + 56, // 69: cc.arduino.cli.commands.ArduinoCore.BoardListWatch:output_type -> cc.arduino.cli.commands.BoardListWatchResp + 57, // 70: cc.arduino.cli.commands.ArduinoCore.Compile:output_type -> cc.arduino.cli.commands.CompileResp + 58, // 71: cc.arduino.cli.commands.ArduinoCore.PlatformInstall:output_type -> cc.arduino.cli.commands.PlatformInstallResp + 59, // 72: cc.arduino.cli.commands.ArduinoCore.PlatformDownload:output_type -> cc.arduino.cli.commands.PlatformDownloadResp + 60, // 73: cc.arduino.cli.commands.ArduinoCore.PlatformUninstall:output_type -> cc.arduino.cli.commands.PlatformUninstallResp + 61, // 74: cc.arduino.cli.commands.ArduinoCore.PlatformUpgrade:output_type -> cc.arduino.cli.commands.PlatformUpgradeResp + 62, // 75: cc.arduino.cli.commands.ArduinoCore.Upload:output_type -> cc.arduino.cli.commands.UploadResp + 63, // 76: cc.arduino.cli.commands.ArduinoCore.UploadUsingProgrammer:output_type -> cc.arduino.cli.commands.UploadUsingProgrammerResp + 64, // 77: cc.arduino.cli.commands.ArduinoCore.ListProgrammersAvailableForUpload:output_type -> cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp + 65, // 78: cc.arduino.cli.commands.ArduinoCore.BurnBootloader:output_type -> cc.arduino.cli.commands.BurnBootloaderResp + 66, // 79: cc.arduino.cli.commands.ArduinoCore.PlatformSearch:output_type -> cc.arduino.cli.commands.PlatformSearchResp + 67, // 80: cc.arduino.cli.commands.ArduinoCore.PlatformList:output_type -> cc.arduino.cli.commands.PlatformListResp + 68, // 81: cc.arduino.cli.commands.ArduinoCore.LibraryDownload:output_type -> cc.arduino.cli.commands.LibraryDownloadResp + 69, // 82: cc.arduino.cli.commands.ArduinoCore.LibraryInstall:output_type -> cc.arduino.cli.commands.LibraryInstallResp + 70, // 83: cc.arduino.cli.commands.ArduinoCore.ZipLibraryInstall:output_type -> cc.arduino.cli.commands.ZipLibraryInstallResp + 71, // 84: cc.arduino.cli.commands.ArduinoCore.GitLibraryInstall:output_type -> cc.arduino.cli.commands.GitLibraryInstallResp + 72, // 85: cc.arduino.cli.commands.ArduinoCore.LibraryUninstall:output_type -> cc.arduino.cli.commands.LibraryUninstallResp + 73, // 86: cc.arduino.cli.commands.ArduinoCore.LibraryUpgradeAll:output_type -> cc.arduino.cli.commands.LibraryUpgradeAllResp + 74, // 87: cc.arduino.cli.commands.ArduinoCore.LibraryResolveDependencies:output_type -> cc.arduino.cli.commands.LibraryResolveDependenciesResp + 75, // 88: cc.arduino.cli.commands.ArduinoCore.LibrarySearch:output_type -> cc.arduino.cli.commands.LibrarySearchResp + 76, // 89: cc.arduino.cli.commands.ArduinoCore.LibraryList:output_type -> cc.arduino.cli.commands.LibraryListResp + 54, // [54:90] is the sub-list for method output_type + 18, // [18:54] is the sub-list for method input_type 18, // [18:18] is the sub-list for extension type_name 18, // [18:18] is the sub-list for extension extendee 0, // [0:18] is the sub-list for field type_name @@ -2130,6 +2141,8 @@ type ArduinoCoreClient interface { BoardList(ctx context.Context, in *BoardListReq, opts ...grpc.CallOption) (*BoardListResp, error) // List all the boards provided by installed platforms. BoardListAll(ctx context.Context, in *BoardListAllReq, opts ...grpc.CallOption) (*BoardListAllResp, error) + // List boards connection and disconnected events. + BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCore_BoardListWatchClient, error) // Compile an Arduino sketch. Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) // Download and install a platform and its tool dependencies. @@ -2457,8 +2470,39 @@ func (c *arduinoCoreClient) BoardListAll(ctx context.Context, in *BoardListAllRe return out, nil } +func (c *arduinoCoreClient) BoardListWatch(ctx context.Context, opts ...grpc.CallOption) (ArduinoCore_BoardListWatchClient, error) { + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[6], "/cc.arduino.cli.commands.ArduinoCore/BoardListWatch", opts...) + if err != nil { + return nil, err + } + x := &arduinoCoreBoardListWatchClient{stream} + return x, nil +} + +type ArduinoCore_BoardListWatchClient interface { + Send(*BoardListWatchReq) error + Recv() (*BoardListWatchResp, error) + grpc.ClientStream +} + +type arduinoCoreBoardListWatchClient struct { + grpc.ClientStream +} + +func (x *arduinoCoreBoardListWatchClient) Send(m *BoardListWatchReq) error { + return x.ClientStream.SendMsg(m) +} + +func (x *arduinoCoreBoardListWatchClient) Recv() (*BoardListWatchResp, error) { + m := new(BoardListWatchResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *arduinoCoreClient) Compile(ctx context.Context, in *CompileReq, opts ...grpc.CallOption) (ArduinoCore_CompileClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[6], "/cc.arduino.cli.commands.ArduinoCore/Compile", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[7], "/cc.arduino.cli.commands.ArduinoCore/Compile", opts...) if err != nil { return nil, err } @@ -2490,7 +2534,7 @@ func (x *arduinoCoreCompileClient) Recv() (*CompileResp, error) { } func (c *arduinoCoreClient) PlatformInstall(ctx context.Context, in *PlatformInstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[7], "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[8], "/cc.arduino.cli.commands.ArduinoCore/PlatformInstall", opts...) if err != nil { return nil, err } @@ -2522,7 +2566,7 @@ func (x *arduinoCorePlatformInstallClient) Recv() (*PlatformInstallResp, error) } func (c *arduinoCoreClient) PlatformDownload(ctx context.Context, in *PlatformDownloadReq, opts ...grpc.CallOption) (ArduinoCore_PlatformDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[8], "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[9], "/cc.arduino.cli.commands.ArduinoCore/PlatformDownload", opts...) if err != nil { return nil, err } @@ -2554,7 +2598,7 @@ func (x *arduinoCorePlatformDownloadClient) Recv() (*PlatformDownloadResp, error } func (c *arduinoCoreClient) PlatformUninstall(ctx context.Context, in *PlatformUninstallReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[9], "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[10], "/cc.arduino.cli.commands.ArduinoCore/PlatformUninstall", opts...) if err != nil { return nil, err } @@ -2586,7 +2630,7 @@ func (x *arduinoCorePlatformUninstallClient) Recv() (*PlatformUninstallResp, err } func (c *arduinoCoreClient) PlatformUpgrade(ctx context.Context, in *PlatformUpgradeReq, opts ...grpc.CallOption) (ArduinoCore_PlatformUpgradeClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[10], "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[11], "/cc.arduino.cli.commands.ArduinoCore/PlatformUpgrade", opts...) if err != nil { return nil, err } @@ -2618,7 +2662,7 @@ func (x *arduinoCorePlatformUpgradeClient) Recv() (*PlatformUpgradeResp, error) } func (c *arduinoCoreClient) Upload(ctx context.Context, in *UploadReq, opts ...grpc.CallOption) (ArduinoCore_UploadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[11], "/cc.arduino.cli.commands.ArduinoCore/Upload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[12], "/cc.arduino.cli.commands.ArduinoCore/Upload", opts...) if err != nil { return nil, err } @@ -2650,7 +2694,7 @@ func (x *arduinoCoreUploadClient) Recv() (*UploadResp, error) { } func (c *arduinoCoreClient) UploadUsingProgrammer(ctx context.Context, in *UploadUsingProgrammerReq, opts ...grpc.CallOption) (ArduinoCore_UploadUsingProgrammerClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[12], "/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[13], "/cc.arduino.cli.commands.ArduinoCore/UploadUsingProgrammer", opts...) if err != nil { return nil, err } @@ -2691,7 +2735,7 @@ func (c *arduinoCoreClient) ListProgrammersAvailableForUpload(ctx context.Contex } func (c *arduinoCoreClient) BurnBootloader(ctx context.Context, in *BurnBootloaderReq, opts ...grpc.CallOption) (ArduinoCore_BurnBootloaderClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[13], "/cc.arduino.cli.commands.ArduinoCore/BurnBootloader", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[14], "/cc.arduino.cli.commands.ArduinoCore/BurnBootloader", opts...) if err != nil { return nil, err } @@ -2741,7 +2785,7 @@ func (c *arduinoCoreClient) PlatformList(ctx context.Context, in *PlatformListRe } func (c *arduinoCoreClient) LibraryDownload(ctx context.Context, in *LibraryDownloadReq, opts ...grpc.CallOption) (ArduinoCore_LibraryDownloadClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[14], "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[15], "/cc.arduino.cli.commands.ArduinoCore/LibraryDownload", opts...) if err != nil { return nil, err } @@ -2773,7 +2817,7 @@ func (x *arduinoCoreLibraryDownloadClient) Recv() (*LibraryDownloadResp, error) } func (c *arduinoCoreClient) LibraryInstall(ctx context.Context, in *LibraryInstallReq, opts ...grpc.CallOption) (ArduinoCore_LibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[15], "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[16], "/cc.arduino.cli.commands.ArduinoCore/LibraryInstall", opts...) if err != nil { return nil, err } @@ -2805,7 +2849,7 @@ func (x *arduinoCoreLibraryInstallClient) Recv() (*LibraryInstallResp, error) { } func (c *arduinoCoreClient) ZipLibraryInstall(ctx context.Context, in *ZipLibraryInstallReq, opts ...grpc.CallOption) (ArduinoCore_ZipLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[16], "/cc.arduino.cli.commands.ArduinoCore/ZipLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[17], "/cc.arduino.cli.commands.ArduinoCore/ZipLibraryInstall", opts...) if err != nil { return nil, err } @@ -2837,7 +2881,7 @@ func (x *arduinoCoreZipLibraryInstallClient) Recv() (*ZipLibraryInstallResp, err } func (c *arduinoCoreClient) GitLibraryInstall(ctx context.Context, in *GitLibraryInstallReq, opts ...grpc.CallOption) (ArduinoCore_GitLibraryInstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[17], "/cc.arduino.cli.commands.ArduinoCore/GitLibraryInstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[18], "/cc.arduino.cli.commands.ArduinoCore/GitLibraryInstall", opts...) if err != nil { return nil, err } @@ -2869,7 +2913,7 @@ func (x *arduinoCoreGitLibraryInstallClient) Recv() (*GitLibraryInstallResp, err } func (c *arduinoCoreClient) LibraryUninstall(ctx context.Context, in *LibraryUninstallReq, opts ...grpc.CallOption) (ArduinoCore_LibraryUninstallClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[18], "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[19], "/cc.arduino.cli.commands.ArduinoCore/LibraryUninstall", opts...) if err != nil { return nil, err } @@ -2901,7 +2945,7 @@ func (x *arduinoCoreLibraryUninstallClient) Recv() (*LibraryUninstallResp, error } func (c *arduinoCoreClient) LibraryUpgradeAll(ctx context.Context, in *LibraryUpgradeAllReq, opts ...grpc.CallOption) (ArduinoCore_LibraryUpgradeAllClient, error) { - stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[19], "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll", opts...) + stream, err := c.cc.NewStream(ctx, &_ArduinoCore_serviceDesc.Streams[20], "/cc.arduino.cli.commands.ArduinoCore/LibraryUpgradeAll", opts...) if err != nil { return nil, err } @@ -2992,6 +3036,8 @@ type ArduinoCoreServer interface { BoardList(context.Context, *BoardListReq) (*BoardListResp, error) // List all the boards provided by installed platforms. BoardListAll(context.Context, *BoardListAllReq) (*BoardListAllResp, error) + // List boards connection and disconnected events. + BoardListWatch(ArduinoCore_BoardListWatchServer) error // Compile an Arduino sketch. Compile(*CompileReq, ArduinoCore_CompileServer) error // Download and install a platform and its tool dependencies. @@ -3087,6 +3133,9 @@ func (*UnimplementedArduinoCoreServer) BoardList(context.Context, *BoardListReq) func (*UnimplementedArduinoCoreServer) BoardListAll(context.Context, *BoardListAllReq) (*BoardListAllResp, error) { return nil, status.Errorf(codes.Unimplemented, "method BoardListAll not implemented") } +func (*UnimplementedArduinoCoreServer) BoardListWatch(ArduinoCore_BoardListWatchServer) error { + return status.Errorf(codes.Unimplemented, "method BoardListWatch not implemented") +} func (*UnimplementedArduinoCoreServer) Compile(*CompileReq, ArduinoCore_CompileServer) error { return status.Errorf(codes.Unimplemented, "method Compile not implemented") } @@ -3440,6 +3489,32 @@ func _ArduinoCore_BoardListAll_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _ArduinoCore_BoardListWatch_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ArduinoCoreServer).BoardListWatch(&arduinoCoreBoardListWatchServer{stream}) +} + +type ArduinoCore_BoardListWatchServer interface { + Send(*BoardListWatchResp) error + Recv() (*BoardListWatchReq, error) + grpc.ServerStream +} + +type arduinoCoreBoardListWatchServer struct { + grpc.ServerStream +} + +func (x *arduinoCoreBoardListWatchServer) Send(m *BoardListWatchResp) error { + return x.ServerStream.SendMsg(m) +} + +func (x *arduinoCoreBoardListWatchServer) Recv() (*BoardListWatchReq, error) { + m := new(BoardListWatchReq) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _ArduinoCore_Compile_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(CompileReq) if err := stream.RecvMsg(m); err != nil { @@ -3938,6 +4013,12 @@ var _ArduinoCore_serviceDesc = grpc.ServiceDesc{ Handler: _ArduinoCore_BoardAttach_Handler, ServerStreams: true, }, + { + StreamName: "BoardListWatch", + Handler: _ArduinoCore_BoardListWatch_Handler, + ServerStreams: true, + ClientStreams: true, + }, { StreamName: "Compile", Handler: _ArduinoCore_Compile_Handler, diff --git a/rpc/commands/commands.proto b/rpc/commands/commands.proto index 33971735484..6a3b1960395 100644 --- a/rpc/commands/commands.proto +++ b/rpc/commands/commands.proto @@ -80,6 +80,9 @@ service ArduinoCore { // List all the boards provided by installed platforms. rpc BoardListAll(BoardListAllReq) returns (BoardListAllResp); + // List boards connection and disconnected events. + rpc BoardListWatch(stream BoardListWatchReq) returns (stream BoardListWatchResp); + // Compile an Arduino sketch. rpc Compile(CompileReq) returns (stream CompileResp); diff --git a/rpc/commands/common.pb.go b/rpc/commands/common.pb.go index c23bddf056e..6d6629fa077 100644 --- a/rpc/commands/common.pb.go +++ b/rpc/commands/common.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/common.proto package commands diff --git a/rpc/commands/compile.pb.go b/rpc/commands/compile.pb.go index 96962296529..98907ff28cb 100644 --- a/rpc/commands/compile.pb.go +++ b/rpc/commands/compile.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/compile.proto package commands diff --git a/rpc/commands/core.pb.go b/rpc/commands/core.pb.go index 97cc978ca4c..b50430ed524 100644 --- a/rpc/commands/core.pb.go +++ b/rpc/commands/core.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/core.proto package commands diff --git a/rpc/commands/lib.pb.go b/rpc/commands/lib.pb.go index 145210949c4..9384bd3d7c9 100644 --- a/rpc/commands/lib.pb.go +++ b/rpc/commands/lib.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/lib.proto package commands diff --git a/rpc/commands/upload.pb.go b/rpc/commands/upload.pb.go index 83e01c944d6..6dbc72c540d 100644 --- a/rpc/commands/upload.pb.go +++ b/rpc/commands/upload.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: commands/upload.proto package commands diff --git a/rpc/debug/debug.pb.go b/rpc/debug/debug.pb.go index 5abf5c69fbe..30f042c2af2 100644 --- a/rpc/debug/debug.pb.go +++ b/rpc/debug/debug.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: debug/debug.proto package debug diff --git a/rpc/monitor/monitor.pb.go b/rpc/monitor/monitor.pb.go index 07088e92e0f..9ac0cb7da6b 100644 --- a/rpc/monitor/monitor.pb.go +++ b/rpc/monitor/monitor.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: monitor/monitor.proto package monitor diff --git a/rpc/settings/settings.pb.go b/rpc/settings/settings.pb.go index 55ef5a12e1c..a020f54189c 100644 --- a/rpc/settings/settings.pb.go +++ b/rpc/settings/settings.pb.go @@ -16,7 +16,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 -// protoc v3.13.0 +// protoc v3.12.4 // source: settings/settings.proto package settings