diff --git a/.travis.yml b/.travis.yml index b2223c85a..0d74b42f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,9 @@ services: go: - 1.15.x - - tip + - 1.16.x + # TODO enable when 1.15.x is removed + # - tip matrix: fast_finish: true diff --git a/Gopkg.lock b/Gopkg.lock index 42aefa5e3..2b0fc2bcf 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -357,8 +357,8 @@ version = "v3.2.1" [[projects]] - branch = "PMM-2.0" - digest = "1:0b5f100748df73363fa283c3d72a2823614d8fe39903e4beb33043375b9c0d32" + branch = "PMM-5194-tunnels" + digest = "1:779c4c8657488275b306276f6e683c8dc9cda909745cd1f3da1623a7183bf68b" name = "github.com/percona/pmm" packages = [ "api/agentlocalpb", @@ -386,7 +386,7 @@ "version", ] pruneopts = "NUT" - revision = "baf33d36ecf1651f70c0acae1be11c61d3f30b2c" + revision = "4a47e69663fbf943789a2168b24d3f6f3c870cb2" [[projects]] digest = "1:4047c378584616813d610c9f993bf90dd0d07aed8d94bd3bc299cd35ececdcba" @@ -564,7 +564,7 @@ [[projects]] branch = "master" - digest = "1:22f1b75bab1d3e83419f99dd355afcdfc727fbc3e16cc472718e9f41e907c7e1" + digest = "1:b85b902a0b12019b731f79fbded81cf1a5ddae396f01abcb57b879f7c040c4a4" name = "golang.org/x/net" packages = [ "http/httpguts", @@ -572,6 +572,7 @@ "http2/hpack", "idna", "internal/timeseries", + "nettest", "trace", ] pruneopts = "NUT" @@ -837,6 +838,7 @@ "github.com/lfittl/pg_query_go", "github.com/lfittl/pg_query_go/nodes", "github.com/lib/pq", + "github.com/mwitkow/go-proto-validators", "github.com/percona/exporter_shared/helpers", "github.com/percona/go-mysql/event", "github.com/percona/go-mysql/log", @@ -871,9 +873,11 @@ "go.mongodb.org/mongo-driver/mongo/options", "go.mongodb.org/mongo-driver/mongo/readpref", "go.mongodb.org/mongo-driver/x/mongo/driver/connstring", + "golang.org/x/net/nettest", "golang.org/x/perf/cmd/benchstat", "golang.org/x/sys/unix", "golang.org/x/tools/cmd/goimports", + "google.golang.org/genproto/googleapis/rpc/status", "google.golang.org/grpc", "google.golang.org/grpc/channelz/service", "google.golang.org/grpc/codes", diff --git a/Gopkg.toml b/Gopkg.toml index 1ad362cc2..558d8d990 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -26,7 +26,8 @@ required = [ [[constraint]] name = "github.com/percona/pmm" - branch = "PMM-2.0" + # branch = "PMM-2.0" + branch = "PMM-5194-tunnels" [[constraint]] name = "github.com/percona/go-mysql" diff --git a/actions/concurrent_runner.go b/actions/concurrent_runner.go index bda829876..40d7e978c 100644 --- a/actions/concurrent_runner.go +++ b/actions/concurrent_runner.go @@ -84,6 +84,7 @@ func (r *ConcurrentRunner) Start(a Action, timeout time.Duration) { // 5. Add panics with "sync: WaitGroup misuse: Add called concurrently with Wait" // See skipped test (run it in a loop with race detector). // https://jira.percona.com/browse/PMM-4112 + // https://jira.percona.com/browse/PMM-7206 r.runningActions.Add(1) actionID, actionType := a.ID(), a.Type() diff --git a/agentlocal/agent_local.go b/agentlocal/agent_local.go index a630d8ff1..ba86a98a1 100644 --- a/agentlocal/agent_local.go +++ b/agentlocal/agent_local.go @@ -35,7 +35,6 @@ import ( "github.com/percona/pmm/api/agentlocalpb" "github.com/percona/pmm/api/agentpb" "github.com/percona/pmm/version" - "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/sirupsen/logrus" @@ -52,13 +51,11 @@ const ( shutdownTimeout = 1 * time.Second ) -// ErrReload is returned from Service.Run after request to reload configuration. -var ErrReload = errors.New("reload") - // Server represents local pmm-agent API server. type Server struct { cfg *config.Config supervisor supervisor + registry registry client client configFilepath string @@ -70,10 +67,11 @@ type Server struct { // NewServer creates new server. // // Caller should call Run. -func NewServer(cfg *config.Config, supervisor supervisor, client client, configFilepath string) *Server { +func NewServer(cfg *config.Config, supervisor supervisor, registry registry, client client, configFilepath string) *Server { return &Server{ cfg: cfg, supervisor: supervisor, + registry: registry, client: client, configFilepath: configFilepath, l: logrus.WithField("component", "local-server"), @@ -84,8 +82,7 @@ func NewServer(cfg *config.Config, supervisor supervisor, client client, configF // Run runs gRPC and JSON servers with API and debug endpoints until ctx is canceled. // // Run exits when ctx is canceled, or when a request to reload configuration is received. -// In the latter case, the returned error is ErrReload. -func (s *Server) Run(ctx context.Context) error { +func (s *Server) Run(ctx context.Context) { defer s.l.Info("Done.") serverCtx, serverCancel := context.WithCancel(ctx) @@ -109,16 +106,12 @@ func (s *Server) Run(ctx context.Context) error { s.runJSONServer(serverCtx, l.Addr().String()) }() - var res error select { case <-ctx.Done(): - res = ctx.Err() case <-s.reload: - res = ErrReload } serverCancel() wg.Wait() - return res } // Status returns current pmm-agent status. @@ -151,6 +144,7 @@ func (s *Server) Status(ctx context.Context, req *agentlocalpb.StatusRequest) (* } agentsInfo := s.supervisor.AgentsList() + tunnelsInfo := s.registry.TunnelsList() return &agentlocalpb.StatusResponse{ AgentId: s.cfg.ID, @@ -159,6 +153,7 @@ func (s *Server) Status(ctx context.Context, req *agentlocalpb.StatusRequest) (* AgentsInfo: agentsInfo, ConfigFilepath: s.configFilepath, AgentVersion: version.Version, + TunnelsInfo: tunnelsInfo, }, nil } diff --git a/agentlocal/agent_local_test.go b/agentlocal/agent_local_test.go index af41d2c38..f2937e681 100644 --- a/agentlocal/agent_local_test.go +++ b/agentlocal/agent_local_test.go @@ -30,38 +30,53 @@ import ( "github.com/percona/pmm-agent/config" ) -func TestServerStatus(t *testing.T) { - setup := func(t *testing.T) ([]*agentlocalpb.AgentInfo, *mockSupervisor, *mockClient, *config.Config) { - agentInfo := []*agentlocalpb.AgentInfo{{ - AgentId: "/agent_id/00000000-0000-4000-8000-000000000002", - AgentType: inventorypb.AgentType_NODE_EXPORTER, - Status: inventorypb.AgentStatus_RUNNING, - }} - supervisor := new(mockSupervisor) - supervisor.Test(t) - supervisor.On("AgentsList").Return(agentInfo) - client := new(mockClient) - client.Test(t) - client.On("GetServerConnectMetadata").Return(&agentpb.ServerConnectMetadata{ - AgentRunsOnNodeID: "/node_id/00000000-0000-4000-8000-000000000003", - ServerVersion: "2.0.0-dev", - }) - cfg := &config.Config{ - ID: "/agent_id/00000000-0000-4000-8000-000000000001", - Server: config.Server{ - Address: "127.0.0.1:8443", - Username: "username", - Password: "password", - }, - } - return agentInfo, supervisor, client, cfg +func setup(t *testing.T) ([]*agentlocalpb.AgentInfo, []*agentlocalpb.TunnelInfo, *mockSupervisor, *mockRegistry, *mockClient, *config.Config) { + t.Helper() + + agentInfo := []*agentlocalpb.AgentInfo{{ + AgentId: "/agent_id/00000000-0000-4000-8000-000000000002", + AgentType: inventorypb.AgentType_NODE_EXPORTER, + Status: inventorypb.AgentStatus_RUNNING, + }} + supervisor := new(mockSupervisor) + supervisor.Test(t) + supervisor.On("AgentsList").Return(agentInfo) + t.Cleanup(func() { supervisor.AssertExpectations(t) }) + + tunnelInfo := []*agentlocalpb.TunnelInfo{} + registry := new(mockRegistry) + registry.Test(t) + registry.On("TunnelsList").Return(tunnelInfo) + t.Cleanup(func() { registry.AssertExpectations(t) }) + + client := new(mockClient) + client.Test(t) + client.On("GetServerConnectMetadata").Return(&agentpb.ServerConnectMetadata{ + AgentRunsOnNodeID: "/node_id/00000000-0000-4000-8000-000000000003", + ServerVersion: "2.0.0-dev", + }) + t.Cleanup(func() { client.AssertExpectations(t) }) + + cfg := &config.Config{ + ID: "/agent_id/00000000-0000-4000-8000-000000000001", + Server: config.Server{ + Address: "127.0.0.1:8443", + Username: "username", + Password: "password", + }, } + return agentInfo, tunnelInfo, supervisor, registry, client, cfg +} + +func TestServerStatus(t *testing.T) { + t.Parallel() + t.Run("without network info", func(t *testing.T) { - agentInfo, supervisor, client, cfg := setup(t) - defer supervisor.AssertExpectations(t) - defer client.AssertExpectations(t) - s := NewServer(cfg, supervisor, client, "/some/dir/pmm-agent.yaml") + t.Parallel() + + agentInfo, tunnelInfo, supervisor, registry, client, cfg := setup(t) + s := NewServer(cfg, supervisor, registry, client, "/some/dir/pmm-agent.yaml") // without network info actual, err := s.Status(context.Background(), &agentlocalpb.StatusRequest{GetNetworkInfo: false}) @@ -76,18 +91,19 @@ func TestServerStatus(t *testing.T) { }, AgentsInfo: agentInfo, ConfigFilepath: "/some/dir/pmm-agent.yaml", + TunnelsInfo: tunnelInfo, } assert.Equal(t, expected, actual) }) t.Run("with network info", func(t *testing.T) { - agentInfo, supervisor, client, cfg := setup(t) + t.Parallel() + + agentInfo, tunnelInfo, supervisor, registry, client, cfg := setup(t) latency := 5 * time.Millisecond clockDrift := time.Second client.On("GetNetworkInformation").Return(latency, clockDrift, nil) - defer supervisor.AssertExpectations(t) - defer client.AssertExpectations(t) - s := NewServer(cfg, supervisor, client, "/some/dir/pmm-agent.yaml") + s := NewServer(cfg, supervisor, registry, client, "/some/dir/pmm-agent.yaml") // with network info actual, err := s.Status(context.Background(), &agentlocalpb.StatusRequest{GetNetworkInfo: true}) @@ -104,6 +120,7 @@ func TestServerStatus(t *testing.T) { }, AgentsInfo: agentInfo, ConfigFilepath: "/some/dir/pmm-agent.yaml", + TunnelsInfo: tunnelInfo, } assert.Equal(t, expected, actual) }) diff --git a/agentlocal/deps.go b/agentlocal/deps.go index 3cc9aabcc..9835ca803 100644 --- a/agentlocal/deps.go +++ b/agentlocal/deps.go @@ -24,6 +24,7 @@ import ( ) //go:generate mockery -name=client -case=snake -inpkg -testonly +//go:generate mockery -name=registry -case=snake -inpkg -testonly //go:generate mockery -name=supervisor -case=snake -inpkg -testonly // client is a subset of methods of client.Client used by this package. @@ -35,6 +36,12 @@ type client interface { GetNetworkInformation() (latency, clockDrift time.Duration, err error) } +// registry is a subset of methods of tunnels.Registry used by this package. +// We use it instead of real type for testing and to avoid dependency cycle. +type registry interface { + TunnelsList() []*agentlocalpb.TunnelInfo +} + // supervisor is a subset of methods of supervisor.Supervisor used by this package. // We use it instead of real type for testing and to avoid dependency cycle. type supervisor interface { diff --git a/agentlocal/mock_registry_test.go b/agentlocal/mock_registry_test.go new file mode 100644 index 000000000..ab852e22d --- /dev/null +++ b/agentlocal/mock_registry_test.go @@ -0,0 +1,29 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package agentlocal + +import ( + agentlocalpb "github.com/percona/pmm/api/agentlocalpb" + mock "github.com/stretchr/testify/mock" +) + +// mockRegistry is an autogenerated mock type for the registry type +type mockRegistry struct { + mock.Mock +} + +// TunnelsList provides a mock function with given fields: +func (_m *mockRegistry) TunnelsList() []*agentlocalpb.TunnelInfo { + ret := _m.Called() + + var r0 []*agentlocalpb.TunnelInfo + if rf, ok := ret.Get(0).(func() []*agentlocalpb.TunnelInfo); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*agentlocalpb.TunnelInfo) + } + } + + return r0 +} diff --git a/client/channel/channel.go b/client/channel/channel.go index b8665b16a..38e2d33fd 100644 --- a/client/channel/channel.go +++ b/client/channel/channel.go @@ -53,6 +53,9 @@ type AgentResponse struct { // Channel encapsulates two-way communication channel between pmm-managed and pmm-agent. // +// pmm-agent establishes a single gRPC connection with pmm-managed +// and then starts a single gRPC bidirectional stream, which is represented by this type. +// // All exported methods are thread-safe. type Channel struct { //nolint:maligned s agentpb.Agent_ConnectClient @@ -73,7 +76,7 @@ type Channel struct { //nolint:maligned closeErr error } -// New creates new two-way communication channel with given stream. +// New creates new two-way communication channel with given gRPC bidirectional stream. // // Stream should not be used by the caller after channel is created. func New(stream agentpb.Agent_ConnectClient) *Channel { @@ -137,7 +140,7 @@ func (c *Channel) Requests() <-chan *ServerRequest { return c.requests } -// SendResponse sends message to pmm-managed. It is no-op once channel is closed (see Wait). +// SendResponse sends response to pmm-managed. It is no-op once channel is closed (see Wait). func (c *Channel) SendResponse(resp *AgentResponse) { msg := &agentpb.AgentMessage{ Id: resp.ID, @@ -235,6 +238,11 @@ func (c *Channel) runReceiver() { ID: msg.Id, Payload: p.CheckConnection, } + case *agentpb.ServerMessage_TunnelData: + c.requests <- &ServerRequest{ + ID: msg.Id, + Payload: p.TunnelData, + } // responses case *agentpb.ServerMessage_Pong: @@ -245,6 +253,8 @@ func (c *Channel) runReceiver() { c.publish(msg.Id, p.QanCollect) case *agentpb.ServerMessage_ActionResult: c.publish(msg.Id, p.ActionResult) + case *agentpb.ServerMessage_TunnelDataAck: + c.publish(msg.Id, p.TunnelDataAck) case nil: c.close(errors.Errorf("failed to handle received message %s", msg)) diff --git a/client/client.go b/client/client.go index c24fd57e4..5661057c6 100644 --- a/client/client.go +++ b/client/client.go @@ -26,6 +26,7 @@ import ( "time" "github.com/golang/protobuf/ptypes" + validator "github.com/mwitkow/go-proto-validators" "github.com/percona/pmm/api/agentpb" "github.com/percona/pmm/utils/tlsconfig" "github.com/percona/pmm/version" @@ -36,7 +37,7 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/status" - "github.com/percona/pmm-agent/actions" + "github.com/percona/pmm-agent/actions" // TODO https://jira.percona.com/browse/PMM-7206 "github.com/percona/pmm-agent/client/channel" "github.com/percona/pmm-agent/config" "github.com/percona/pmm-agent/utils/backoff" @@ -55,6 +56,7 @@ type Client struct { cfg *config.Config supervisor supervisor connectionChecker connectionChecker + registry registry l *logrus.Entry backoff *backoff.Backoff @@ -73,11 +75,12 @@ type Client struct { // New creates new client. // // Caller should call Run. -func New(cfg *config.Config, supervisor supervisor, connectionChecker connectionChecker) *Client { +func New(cfg *config.Config, supervisor supervisor, connectionChecker connectionChecker, registry registry) *Client { return &Client{ cfg: cfg, supervisor: supervisor, connectionChecker: connectionChecker, + registry: registry, l: logrus.WithField("component", "client"), backoff: backoff.New(backoffMinDelay, backoffMaxDelay), done: make(chan struct{}), @@ -181,7 +184,7 @@ func (c *Client) Run(ctx context.Context) error { oneDone <- struct{}{} }() go func() { - c.processChannelRequests() + c.processChannelRequests(ctx) oneDone <- struct{}{} }() <-oneDone @@ -246,8 +249,16 @@ func (c *Client) processSupervisorRequests() { wg.Wait() } -func (c *Client) processChannelRequests() { +func (c *Client) processChannelRequests(ctx context.Context) { for req := range c.channel.Requests() { + if p, _ := req.Payload.(validator.Validator); p != nil { + if err := p.Validate(); err != nil { + // Requests() is not closed, so exit early to break channel + c.l.Errorf("Unhandled server request validation error: %v\n%s.", req, err) + return + } + } + var responsePayload agentpb.AgentResponsePayload switch p := req.Payload.(type) { case *agentpb.Ping: @@ -257,6 +268,7 @@ func (c *Client) processChannelRequests() { case *agentpb.SetStateRequest: c.supervisor.SetState(p) + c.registry.SetState(p.Tunnels) responsePayload = new(agentpb.SetStateResponse) case *agentpb.StartActionRequest: @@ -345,7 +357,14 @@ func (c *Client) processChannelRequests() { responsePayload = new(agentpb.StopActionResponse) case *agentpb.CheckConnectionRequest: - responsePayload = c.connectionChecker.Check(p, req.ID) + responsePayload = c.connectionChecker.Check(ctx, p, req.ID) + + case *agentpb.TunnelData: + // TODO + + responsePayload = &agentpb.TunnelDataAck{ + // TODO + } case nil: // Requests() is not closed, so exit early to break channel @@ -353,6 +372,14 @@ func (c *Client) processChannelRequests() { return } + if p, _ := responsePayload.(validator.Validator); p != nil { + if err := p.Validate(); err != nil { + // Requests() is not closed, so exit early to break channel + c.l.Errorf("Unhandled response validation error: %v\n%s.", p, err) + return + } + } + c.channel.SendResponse(&channel.AgentResponse{ ID: req.ID, Payload: responsePayload, diff --git a/client/client_test.go b/client/client_test.go index 86650b675..e7ec4db33 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -75,7 +75,7 @@ func TestClient(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) cfg := &config.Config{} - client := New(cfg, nil, nil) + client := New(cfg, nil, nil, nil) cancel() err := client.Run(ctx) assert.EqualError(t, err, "missing PMM Server address: context canceled") @@ -90,7 +90,7 @@ func TestClient(t *testing.T) { Address: "127.0.0.1:1", }, } - client := New(cfg, nil, nil) + client := New(cfg, nil, nil, nil) cancel() err := client.Run(ctx) assert.EqualError(t, err, "missing Agent ID: context canceled") @@ -107,7 +107,7 @@ func TestClient(t *testing.T) { Address: "127.0.0.1:1", }, } - client := New(cfg, nil, nil) + client := New(cfg, nil, nil, nil) err := client.Run(ctx) assert.EqualError(t, err, "failed to dial: context deadline exceeded") }) @@ -150,12 +150,21 @@ func TestClient(t *testing.T) { } s := new(mockSupervisor) - s.On("Changes").Return(make(<-chan *agentpb.StateChangedRequest)) - s.On("QANRequests").Return(make(<-chan *agentpb.QANCollectRequest)) - - client := New(cfg, s, nil) - err := client.Run(context.Background()) + changes := make(chan *agentpb.StateChangedRequest) + qanRequests := make(chan *agentpb.QANCollectRequest) + s.On("Changes").Return((<-chan *agentpb.StateChangedRequest)(changes)) + s.On("QANRequests").Return((<-chan *agentpb.QANCollectRequest)(qanRequests)) + defer s.AssertExpectations(t) + + ctx, cancel := context.WithCancel(context.Background()) + client := New(cfg, s, nil, nil) + err := client.Run(ctx) // returns because connection is terminated assert.NoError(t, err) + close(changes) + close(qanRequests) + cancel() + <-client.Done() + assert.Equal(t, serverMD, client.GetServerConnectMetadata()) }) @@ -181,7 +190,7 @@ func TestClient(t *testing.T) { }, } - client := New(cfg, nil, nil) + client := New(cfg, nil, nil, nil) client.dialTimeout = 100 * time.Millisecond err := client.Run(ctx) assert.EqualError(t, err, "failed to get server metadata: rpc error: code = Canceled desc = context canceled", "%+v", err) @@ -209,7 +218,7 @@ func TestGetActionTimeout(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(proto.CompactTextString(tc.req), func(t *testing.T) { - client := New(nil, nil, nil) + client := New(nil, nil, nil, nil) actual := client.getActionTimeout(tc.req) assert.Equal(t, tc.expected, actual) }) diff --git a/client/deps.go b/client/deps.go index fe7ad8ff9..81bbda984 100644 --- a/client/deps.go +++ b/client/deps.go @@ -16,16 +16,27 @@ package client import ( + "context" + "github.com/percona/pmm/api/agentpb" + spb "google.golang.org/genproto/googleapis/rpc/status" ) //go:generate mockery -name=connectionChecker -case=snake -inpkg -testonly +//go:generate mockery -name=registry -case=snake -inpkg -testonly //go:generate mockery -name=supervisor -case=snake -inpkg -testonly // connectionChecker is a subset of methods of connectionchecker.ConnectionChecker used by this package. // We use it instead of real type for testing and to avoid dependency cycle. type connectionChecker interface { - Check(req *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse + Check(ctx context.Context, req *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse +} + +// registry is a subset of methods of tunnels.Registry used by this package. +// We use it instead of real type for testing and to avoid dependency cycle. +type registry interface { + SetState(tunnels map[string]*agentpb.SetStateRequest_Tunnel) map[string]*spb.Status + Write(ctx context.Context, data *agentpb.TunnelData) *agentpb.TunnelDataAck } // supervisor is a subset of methods of supervisor.Supervisor used by this package. diff --git a/client/mock_connection_checker_test.go b/client/mock_connection_checker_test.go index 805e5ab76..c807311be 100644 --- a/client/mock_connection_checker_test.go +++ b/client/mock_connection_checker_test.go @@ -3,7 +3,10 @@ package client import ( + context "context" + agentpb "github.com/percona/pmm/api/agentpb" + mock "github.com/stretchr/testify/mock" ) @@ -12,13 +15,13 @@ type mockConnectionChecker struct { mock.Mock } -// Check provides a mock function with given fields: req, id -func (_m *mockConnectionChecker) Check(req *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse { - ret := _m.Called(req, id) +// Check provides a mock function with given fields: ctx, req, id +func (_m *mockConnectionChecker) Check(ctx context.Context, req *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse { + ret := _m.Called(ctx, req, id) var r0 *agentpb.CheckConnectionResponse - if rf, ok := ret.Get(0).(func(*agentpb.CheckConnectionRequest, uint32) *agentpb.CheckConnectionResponse); ok { - r0 = rf(req, id) + if rf, ok := ret.Get(0).(func(context.Context, *agentpb.CheckConnectionRequest, uint32) *agentpb.CheckConnectionResponse); ok { + r0 = rf(ctx, req, id) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*agentpb.CheckConnectionResponse) diff --git a/client/mock_registry_test.go b/client/mock_registry_test.go new file mode 100644 index 000000000..3a28a6469 --- /dev/null +++ b/client/mock_registry_test.go @@ -0,0 +1,50 @@ +// Code generated by mockery v1.0.0. DO NOT EDIT. + +package client + +import ( + context "context" + + agentpb "github.com/percona/pmm/api/agentpb" + + mock "github.com/stretchr/testify/mock" + + status "google.golang.org/genproto/googleapis/rpc/status" +) + +// mockRegistry is an autogenerated mock type for the registry type +type mockRegistry struct { + mock.Mock +} + +// SetState provides a mock function with given fields: tunnels +func (_m *mockRegistry) SetState(tunnels map[string]*agentpb.SetStateRequest_Tunnel) map[string]*status.Status { + ret := _m.Called(tunnels) + + var r0 map[string]*status.Status + if rf, ok := ret.Get(0).(func(map[string]*agentpb.SetStateRequest_Tunnel) map[string]*status.Status); ok { + r0 = rf(tunnels) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]*status.Status) + } + } + + return r0 +} + +// Write provides a mock function with given fields: ctx, data +func (_m *mockRegistry) Write(ctx context.Context, data *agentpb.TunnelData) *agentpb.TunnelDataAck { + ret := _m.Called(ctx, data) + + var r0 *agentpb.TunnelDataAck + if rf, ok := ret.Get(0).(func(context.Context, *agentpb.TunnelData) *agentpb.TunnelDataAck); ok { + r0 = rf(ctx, data) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*agentpb.TunnelDataAck) + } + } + + return r0 +} diff --git a/commands/run.go b/commands/run.go index 69de2d6e5..b31421b6d 100644 --- a/commands/run.go +++ b/commands/run.go @@ -28,12 +28,13 @@ import ( "github.com/percona/pmm-agent/client" "github.com/percona/pmm-agent/config" "github.com/percona/pmm-agent/connectionchecker" + "github.com/percona/pmm-agent/tunnels" ) // Run implements `pmm-agent run` default command. func Run() { l := logrus.WithField("component", "main") - appCtx, appCancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) defer l.Info("Done.") // handle termination signals @@ -43,10 +44,10 @@ func Run() { s := <-signals signal.Stop(signals) l.Warnf("Got %s, shutting down...", unix.SignalName(s.(unix.Signal))) - appCancel() + cancel() }() - for appCtx.Err() == nil { + for { cfg, configFilepath, err := config.Get(l) if err != nil { l.Fatalf("Failed to load configuration: %s.", err) @@ -54,25 +55,37 @@ func Run() { config.ConfigureLogger(cfg) l.Debugf("Loaded configuration: %+v", cfg) - for appCtx.Err() == nil { - ctx, cancel := context.WithCancel(appCtx) - supervisor := supervisor.NewSupervisor(ctx, &cfg.Paths, &cfg.Ports, &cfg.Server) - connectionChecker := connectionchecker.New(ctx, &cfg.Paths) - client := client.New(cfg, supervisor, connectionChecker) - localServer := agentlocal.NewServer(cfg, supervisor, client, configFilepath) + run(ctx, cfg, configFilepath) - go func() { - _ = client.Run(ctx) - cancel() - }() - - err = localServer.Run(ctx) - cancel() - - <-client.Done() - if err == agentlocal.ErrReload { - break - } + if ctx.Err() != nil { + return } } } + +// run runs all pmm-agent components with given configuration until ctx is cancellled. +// See documentation for NewXXX, Run, and Done +func run(ctx context.Context, cfg *config.Config, configFilepath string) { + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + + // Actions runner is currently created inside client.New. + // It should be created separately. + // TODO https://jira.percona.com/browse/PMM-7206 + + supervisor := supervisor.NewSupervisor(ctx, &cfg.Paths, &cfg.Ports, &cfg.Server) + connectionChecker := connectionchecker.New(&cfg.Paths) + registry := tunnels.NewRegistry(ctx) + client := client.New(cfg, supervisor, connectionChecker, registry) + localServer := agentlocal.NewServer(cfg, supervisor, registry, client, configFilepath) + + go func() { + _ = client.Run(ctx) + cancel() + }() + + localServer.Run(ctx) + cancel() + + <-client.Done() +} diff --git a/connectionchecker/connection_checker.go b/connectionchecker/connection_checker.go index 6ed67407f..d81ea28b9 100644 --- a/connectionchecker/connection_checker.go +++ b/connectionchecker/connection_checker.go @@ -42,23 +42,20 @@ import ( // ConnectionChecker is a struct to check connection to services. type ConnectionChecker struct { - ctx context.Context l *logrus.Entry paths *config.Paths } // New creates new ConnectionChecker. -func New(ctx context.Context, paths *config.Paths) *ConnectionChecker { +func New(paths *config.Paths) *ConnectionChecker { return &ConnectionChecker{ - ctx: ctx, l: logrus.WithField("component", "connectionchecker"), paths: paths, } } // Check checks connection to a service. It returns context cancelation/timeout or driver errors as is. -func (cc *ConnectionChecker) Check(msg *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse { - ctx := cc.ctx +func (cc *ConnectionChecker) Check(ctx context.Context, msg *agentpb.CheckConnectionRequest, id uint32) *agentpb.CheckConnectionResponse { timeout, _ := ptypes.Duration(msg.Timeout) if timeout > 0 { var cancel context.CancelFunc diff --git a/connectionchecker/connection_checker_test.go b/connectionchecker/connection_checker_test.go index 58375f769..65097034c 100644 --- a/connectionchecker/connection_checker_test.go +++ b/connectionchecker/connection_checker_test.go @@ -181,10 +181,10 @@ func TestConnectionChecker(t *testing.T) { temp, err := ioutil.TempDir("", "pmm-agent-") require.NoError(t, err) - c := New(context.Background(), &config.Paths{ + c := New(&config.Paths{ TempDir: temp, }) - resp := c.Check(tt.req, 0) + resp := c.Check(context.Background(), tt.req, 0) require.NotNil(t, resp) if tt.expectedErr == "" { assert.Empty(t, resp.Error) @@ -199,10 +199,10 @@ func TestConnectionChecker(t *testing.T) { temp, err := ioutil.TempDir("", "pmm-agent-") require.NoError(t, err) - c := New(context.Background(), &config.Paths{ + c := New(&config.Paths{ TempDir: temp, }) - resp := c.Check(&agentpb.CheckConnectionRequest{ + resp := c.Check(context.Background(), &agentpb.CheckConnectionRequest{ Dsn: "root:root-password@tcp(127.0.0.1:3306)/?clientFoundRows=true&parseTime=true&timeout=1s", Type: inventorypb.ServiceType_MYSQL_SERVICE, }, 0) @@ -215,10 +215,10 @@ func TestConnectionChecker(t *testing.T) { temp, err := ioutil.TempDir("", "pmm-agent-") require.NoError(t, err) - c := New(context.Background(), &config.Paths{ + c := New(&config.Paths{ TempDir: temp, }) - resp := c.Check(&agentpb.CheckConnectionRequest{ + resp := c.Check(context.Background(), &agentpb.CheckConnectionRequest{ Dsn: mongoDBDSNWithSSL, Type: inventorypb.ServiceType_MONGODB_SERVICE, Timeout: ptypes.DurationProto(30 * time.Second), diff --git a/main_test.go b/main_test.go index 8466e7f4a..ae6bf78b4 100644 --- a/main_test.go +++ b/main_test.go @@ -84,7 +84,8 @@ func TestImports(t *testing.T) { // those packages should be independent from each other packs := []string{ - // TODO "github.com/percona/pmm-agent/actions", + // TODO https://jira.percona.com/browse/PMM-7206 + // "github.com/percona/pmm-agent/actions", "github.com/percona/pmm-agent/agentlocal", "github.com/percona/pmm-agent/agents/supervisor", diff --git a/packages.dot b/packages.dot index 97b0c6898..22a0cffac 100644 --- a/packages.dot +++ b/packages.dot @@ -27,5 +27,6 @@ digraph packages { "/commands" -> "/client"; "/commands" -> "/config"; "/commands" -> "/connectionchecker"; + "/commands" -> "/tunnels"; "/connectionchecker" -> "/config"; } diff --git a/tunnels/conn/conn.go b/tunnels/conn/conn.go new file mode 100644 index 000000000..fe6d5a6e5 --- /dev/null +++ b/tunnels/conn/conn.go @@ -0,0 +1,264 @@ +// pmm-agent +// Copyright 2019 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package conn provides an asynchronous adapter for TCP connection. +package conn + +import ( + "context" + "fmt" + "net" + "sync" + "sync/atomic" + "time" + + "github.com/sirupsen/logrus" +) + +const ( + readCap = 42 + writeCap = 77 + readBuffer = 9 * 1024 + setNoDelay = true + setKeepAlivePeriod = 10 * time.Second + setLinger = -1 + setReadBuffer = 7 * 1024 + setWriteBuffer = 13 * 1024 +) + +type Conn struct { + tcp *net.TCPConn + l *logrus.Entry + + read chan []byte + write chan []byte + ignoreWrites chan struct{} + writeOnce sync.Once + done chan struct{} + + readBytesTotal uint64 + wroteBytesTotal uint64 +} + +type Metrics struct { + ReadBytesTotal uint64 + WroteBytesTotal uint64 + ReadChanLen, ReadChanCap int + WriteChanLen, WriteChanCap int +} + +func NewConn(tcp *net.TCPConn, l *logrus.Entry) *Conn { + l = l.WithField("local", tcp.LocalAddr().String()) + l = l.WithField("remote", tcp.RemoteAddr().String()) + + // set socket options, log warnings on errors + for _, f := range []func() error{ + func() error { return tcp.SetNoDelay(setNoDelay) }, + func() error { return tcp.SetLinger(setLinger) }, + func() error { + if setReadBuffer <= 0 { + return nil + } + return tcp.SetReadBuffer(setReadBuffer) + }, + func() error { + if setWriteBuffer <= 0 { + return nil + } + return tcp.SetWriteBuffer(setWriteBuffer) + }, + func() error { + if setKeepAlivePeriod <= 0 { + return tcp.SetKeepAlive(false) + } + if err := tcp.SetKeepAlive(true); err != nil { + return err //nolint:wrapcheck + } + return tcp.SetKeepAlivePeriod(setKeepAlivePeriod) + }, + } { + if err := f(); err != nil { + l.Warn(err) + } + } + + return &Conn{ + tcp: tcp, + l: l, + read: make(chan []byte, readCap), + write: make(chan []byte, writeCap), + ignoreWrites: make(chan struct{}), + done: make(chan struct{}), + } +} + +func (c *Conn) Done() <-chan struct{} { + return c.done +} + +func (c *Conn) Data() <-chan []byte { + return c.read +} + +func (c *Conn) Write(b []byte) error { + if len(b) == 0 { + return nil + } + + select { + case <-c.ignoreWrites: + return fmt.Errorf("ignoreWrites") + default: + } + + c.write <- b + return nil +} + +func (c *Conn) CloseWrite() { + c.writeOnce.Do(func() { + close(c.ignoreWrites) + }) +} + +func (c *Conn) Metrics() *Metrics { + return &Metrics{ + ReadBytesTotal: atomic.LoadUint64(&c.readBytesTotal), + WroteBytesTotal: atomic.LoadUint64(&c.wroteBytesTotal), + ReadChanLen: len(c.read), + ReadChanCap: cap(c.read), + WriteChanLen: len(c.write), + WriteChanCap: cap(c.write), + } +} + +// Run runs reader and writer until ctx is done or underlying connection is fully closed. +func (c *Conn) Run(ctx context.Context) { + var wg sync.WaitGroup + + readerDone := make(chan struct{}) + wg.Add(1) + go func() { + c.runReader() + c.l.Debugf("runReader done, closing read channel") + close(c.read) + close(readerDone) + wg.Done() + }() + + writerDone := make(chan struct{}) + wg.Add(1) + go func() { + c.runWriter() + c.l.Debugf("runWriter done, closing TCP connection's write side") + _ = c.tcp.CloseWrite() + close(writerDone) + wg.Done() + }() + + var cancel context.CancelFunc + ctx, cancel = context.WithCancel(ctx) + wg.Add(1) + go func() { + <-ctx.Done() + c.l.Debugf("ctx done, closing TCP connection") + _ = c.tcp.Close() + wg.Done() + }() + + <-writerDone + c.CloseWrite() + + // drain write channel to unblock Write callers + for { + select { + case <-c.write: + continue + default: + } + break + } + + <-readerDone + cancel() + wg.Wait() + close(c.done) +} + +// runReader reads data from the TCP connection and sends it to the read channel. +// It exits on read error (when connection is closed, for example). +func (c *Conn) runReader() { + // runReader does not accept ctx to have only one way to stop it. + + for { + // time.Sleep(25 * time.Millisecond) + + b := make([]byte, readBuffer) + n, err := c.tcp.Read(b) + atomic.AddUint64(&c.readBytesTotal, uint64(n)) + + log := c.l.Tracef + if err != nil { + log = c.l.Debugf + } + log("runReader: read %d/%d bytes; channel %d/%d; %v", n, len(b), len(c.read), cap(c.read), err) + + if n > 0 { + c.read <- b[:n] + } + if err != nil { + return + } + } +} + +// runWriter reads data from the write channel and writes it to the TCP connection. +// It exits on write error (when connection is closed, for example). +func (c *Conn) runWriter() { + // runWriter does not accept ctx to have only one way to stop it. + + for { + select { + case b := <-c.write: + if err := c.realWrite(b); err != nil { + return + } + continue + default: + } + + select { + case <-c.ignoreWrites: + return + case b := <-c.write: + if err := c.realWrite(b); err != nil { + return + } + } + } +} + +func (c *Conn) realWrite(b []byte) error { + n, err := c.tcp.Write(b) + atomic.AddUint64(&c.wroteBytesTotal, uint64(n)) + + log := c.l.Tracef + if err != nil { + log = c.l.Debugf + } + log("runWriter: wrote %d/%d bytes; channel %d/%d; %v", n, len(b), len(c.write), cap(c.write), err) + + return err +} diff --git a/tunnels/conn/conn_test.go b/tunnels/conn/conn_test.go new file mode 100644 index 000000000..803583da0 --- /dev/null +++ b/tunnels/conn/conn_test.go @@ -0,0 +1,161 @@ +// pmm-agent +// Copyright 2019 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package conn + +import ( + "context" + "math/rand" + "net" + "sync" + "testing" + "time" + + "github.com/sirupsen/logrus" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "golang.org/x/net/nettest" +) + +type testWriter struct { + t *testing.T +} + +func (tw *testWriter) Write(b []byte) (int, error) { + tw.t.Logf("%s", b) + return len(b), nil +} + +// pipe returns two connections that acts like a pipe: reads on one end are matched with writes on the other. +// Unlike net.Pipe(), the returned connections are real TCP connections - they have buffers, etc. +func pipe() (net.Conn, net.Conn, error) { + l, err0 := net.Listen("tcp", "127.0.0.1:0") + if err0 != nil { + return nil, nil, err0 + } + defer l.Close() + + var c1 net.Conn + var err1 error + accepted := make(chan struct{}) + go func() { + c1, err1 = l.Accept() + close(accepted) + }() + + c2, err2 := net.Dial("tcp", l.Addr().String()) + if err2 != nil { + return nil, nil, err2 + } + + <-accepted + if err1 != nil { + return nil, nil, err1 + } + + return c1, c2, nil +} + +func TestPipe(t *testing.T) { + makePipe := func() (c1, c2 net.Conn, stop func(), err error) { + c1, c2, err = pipe() + stop = func() { + _ = c1.Close() + _ = c2.Close() + } + return + } + nettest.TestConn(t, makePipe) +} + +func setup(t *testing.T) (*Conn, *Conn) { + t.Helper() + + tcp1, tcp2, err := pipe() + require.NoError(t, err) + t.Cleanup(func() { + _ = tcp1.Close() + _ = tcp2.Close() + }) + + logger := logrus.New() + logger.SetFormatter(&logrus.TextFormatter{ + DisableColors: true, + TimestampFormat: "15:04:05.000000", + }) + logger.SetOutput(&testWriter{t}) + logger.SetLevel(logrus.DebugLevel) + // logger.SetLevel(logrus.TraceLevel) + + c1 := NewConn(tcp1.(*net.TCPConn), logger.WithField("conn", "c1")) + c2 := NewConn(tcp2.(*net.TCPConn), logger.WithField("conn", "c2")) + return c1, c2 +} + +func TestBasic(t *testing.T) { + seed := time.Now().Unix() + t.Logf("seed = %d", seed) + random := rand.New(rand.NewSource(seed)) //nolint:gosec + + c1, c2 := setup(t) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + var wg sync.WaitGroup + wg.Add(2) + go func() { + c1.Run(ctx) + wg.Done() + }() + go func() { + c2.Run(ctx) + wg.Done() + }() + + const total = 50 * 1024 * 1024 + + // c1 writer + var wrote int + go func() { + for { + b := make([]byte, random.Intn(1024*1024)) + wrote += len(b) + if wrote > total { + b = b[:len(b)-(wrote-total)] + wrote = total + } + err := c1.Write(b) + if !assert.NoError(t, err) { + return + } + if wrote == total { + c1.CloseWrite() + return + } + } + }() + + c2.CloseWrite() + + var read int + for b := range c2.Data() { + read += len(b) + } + + require.Equal(t, wrote, read) + + cancel() + wg.Wait() +} diff --git a/tunnels/registry.go b/tunnels/registry.go new file mode 100644 index 000000000..55aa7a664 --- /dev/null +++ b/tunnels/registry.go @@ -0,0 +1,162 @@ +// pmm-agent +// Copyright 2019 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tunnels + +import ( + "context" + "fmt" + "net" + "sort" + "sync" + "time" + + "github.com/percona/pmm/api/agentlocalpb" + "github.com/percona/pmm/api/agentpb" + "github.com/sirupsen/logrus" + spb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + "github.com/percona/pmm-agent/tunnels/conn" +) + +type Registry struct { + ctx context.Context + l *logrus.Entry + + rw sync.RWMutex + tunnels map[string]tunnelInfo +} + +type tunnelInfo struct { + listenPort uint16 + connectPort uint16 + conns map[string]*conn.Conn + cancels map[string]context.CancelFunc +} + +func NewRegistry(ctx context.Context) *Registry { + return &Registry{ + ctx: ctx, + l: logrus.WithField("component", "tunnels-registry"), + } +} + +func (r *Registry) TunnelsList() []*agentlocalpb.TunnelInfo { + r.rw.RLock() + defer r.rw.RUnlock() + + res := make([]*agentlocalpb.TunnelInfo, 0, len(r.tunnels)) + + for id, tunnel := range r.tunnels { + info := &agentlocalpb.TunnelInfo{ + TunnelId: id, + ListenPort: uint32(tunnel.listenPort), + ConnectPort: uint32(tunnel.connectPort), + CurrentConnections: uint32(len(tunnel.conns)), + } + res = append(res, info) + } + + sort.Slice(res, func(i, j int) bool { return res[i].TunnelId < res[j].TunnelId }) + return res +} + +func (r *Registry) SetState(tunnels map[string]*agentpb.SetStateRequest_Tunnel) map[string]*spb.Status { + r.rw.Lock() + defer r.rw.Unlock() + + res := make(map[string]*spb.Status, len(tunnels)) + + // FIXME + r.tunnels = map[string]tunnelInfo{} + for id, t := range tunnels { + if t.ListenPort != 0 && t.ConnectPort != 0 { + res[id] = status.New(codes.InvalidArgument, "Both listen_port and connect_port are set.").Proto() + continue + } + + r.tunnels[id] = tunnelInfo{ + listenPort: uint16(t.ListenPort), + connectPort: uint16(t.ConnectPort), + conns: make(map[string]*conn.Conn), + cancels: make(map[string]context.CancelFunc), + } + } + + return res +} + +func (r *Registry) Write(ctx context.Context, data *agentpb.TunnelData) *agentpb.TunnelDataAck { + r.rw.RLock() + + tunnel, ok := r.tunnels[data.TunnelId] + if !ok { + r.rw.RUnlock() + return &agentpb.TunnelDataAck{ + Status: status.Newf(codes.NotFound, "Tunnel not configured: %s.", data.TunnelId).Proto(), + } + } + + connectionID := data.ConnectionId + c := tunnel.conns[connectionID] + + r.rw.RUnlock() + + if c == nil { + if tunnel.listenPort != 0 { + panic("not implemented yet") + } + + dialCtx, dialCancel := context.WithTimeout(ctx, 2*time.Second) + defer dialCancel() + d := net.Dialer{} + netConn, err := d.DialContext(dialCtx, "tcp", fmt.Sprintf(":%d", tunnel.connectPort)) + if err != nil { + return &agentpb.TunnelDataAck{ + Status: status.FromContextError(err).Proto(), + } + } + + c = conn.NewConn(netConn.(*net.TCPConn), r.l) + connCtx, connCancel := context.WithCancel(r.ctx) + go func() { + c.Run(connCtx) + + r.rw.Lock() + + delete(r.tunnels[data.TunnelId].conns, connectionID) + + r.rw.Unlock() + }() + r.rw.Lock() + r.tunnels[data.TunnelId].conns[connectionID] = c + r.tunnels[data.TunnelId].cancels[connectionID] = connCancel + r.rw.Unlock() + } + + err := c.Write(data.Data) + if data.Close { + c.CloseWrite() + } + if err != nil { + return &agentpb.TunnelDataAck{ + Status: status.FromContextError(err).Proto(), + } + } + + return nil +} diff --git a/tunnels/tunnels.go b/tunnels/tunnels.go new file mode 100644 index 000000000..14d566ca7 --- /dev/null +++ b/tunnels/tunnels.go @@ -0,0 +1,62 @@ +// pmm-agent +// Copyright 2019 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package tunnels provides support for tunnels. +package tunnels + +// // Supervisor manages tunnels. +// type Supervisor struct { +// rw sync.RWMutex +// tunnels map[string]*agentpb.SetStateRequest_Tunnel +// } + +// func NewSupervisor() *Supervisor { +// return &Supervisor{} +// } + +// func (s *Supervisor) Run(ctx context.Context) { + +// } + +// // TunnelsList returns info for all Tunnels managed by this supervisor. +// func (s *Supervisor) TunnelsList() []*agentlocalpb.TunnelInfo { +// // TODO +// return nil +// } + +// // SetState starts or updates all agents placed in args and stops all agents not placed in args, but already run. +// func (s *Supervisor) SetState(tunnels map[string]*agentpb.SetStateRequest_Tunnel) { +// s.rw.Lock() +// defer s.rw.Unlock() + +// s.tunnels = tunnels + +// for id, t := range tunnels { +// if t.ListenPort != 0 { +// addr := fmt.Sprintf("127.0.0.1:%d", t.ListenPort) +// l, err := net.Listen("tcp", addr) +// if err != nil { +// panic(err) +// } + +// for { +// conn, err := l.Accept() +// if err != nil { +// panic(err) +// } +// } +// } +// } +// } diff --git a/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.pb.go b/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.pb.go index 19b8e0b72..948d783b8 100644 --- a/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.pb.go +++ b/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.pb.go @@ -200,6 +200,82 @@ func (x *AgentInfo) GetListenPort() uint32 { return 0 } +// TunnelInfo contains information about Tunnel managed by pmm-agent. +type TunnelInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tunnel ID. + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // Listen port of the listening pmm-agent. + ListenPort uint32 `protobuf:"varint,2,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` + // Target port of the connecting pmm-agent. + ConnectPort uint32 `protobuf:"varint,3,opt,name=connect_port,json=connectPort,proto3" json:"connect_port,omitempty"` + // The current number of established connections. + CurrentConnections uint32 `protobuf:"varint,4,opt,name=current_connections,json=currentConnections,proto3" json:"current_connections,omitempty"` +} + +func (x *TunnelInfo) Reset() { + *x = TunnelInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TunnelInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TunnelInfo) ProtoMessage() {} + +func (x *TunnelInfo) ProtoReflect() protoreflect.Message { + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TunnelInfo.ProtoReflect.Descriptor instead. +func (*TunnelInfo) Descriptor() ([]byte, []int) { + return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{2} +} + +func (x *TunnelInfo) GetTunnelId() string { + if x != nil { + return x.TunnelId + } + return "" +} + +func (x *TunnelInfo) GetListenPort() uint32 { + if x != nil { + return x.ListenPort + } + return 0 +} + +func (x *TunnelInfo) GetConnectPort() uint32 { + if x != nil { + return x.ConnectPort + } + return 0 +} + +func (x *TunnelInfo) GetCurrentConnections() uint32 { + if x != nil { + return x.CurrentConnections + } + return 0 +} + type StatusRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -212,7 +288,7 @@ type StatusRequest struct { func (x *StatusRequest) Reset() { *x = StatusRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[2] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +301,7 @@ func (x *StatusRequest) String() string { func (*StatusRequest) ProtoMessage() {} func (x *StatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[2] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +314,7 @@ func (x *StatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. func (*StatusRequest) Descriptor() ([]byte, []int) { - return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{2} + return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{3} } func (x *StatusRequest) GetGetNetworkInfo() bool { @@ -253,20 +329,23 @@ type StatusResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` - ServerInfo *ServerInfo `protobuf:"bytes,3,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"` - AgentsInfo []*AgentInfo `protobuf:"bytes,4,rep,name=agents_info,json=agentsInfo,proto3" json:"agents_info,omitempty"` + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` + ServerInfo *ServerInfo `protobuf:"bytes,3,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"` + // Agents information. + AgentsInfo []*AgentInfo `protobuf:"bytes,4,rep,name=agents_info,json=agentsInfo,proto3" json:"agents_info,omitempty"` // Config file path if pmm-agent was started with one. ConfigFilepath string `protobuf:"bytes,5,opt,name=config_filepath,json=configFilepath,proto3" json:"config_filepath,omitempty"` // PMM Agent version. AgentVersion string `protobuf:"bytes,6,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` + // Tunnels information. + TunnelsInfo []*TunnelInfo `protobuf:"bytes,7,rep,name=tunnels_info,json=tunnelsInfo,proto3" json:"tunnels_info,omitempty"` } func (x *StatusResponse) Reset() { *x = StatusResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[3] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -279,7 +358,7 @@ func (x *StatusResponse) String() string { func (*StatusResponse) ProtoMessage() {} func (x *StatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[3] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -292,7 +371,7 @@ func (x *StatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead. func (*StatusResponse) Descriptor() ([]byte, []int) { - return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{3} + return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{4} } func (x *StatusResponse) GetAgentId() string { @@ -337,6 +416,13 @@ func (x *StatusResponse) GetAgentVersion() string { return "" } +func (x *StatusResponse) GetTunnelsInfo() []*TunnelInfo { + if x != nil { + return x.TunnelsInfo + } + return nil +} + type ReloadRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -346,7 +432,7 @@ type ReloadRequest struct { func (x *ReloadRequest) Reset() { *x = ReloadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[4] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -359,7 +445,7 @@ func (x *ReloadRequest) String() string { func (*ReloadRequest) ProtoMessage() {} func (x *ReloadRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[4] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -372,7 +458,7 @@ func (x *ReloadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadRequest.ProtoReflect.Descriptor instead. func (*ReloadRequest) Descriptor() ([]byte, []int) { - return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{4} + return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{5} } // ReloadRequest may not be received by the client due to pmm-agent restart. @@ -385,7 +471,7 @@ type ReloadResponse struct { func (x *ReloadResponse) Reset() { *x = ReloadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[5] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -398,7 +484,7 @@ func (x *ReloadResponse) String() string { func (*ReloadResponse) ProtoMessage() {} func (x *ReloadResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentlocalpb_agentlocal_proto_msgTypes[5] + mi := &file_agentlocalpb_agentlocal_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -411,7 +497,7 @@ func (x *ReloadResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReloadResponse.ProtoReflect.Descriptor instead. func (*ReloadResponse) Descriptor() ([]byte, []int) { - return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{5} + return file_agentlocalpb_agentlocal_proto_rawDescGZIP(), []int{6} } var File_agentlocalpb_agentlocal_proto protoreflect.FileDescriptor @@ -453,45 +539,59 @@ var file_agentlocalpb_agentlocal_proto_rawDesc = []byte{ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x22, - 0x39, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x91, 0x02, 0x0a, 0x0e, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, - 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x73, - 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x37, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x0f, - 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xd3, 0x01, 0x0a, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, - 0x12, 0x6a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x0d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x0f, 0x12, 0x0d, 0x2f, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x06, - 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x52, - 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x0d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x52, 0x65, - 0x6c, 0x6f, 0x61, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0x1f, 0x5a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x70, 0x62, 0x3b, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x9e, 0x01, 0x0a, 0x0a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1b, + 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12, + 0x2f, 0x0a, 0x13, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x39, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x28, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x67, 0x65, 0x74, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xcc, 0x02, 0x0a, 0x0e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, 0x6e, + 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, + 0x12, 0x37, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x0b, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x70, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0c, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x39, 0x0a, 0x0c, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, + 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x52, + 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x01, + 0x0a, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x6a, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x0d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x3a, 0x01, 0x2a, 0x5a, 0x0f, 0x12, 0x0d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x2f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x06, 0x52, 0x65, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, + 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x6c, 0x6f, 0x61, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x22, 0x0d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x2f, 0x52, 0x65, 0x6c, 0x6f, 0x61, 0x64, + 0x3a, 0x01, 0x2a, 0x42, 0x1f, 0x5a, 0x1d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x70, 0x62, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x6c, 0x6f, 0x63, + 0x61, 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -506,34 +606,36 @@ func file_agentlocalpb_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocalpb_agentlocal_proto_rawDescData } -var file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_agentlocalpb_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_agentlocalpb_agentlocal_proto_goTypes = []interface{}{ (*ServerInfo)(nil), // 0: agentlocal.ServerInfo (*AgentInfo)(nil), // 1: agentlocal.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.ReloadResponse - (*duration.Duration)(nil), // 6: google.protobuf.Duration - (inventorypb.AgentType)(0), // 7: inventory.AgentType - (inventorypb.AgentStatus)(0), // 8: inventory.AgentStatus + (*TunnelInfo)(nil), // 2: agentlocal.TunnelInfo + (*StatusRequest)(nil), // 3: agentlocal.StatusRequest + (*StatusResponse)(nil), // 4: agentlocal.StatusResponse + (*ReloadRequest)(nil), // 5: agentlocal.ReloadRequest + (*ReloadResponse)(nil), // 6: agentlocal.ReloadResponse + (*duration.Duration)(nil), // 7: google.protobuf.Duration + (inventorypb.AgentType)(0), // 8: inventory.AgentType + (inventorypb.AgentStatus)(0), // 9: inventory.AgentStatus } var file_agentlocalpb_agentlocal_proto_depIdxs = []int32{ - 6, // 0: agentlocal.ServerInfo.latency:type_name -> google.protobuf.Duration - 6, // 1: agentlocal.ServerInfo.clock_drift:type_name -> google.protobuf.Duration - 7, // 2: agentlocal.AgentInfo.agent_type:type_name -> inventory.AgentType - 8, // 3: agentlocal.AgentInfo.status:type_name -> inventory.AgentStatus + 7, // 0: agentlocal.ServerInfo.latency:type_name -> google.protobuf.Duration + 7, // 1: agentlocal.ServerInfo.clock_drift:type_name -> google.protobuf.Duration + 8, // 2: agentlocal.AgentInfo.agent_type:type_name -> inventory.AgentType + 9, // 3: agentlocal.AgentInfo.status:type_name -> inventory.AgentStatus 0, // 4: agentlocal.StatusResponse.server_info:type_name -> agentlocal.ServerInfo 1, // 5: agentlocal.StatusResponse.agents_info:type_name -> agentlocal.AgentInfo - 2, // 6: agentlocal.AgentLocal.Status:input_type -> agentlocal.StatusRequest - 4, // 7: agentlocal.AgentLocal.Reload:input_type -> agentlocal.ReloadRequest - 3, // 8: agentlocal.AgentLocal.Status:output_type -> agentlocal.StatusResponse - 5, // 9: agentlocal.AgentLocal.Reload:output_type -> agentlocal.ReloadResponse - 8, // [8:10] is the sub-list for method output_type - 6, // [6:8] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 2, // 6: agentlocal.StatusResponse.tunnels_info:type_name -> agentlocal.TunnelInfo + 3, // 7: agentlocal.AgentLocal.Status:input_type -> agentlocal.StatusRequest + 5, // 8: agentlocal.AgentLocal.Reload:input_type -> agentlocal.ReloadRequest + 4, // 9: agentlocal.AgentLocal.Status:output_type -> agentlocal.StatusResponse + 6, // 10: agentlocal.AgentLocal.Reload:output_type -> agentlocal.ReloadResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_agentlocalpb_agentlocal_proto_init() } @@ -567,7 +669,7 @@ func file_agentlocalpb_agentlocal_proto_init() { } } file_agentlocalpb_agentlocal_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusRequest); i { + switch v := v.(*TunnelInfo); i { case 0: return &v.state case 1: @@ -579,7 +681,7 @@ func file_agentlocalpb_agentlocal_proto_init() { } } file_agentlocalpb_agentlocal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatusResponse); i { + switch v := v.(*StatusRequest); i { case 0: return &v.state case 1: @@ -591,7 +693,7 @@ func file_agentlocalpb_agentlocal_proto_init() { } } file_agentlocalpb_agentlocal_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReloadRequest); i { + switch v := v.(*StatusResponse); i { case 0: return &v.state case 1: @@ -603,6 +705,18 @@ func file_agentlocalpb_agentlocal_proto_init() { } } file_agentlocalpb_agentlocal_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReloadRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agentlocalpb_agentlocal_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReloadResponse); i { case 0: return &v.state @@ -621,7 +735,7 @@ func file_agentlocalpb_agentlocal_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_agentlocalpb_agentlocal_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.validator.pb.go b/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.validator.pb.go index fafb89997..cda5c8cd7 100644 --- a/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.validator.pb.go +++ b/vendor/github.com/percona/pmm/api/agentlocalpb/agentlocal.validator.pb.go @@ -34,6 +34,9 @@ func (this *ServerInfo) Validate() error { func (this *AgentInfo) Validate() error { return nil } +func (this *TunnelInfo) Validate() error { + return nil +} func (this *StatusRequest) Validate() error { return nil } @@ -50,6 +53,13 @@ func (this *StatusResponse) Validate() error { } } } + for _, item := range this.TunnelsInfo { + if item != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelsInfo", err) + } + } + } return nil } func (this *ReloadRequest) Validate() error { diff --git a/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status2_responses.go b/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status2_responses.go index f04ef8fd0..191d37777 100644 --- a/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status2_responses.go +++ b/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status2_responses.go @@ -203,7 +203,7 @@ type Status2OKBody struct { // runs on node id RunsOnNodeID string `json:"runs_on_node_id,omitempty"` - // agents info + // Agents information. AgentsInfo []*AgentsInfoItems0 `json:"agents_info"` // Config file path if pmm-agent was started with one. @@ -212,6 +212,9 @@ type Status2OKBody struct { // PMM Agent version. AgentVersion string `json:"agent_version,omitempty"` + // Tunnels information. + TunnelsInfo []*TunnelsInfoItems0 `json:"tunnels_info"` + // server info ServerInfo *Status2OKBodyServerInfo `json:"server_info,omitempty"` } @@ -224,6 +227,10 @@ func (o *Status2OKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateTunnelsInfo(formats); err != nil { + res = append(res, err) + } + if err := o.validateServerInfo(formats); err != nil { res = append(res, err) } @@ -259,6 +266,31 @@ func (o *Status2OKBody) validateAgentsInfo(formats strfmt.Registry) error { return nil } +func (o *Status2OKBody) validateTunnelsInfo(formats strfmt.Registry) error { + + if swag.IsZero(o.TunnelsInfo) { // not required + return nil + } + + for i := 0; i < len(o.TunnelsInfo); i++ { + if swag.IsZero(o.TunnelsInfo[i]) { // not required + continue + } + + if o.TunnelsInfo[i] != nil { + if err := o.TunnelsInfo[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status2Ok" + "." + "tunnels_info" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (o *Status2OKBody) validateServerInfo(formats strfmt.Registry) error { if swag.IsZero(o.ServerInfo) { // not required diff --git a/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status_responses.go b/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status_responses.go index b4a8ebc9e..14e8dcb9c 100644 --- a/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status_responses.go +++ b/vendor/github.com/percona/pmm/api/agentlocalpb/json/client/agent_local/status_responses.go @@ -437,7 +437,7 @@ type StatusOKBody struct { // runs on node id RunsOnNodeID string `json:"runs_on_node_id,omitempty"` - // agents info + // Agents information. AgentsInfo []*AgentsInfoItems0 `json:"agents_info"` // Config file path if pmm-agent was started with one. @@ -446,6 +446,9 @@ type StatusOKBody struct { // PMM Agent version. AgentVersion string `json:"agent_version,omitempty"` + // Tunnels information. + TunnelsInfo []*TunnelsInfoItems0 `json:"tunnels_info"` + // server info ServerInfo *StatusOKBodyServerInfo `json:"server_info,omitempty"` } @@ -458,6 +461,10 @@ func (o *StatusOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateTunnelsInfo(formats); err != nil { + res = append(res, err) + } + if err := o.validateServerInfo(formats); err != nil { res = append(res, err) } @@ -493,6 +500,31 @@ func (o *StatusOKBody) validateAgentsInfo(formats strfmt.Registry) error { return nil } +func (o *StatusOKBody) validateTunnelsInfo(formats strfmt.Registry) error { + + if swag.IsZero(o.TunnelsInfo) { // not required + return nil + } + + for i := 0; i < len(o.TunnelsInfo); i++ { + if swag.IsZero(o.TunnelsInfo[i]) { // not required + continue + } + + if o.TunnelsInfo[i] != nil { + if err := o.TunnelsInfo[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("statusOk" + "." + "tunnels_info" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + func (o *StatusOKBody) validateServerInfo(formats strfmt.Registry) error { if swag.IsZero(o.ServerInfo) { // not required @@ -575,3 +607,44 @@ func (o *StatusOKBodyServerInfo) UnmarshalBinary(b []byte) error { *o = res return nil } + +/*TunnelsInfoItems0 TunnelInfo contains information about Tunnel managed by pmm-agent. +swagger:model TunnelsInfoItems0 +*/ +type TunnelsInfoItems0 struct { + + // Tunnel ID. + TunnelID string `json:"tunnel_id,omitempty"` + + // Listen port of the listening pmm-agent. + ListenPort int64 `json:"listen_port,omitempty"` + + // Target port of the connecting pmm-agent. + ConnectPort int64 `json:"connect_port,omitempty"` + + // The current number of established connections. + CurrentConnections int64 `json:"current_connections,omitempty"` +} + +// Validate validates this tunnels info items0 +func (o *TunnelsInfoItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *TunnelsInfoItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *TunnelsInfoItems0) UnmarshalBinary(b []byte) error { + var res TunnelsInfoItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/vendor/github.com/percona/pmm/api/agentpb/agent.go b/vendor/github.com/percona/pmm/api/agentpb/agent.go index f13452086..415ec7740 100644 --- a/vendor/github.com/percona/pmm/api/agentpb/agent.go +++ b/vendor/github.com/percona/pmm/api/agentpb/agent.go @@ -41,7 +41,8 @@ type ServerRequestPayload interface { sealed() } -// AgentMessage request payloads +// AgentMessage request payloads. + func (m *Ping) AgentMessageRequestPayload() isAgentMessage_Payload { return &AgentMessage_Ping{Ping: m} } @@ -54,8 +55,12 @@ func (m *QANCollectRequest) AgentMessageRequestPayload() isAgentMessage_Payload func (m *ActionResultRequest) AgentMessageRequestPayload() isAgentMessage_Payload { return &AgentMessage_ActionResult{ActionResult: m} } +func (m *TunnelData) AgentMessageRequestPayload() isAgentMessage_Payload { + return &AgentMessage_TunnelData{TunnelData: m} +} + +// AgentMessage response payloads. -// AgentMessage response payloads func (m *Pong) AgentMessageResponsePayload() isAgentMessage_Payload { return &AgentMessage_Pong{Pong: m} } @@ -71,8 +76,12 @@ func (m *StopActionResponse) AgentMessageResponsePayload() isAgentMessage_Payloa func (m *CheckConnectionResponse) AgentMessageResponsePayload() isAgentMessage_Payload { return &AgentMessage_CheckConnection{CheckConnection: m} } +func (m *TunnelDataAck) AgentMessageResponsePayload() isAgentMessage_Payload { + return &AgentMessage_TunnelDataAck{TunnelDataAck: m} +} + +// ServerMessage response payloads. -// ServerMessage response payloads func (m *Pong) ServerMessageResponsePayload() isServerMessage_Payload { return &ServerMessage_Pong{Pong: m} } @@ -85,8 +94,12 @@ func (m *QANCollectResponse) ServerMessageResponsePayload() isServerMessage_Payl func (m *ActionResultResponse) ServerMessageResponsePayload() isServerMessage_Payload { return &ServerMessage_ActionResult{ActionResult: m} } +func (m *TunnelDataAck) ServerMessageResponsePayload() isServerMessage_Payload { + return &ServerMessage_TunnelDataAck{TunnelDataAck: m} +} + +// ServerMessage request payloads. -// ServerMessage request payloads func (m *Ping) ServerMessageRequestPayload() isServerMessage_Payload { return &ServerMessage_Ping{Ping: m} } @@ -102,8 +115,11 @@ func (m *StopActionRequest) ServerMessageRequestPayload() isServerMessage_Payloa func (m *CheckConnectionRequest) ServerMessageRequestPayload() isServerMessage_Payload { return &ServerMessage_CheckConnection{CheckConnection: m} } +func (m *TunnelData) ServerMessageRequestPayload() isServerMessage_Payload { + return &ServerMessage_TunnelData{TunnelData: m} +} -// in alphabetical order +// In alphabetical order. func (*ActionResultRequest) sealed() {} func (*ActionResultResponse) sealed() {} func (*CheckConnectionRequest) sealed() {} @@ -120,34 +136,40 @@ func (*StateChangedRequest) sealed() {} func (*StateChangedResponse) sealed() {} func (*StopActionRequest) sealed() {} func (*StopActionResponse) sealed() {} +func (*TunnelData) sealed() {} +func (*TunnelDataAck) sealed() {} // check interfaces var ( - // AgentMessage request payloads + // AgentMessage request payloads. _ AgentRequestPayload = (*Ping)(nil) _ AgentRequestPayload = (*StateChangedRequest)(nil) _ AgentRequestPayload = (*QANCollectRequest)(nil) _ AgentRequestPayload = (*ActionResultRequest)(nil) + _ AgentRequestPayload = (*TunnelData)(nil) - // AgentMessage response payloads + // AgentMessage response payloads. _ AgentResponsePayload = (*Pong)(nil) _ AgentResponsePayload = (*SetStateResponse)(nil) _ AgentResponsePayload = (*StartActionResponse)(nil) _ AgentResponsePayload = (*StopActionResponse)(nil) _ AgentResponsePayload = (*CheckConnectionResponse)(nil) + _ AgentResponsePayload = (*TunnelDataAck)(nil) - // ServerMessage response payloads + // ServerMessage response payloads. _ ServerResponsePayload = (*Pong)(nil) _ ServerResponsePayload = (*StateChangedResponse)(nil) _ ServerResponsePayload = (*QANCollectResponse)(nil) _ ServerResponsePayload = (*ActionResultResponse)(nil) + _ ServerResponsePayload = (*TunnelDataAck)(nil) - // ServerMessage request payloads + // ServerMessage request payloads. _ ServerRequestPayload = (*Ping)(nil) _ ServerRequestPayload = (*SetStateRequest)(nil) _ ServerRequestPayload = (*StartActionRequest)(nil) _ ServerRequestPayload = (*StopActionRequest)(nil) _ ServerRequestPayload = (*CheckConnectionRequest)(nil) + _ ServerRequestPayload = (*TunnelData)(nil) ) //go-sumtype:decl AgentParams diff --git a/vendor/github.com/percona/pmm/api/agentpb/agent.pb.go b/vendor/github.com/percona/pmm/api/agentpb/agent.pb.go index 894b4402c..422ca27e6 100644 --- a/vendor/github.com/percona/pmm/api/agentpb/agent.pb.go +++ b/vendor/github.com/percona/pmm/api/agentpb/agent.pb.go @@ -11,10 +11,12 @@ import ( proto "github.com/golang/protobuf/proto" duration "github.com/golang/protobuf/ptypes/duration" timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/mwitkow/go-proto-validators" inventorypb "github.com/percona/pmm/api/inventorypb" + status "google.golang.org/genproto/googleapis/rpc/status" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" + status1 "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -432,7 +434,8 @@ func (*StateChangedResponse) Descriptor() ([]byte, []int) { return file_agentpb_agent_proto_rawDescGZIP(), []int{6} } -// SetStateRequest is a ServerMessage asking pmm-agent to run agents according to desired state. +// SetStateRequest is a ServerMessage asking pmm-agent to run agents and setup tunnels +// according to desired state. type SetStateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -440,6 +443,8 @@ type SetStateRequest struct { AgentProcesses map[string]*SetStateRequest_AgentProcess `protobuf:"bytes,1,rep,name=agent_processes,json=agentProcesses,proto3" json:"agent_processes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` BuiltinAgents map[string]*SetStateRequest_BuiltinAgent `protobuf:"bytes,2,rep,name=builtin_agents,json=builtinAgents,proto3" json:"builtin_agents,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Desired Tunnel configurations and their IDs. + Tunnels map[string]*SetStateRequest_Tunnel `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SetStateRequest) Reset() { @@ -488,11 +493,20 @@ func (x *SetStateRequest) GetBuiltinAgents() map[string]*SetStateRequest_Builtin return nil } +func (x *SetStateRequest) GetTunnels() map[string]*SetStateRequest_Tunnel { + if x != nil { + return x.Tunnels + } + return nil +} + // SetStateResponse is an AgentMessage for SetStateRequest acceptance. type SetStateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Tunnels map[string]*status.Status `protobuf:"bytes,3,rep,name=tunnels,proto3" json:"tunnels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *SetStateResponse) Reset() { @@ -527,6 +541,13 @@ func (*SetStateResponse) Descriptor() ([]byte, []int) { return file_agentpb_agent_proto_rawDescGZIP(), []int{8} } +func (x *SetStateResponse) GetTunnels() map[string]*status.Status { + if x != nil { + return x.Tunnels + } + return nil +} + // QueryActionValue represents a single value used in query Actions. type QueryActionValue struct { state protoimpl.MessageState @@ -1404,6 +1425,132 @@ func (*ActionResultResponse) Descriptor() ([]byte, []int) { return file_agentpb_agent_proto_rawDescGZIP(), []int{18} } +// TunnelData is a AgentMessage/ServerMessage for transferring data chunk over the Tunnel. +type TunnelData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tunnel ID. + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // ID of the connection within a Tunnel. + // Unlike other IDs, this one is generated by pmm-agent, not by pmm-managed. + ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` + // True if this is the last chunk of data in this direction for this connection. + Close bool `protobuf:"varint,3,opt,name=close,proto3" json:"close,omitempty"` + // Data chunk. + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *TunnelData) Reset() { + *x = TunnelData{} + if protoimpl.UnsafeEnabled { + mi := &file_agentpb_agent_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TunnelData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TunnelData) ProtoMessage() {} + +func (x *TunnelData) ProtoReflect() protoreflect.Message { + mi := &file_agentpb_agent_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 TunnelData.ProtoReflect.Descriptor instead. +func (*TunnelData) Descriptor() ([]byte, []int) { + return file_agentpb_agent_proto_rawDescGZIP(), []int{19} +} + +func (x *TunnelData) GetTunnelId() string { + if x != nil { + return x.TunnelId + } + return "" +} + +func (x *TunnelData) GetConnectionId() string { + if x != nil { + return x.ConnectionId + } + return "" +} + +func (x *TunnelData) GetClose() bool { + if x != nil { + return x.Close + } + return false +} + +func (x *TunnelData) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +// TunnelDataAck is a AgentMessage/ServerMessage for TunnelData acceptance. +type TunnelDataAck struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // TODO + Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *TunnelDataAck) Reset() { + *x = TunnelDataAck{} + if protoimpl.UnsafeEnabled { + mi := &file_agentpb_agent_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TunnelDataAck) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TunnelDataAck) ProtoMessage() {} + +func (x *TunnelDataAck) ProtoReflect() protoreflect.Message { + mi := &file_agentpb_agent_proto_msgTypes[20] + 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 TunnelDataAck.ProtoReflect.Descriptor instead. +func (*TunnelDataAck) Descriptor() ([]byte, []int) { + return file_agentpb_agent_proto_rawDescGZIP(), []int{20} +} + +func (x *TunnelDataAck) GetStatus() *status.Status { + if x != nil { + return x.Status + } + return nil +} + // CheckConnectionRequest is a ServerMessage asking pmm-agent to check connection with Service. type CheckConnectionRequest struct { state protoimpl.MessageState @@ -1423,7 +1570,7 @@ type CheckConnectionRequest struct { func (x *CheckConnectionRequest) Reset() { *x = CheckConnectionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[19] + mi := &file_agentpb_agent_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1436,7 +1583,7 @@ func (x *CheckConnectionRequest) String() string { func (*CheckConnectionRequest) ProtoMessage() {} func (x *CheckConnectionRequest) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[19] + mi := &file_agentpb_agent_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1449,7 +1596,7 @@ func (x *CheckConnectionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckConnectionRequest.ProtoReflect.Descriptor instead. func (*CheckConnectionRequest) Descriptor() ([]byte, []int) { - return file_agentpb_agent_proto_rawDescGZIP(), []int{19} + return file_agentpb_agent_proto_rawDescGZIP(), []int{21} } func (x *CheckConnectionRequest) GetType() inventorypb.ServiceType { @@ -1494,7 +1641,7 @@ type CheckConnectionResponse struct { func (x *CheckConnectionResponse) Reset() { *x = CheckConnectionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[20] + mi := &file_agentpb_agent_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1507,7 +1654,7 @@ func (x *CheckConnectionResponse) String() string { func (*CheckConnectionResponse) ProtoMessage() {} func (x *CheckConnectionResponse) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[20] + mi := &file_agentpb_agent_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1520,7 +1667,7 @@ func (x *CheckConnectionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckConnectionResponse.ProtoReflect.Descriptor instead. func (*CheckConnectionResponse) Descriptor() ([]byte, []int) { - return file_agentpb_agent_proto_rawDescGZIP(), []int{20} + return file_agentpb_agent_proto_rawDescGZIP(), []int{22} } func (x *CheckConnectionResponse) GetError() string { @@ -1548,18 +1695,20 @@ type AgentMessage struct { // *AgentMessage_StateChanged // *AgentMessage_QanCollect // *AgentMessage_ActionResult + // *AgentMessage_TunnelData // *AgentMessage_Pong // *AgentMessage_SetState // *AgentMessage_StartAction // *AgentMessage_StopAction // *AgentMessage_CheckConnection + // *AgentMessage_TunnelDataAck Payload isAgentMessage_Payload `protobuf_oneof:"payload"` } func (x *AgentMessage) Reset() { *x = AgentMessage{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[21] + mi := &file_agentpb_agent_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1572,7 +1721,7 @@ func (x *AgentMessage) String() string { func (*AgentMessage) ProtoMessage() {} func (x *AgentMessage) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[21] + mi := &file_agentpb_agent_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1585,7 +1734,7 @@ func (x *AgentMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use AgentMessage.ProtoReflect.Descriptor instead. func (*AgentMessage) Descriptor() ([]byte, []int) { - return file_agentpb_agent_proto_rawDescGZIP(), []int{21} + return file_agentpb_agent_proto_rawDescGZIP(), []int{23} } func (x *AgentMessage) GetId() uint32 { @@ -1630,6 +1779,13 @@ func (x *AgentMessage) GetActionResult() *ActionResultRequest { return nil } +func (x *AgentMessage) GetTunnelData() *TunnelData { + if x, ok := x.GetPayload().(*AgentMessage_TunnelData); ok { + return x.TunnelData + } + return nil +} + func (x *AgentMessage) GetPong() *Pong { if x, ok := x.GetPayload().(*AgentMessage_Pong); ok { return x.Pong @@ -1665,6 +1821,13 @@ func (x *AgentMessage) GetCheckConnection() *CheckConnectionResponse { return nil } +func (x *AgentMessage) GetTunnelDataAck() *TunnelDataAck { + if x, ok := x.GetPayload().(*AgentMessage_TunnelDataAck); ok { + return x.TunnelDataAck + } + return nil +} + type isAgentMessage_Payload interface { isAgentMessage_Payload() } @@ -1686,6 +1849,10 @@ type AgentMessage_ActionResult struct { ActionResult *ActionResultRequest `protobuf:"bytes,5,opt,name=action_result,json=actionResult,proto3,oneof"` } +type AgentMessage_TunnelData struct { + TunnelData *TunnelData `protobuf:"bytes,6,opt,name=tunnel_data,json=tunnelData,proto3,oneof"` +} + type AgentMessage_Pong struct { // responses from agent Pong *Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"` @@ -1707,6 +1874,10 @@ type AgentMessage_CheckConnection struct { CheckConnection *CheckConnectionResponse `protobuf:"bytes,12,opt,name=check_connection,json=checkConnection,proto3,oneof"` } +type AgentMessage_TunnelDataAck struct { + TunnelDataAck *TunnelDataAck `protobuf:"bytes,13,opt,name=tunnel_data_ack,json=tunnelDataAck,proto3,oneof"` +} + func (*AgentMessage_Ping) isAgentMessage_Payload() {} func (*AgentMessage_StateChanged) isAgentMessage_Payload() {} @@ -1715,6 +1886,8 @@ func (*AgentMessage_QanCollect) isAgentMessage_Payload() {} func (*AgentMessage_ActionResult) isAgentMessage_Payload() {} +func (*AgentMessage_TunnelData) isAgentMessage_Payload() {} + func (*AgentMessage_Pong) isAgentMessage_Payload() {} func (*AgentMessage_SetState) isAgentMessage_Payload() {} @@ -1725,6 +1898,8 @@ func (*AgentMessage_StopAction) isAgentMessage_Payload() {} func (*AgentMessage_CheckConnection) isAgentMessage_Payload() {} +func (*AgentMessage_TunnelDataAck) isAgentMessage_Payload() {} + type ServerMessage struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1736,18 +1911,20 @@ type ServerMessage struct { // *ServerMessage_StateChanged // *ServerMessage_QanCollect // *ServerMessage_ActionResult + // *ServerMessage_TunnelDataAck // *ServerMessage_Ping // *ServerMessage_SetState // *ServerMessage_StartAction // *ServerMessage_StopAction // *ServerMessage_CheckConnection + // *ServerMessage_TunnelData Payload isServerMessage_Payload `protobuf_oneof:"payload"` } func (x *ServerMessage) Reset() { *x = ServerMessage{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[22] + mi := &file_agentpb_agent_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1760,7 +1937,7 @@ func (x *ServerMessage) String() string { func (*ServerMessage) ProtoMessage() {} func (x *ServerMessage) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[22] + mi := &file_agentpb_agent_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1773,7 +1950,7 @@ func (x *ServerMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead. func (*ServerMessage) Descriptor() ([]byte, []int) { - return file_agentpb_agent_proto_rawDescGZIP(), []int{22} + return file_agentpb_agent_proto_rawDescGZIP(), []int{24} } func (x *ServerMessage) GetId() uint32 { @@ -1818,6 +1995,13 @@ func (x *ServerMessage) GetActionResult() *ActionResultResponse { return nil } +func (x *ServerMessage) GetTunnelDataAck() *TunnelDataAck { + if x, ok := x.GetPayload().(*ServerMessage_TunnelDataAck); ok { + return x.TunnelDataAck + } + return nil +} + func (x *ServerMessage) GetPing() *Ping { if x, ok := x.GetPayload().(*ServerMessage_Ping); ok { return x.Ping @@ -1853,6 +2037,13 @@ func (x *ServerMessage) GetCheckConnection() *CheckConnectionRequest { return nil } +func (x *ServerMessage) GetTunnelData() *TunnelData { + if x, ok := x.GetPayload().(*ServerMessage_TunnelData); ok { + return x.TunnelData + } + return nil +} + type isServerMessage_Payload interface { isServerMessage_Payload() } @@ -1874,6 +2065,10 @@ type ServerMessage_ActionResult struct { ActionResult *ActionResultResponse `protobuf:"bytes,5,opt,name=action_result,json=actionResult,proto3,oneof"` } +type ServerMessage_TunnelDataAck struct { + TunnelDataAck *TunnelDataAck `protobuf:"bytes,6,opt,name=tunnel_data_ack,json=tunnelDataAck,proto3,oneof"` +} + type ServerMessage_Ping struct { // requests from server Ping *Ping `protobuf:"bytes,8,opt,name=ping,proto3,oneof"` @@ -1895,6 +2090,10 @@ type ServerMessage_CheckConnection struct { CheckConnection *CheckConnectionRequest `protobuf:"bytes,12,opt,name=check_connection,json=checkConnection,proto3,oneof"` } +type ServerMessage_TunnelData struct { + TunnelData *TunnelData `protobuf:"bytes,13,opt,name=tunnel_data,json=tunnelData,proto3,oneof"` +} + func (*ServerMessage_Pong) isServerMessage_Payload() {} func (*ServerMessage_StateChanged) isServerMessage_Payload() {} @@ -1903,6 +2102,8 @@ func (*ServerMessage_QanCollect) isServerMessage_Payload() {} func (*ServerMessage_ActionResult) isServerMessage_Payload() {} +func (*ServerMessage_TunnelDataAck) isServerMessage_Payload() {} + func (*ServerMessage_Ping) isServerMessage_Payload() {} func (*ServerMessage_SetState) isServerMessage_Payload() {} @@ -1913,6 +2114,8 @@ func (*ServerMessage_StopAction) isServerMessage_Payload() {} func (*ServerMessage_CheckConnection) isServerMessage_Payload() {} +func (*ServerMessage_TunnelData) isServerMessage_Payload() {} + // AgentProcess describes desired configuration of a single agent process started by pmm-agent. type SetStateRequest_AgentProcess struct { state protoimpl.MessageState @@ -1931,7 +2134,7 @@ type SetStateRequest_AgentProcess struct { func (x *SetStateRequest_AgentProcess) Reset() { *x = SetStateRequest_AgentProcess{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[24] + mi := &file_agentpb_agent_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1944,7 +2147,7 @@ func (x *SetStateRequest_AgentProcess) String() string { func (*SetStateRequest_AgentProcess) ProtoMessage() {} func (x *SetStateRequest_AgentProcess) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[24] + mi := &file_agentpb_agent_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2028,7 +2231,7 @@ type SetStateRequest_BuiltinAgent struct { func (x *SetStateRequest_BuiltinAgent) Reset() { *x = SetStateRequest_BuiltinAgent{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[26] + mi := &file_agentpb_agent_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2041,7 +2244,7 @@ func (x *SetStateRequest_BuiltinAgent) String() string { func (*SetStateRequest_BuiltinAgent) ProtoMessage() {} func (x *SetStateRequest_BuiltinAgent) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[26] + mi := &file_agentpb_agent_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2092,6 +2295,64 @@ func (x *SetStateRequest_BuiltinAgent) GetTextFiles() *TextFiles { return nil } +// Tunnel describes desired configuration of a single Tunnel for pmm-agent. +type SetStateRequest_Tunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Listen port of the listening pmm-agent; one of listen_port and connect_port should be set. + ListenPort uint32 `protobuf:"varint,1,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` + // Target port of the connecting pmm-agent; one of listen_port and connect_port should be set. + ConnectPort uint32 `protobuf:"varint,2,opt,name=connect_port,json=connectPort,proto3" json:"connect_port,omitempty"` +} + +func (x *SetStateRequest_Tunnel) Reset() { + *x = SetStateRequest_Tunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_agentpb_agent_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetStateRequest_Tunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetStateRequest_Tunnel) ProtoMessage() {} + +func (x *SetStateRequest_Tunnel) ProtoReflect() protoreflect.Message { + mi := &file_agentpb_agent_proto_msgTypes[30] + 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 SetStateRequest_Tunnel.ProtoReflect.Descriptor instead. +func (*SetStateRequest_Tunnel) Descriptor() ([]byte, []int) { + return file_agentpb_agent_proto_rawDescGZIP(), []int{7, 4} +} + +func (x *SetStateRequest_Tunnel) GetListenPort() uint32 { + if x != nil { + return x.ListenPort + } + return 0 +} + +func (x *SetStateRequest_Tunnel) GetConnectPort() uint32 { + if x != nil { + return x.ConnectPort + } + return 0 +} + // MySQLExplainParams describes MySQL EXPLAIN action parameters. type StartActionRequest_MySQLExplainParams struct { state protoimpl.MessageState @@ -2107,7 +2368,7 @@ type StartActionRequest_MySQLExplainParams struct { func (x *StartActionRequest_MySQLExplainParams) Reset() { *x = StartActionRequest_MySQLExplainParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[30] + mi := &file_agentpb_agent_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2120,7 +2381,7 @@ func (x *StartActionRequest_MySQLExplainParams) String() string { func (*StartActionRequest_MySQLExplainParams) ProtoMessage() {} func (x *StartActionRequest_MySQLExplainParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[30] + mi := &file_agentpb_agent_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2171,7 +2432,7 @@ type StartActionRequest_MySQLShowCreateTableParams struct { func (x *StartActionRequest_MySQLShowCreateTableParams) Reset() { *x = StartActionRequest_MySQLShowCreateTableParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[31] + mi := &file_agentpb_agent_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2184,7 +2445,7 @@ func (x *StartActionRequest_MySQLShowCreateTableParams) String() string { func (*StartActionRequest_MySQLShowCreateTableParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowCreateTableParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[31] + mi := &file_agentpb_agent_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2228,7 +2489,7 @@ type StartActionRequest_MySQLShowTableStatusParams struct { func (x *StartActionRequest_MySQLShowTableStatusParams) Reset() { *x = StartActionRequest_MySQLShowTableStatusParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[32] + mi := &file_agentpb_agent_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2241,7 +2502,7 @@ func (x *StartActionRequest_MySQLShowTableStatusParams) String() string { func (*StartActionRequest_MySQLShowTableStatusParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowTableStatusParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[32] + mi := &file_agentpb_agent_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2285,7 +2546,7 @@ type StartActionRequest_MySQLShowIndexParams struct { func (x *StartActionRequest_MySQLShowIndexParams) Reset() { *x = StartActionRequest_MySQLShowIndexParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[33] + mi := &file_agentpb_agent_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2298,7 +2559,7 @@ func (x *StartActionRequest_MySQLShowIndexParams) String() string { func (*StartActionRequest_MySQLShowIndexParams) ProtoMessage() {} func (x *StartActionRequest_MySQLShowIndexParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[33] + mi := &file_agentpb_agent_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2342,7 +2603,7 @@ type StartActionRequest_PostgreSQLShowCreateTableParams struct { func (x *StartActionRequest_PostgreSQLShowCreateTableParams) Reset() { *x = StartActionRequest_PostgreSQLShowCreateTableParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[34] + mi := &file_agentpb_agent_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2355,7 +2616,7 @@ func (x *StartActionRequest_PostgreSQLShowCreateTableParams) String() string { func (*StartActionRequest_PostgreSQLShowCreateTableParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLShowCreateTableParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[34] + mi := &file_agentpb_agent_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2399,7 +2660,7 @@ type StartActionRequest_PostgreSQLShowIndexParams struct { func (x *StartActionRequest_PostgreSQLShowIndexParams) Reset() { *x = StartActionRequest_PostgreSQLShowIndexParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[35] + mi := &file_agentpb_agent_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2412,7 +2673,7 @@ func (x *StartActionRequest_PostgreSQLShowIndexParams) String() string { func (*StartActionRequest_PostgreSQLShowIndexParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLShowIndexParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[35] + mi := &file_agentpb_agent_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2459,7 +2720,7 @@ type StartActionRequest_MongoDBExplainParams struct { func (x *StartActionRequest_MongoDBExplainParams) Reset() { *x = StartActionRequest_MongoDBExplainParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[36] + mi := &file_agentpb_agent_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2472,7 +2733,7 @@ func (x *StartActionRequest_MongoDBExplainParams) String() string { func (*StartActionRequest_MongoDBExplainParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBExplainParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[36] + mi := &file_agentpb_agent_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2519,7 +2780,7 @@ type StartActionRequest_PTSummaryParams struct { func (x *StartActionRequest_PTSummaryParams) Reset() { *x = StartActionRequest_PTSummaryParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[37] + mi := &file_agentpb_agent_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2532,7 +2793,7 @@ func (x *StartActionRequest_PTSummaryParams) String() string { func (*StartActionRequest_PTSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[37] + mi := &file_agentpb_agent_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2563,7 +2824,7 @@ type StartActionRequest_PTMongoDBSummaryParams struct { func (x *StartActionRequest_PTMongoDBSummaryParams) Reset() { *x = StartActionRequest_PTMongoDBSummaryParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[38] + mi := &file_agentpb_agent_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2576,7 +2837,7 @@ func (x *StartActionRequest_PTMongoDBSummaryParams) String() string { func (*StartActionRequest_PTMongoDBSummaryParams) ProtoMessage() {} func (x *StartActionRequest_PTMongoDBSummaryParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[38] + mi := &file_agentpb_agent_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2635,7 +2896,7 @@ type StartActionRequest_MySQLQueryShowParams struct { func (x *StartActionRequest_MySQLQueryShowParams) Reset() { *x = StartActionRequest_MySQLQueryShowParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[39] + mi := &file_agentpb_agent_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2648,7 +2909,7 @@ func (x *StartActionRequest_MySQLQueryShowParams) String() string { func (*StartActionRequest_MySQLQueryShowParams) ProtoMessage() {} func (x *StartActionRequest_MySQLQueryShowParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[39] + mi := &file_agentpb_agent_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2693,7 +2954,7 @@ type StartActionRequest_MySQLQuerySelectParams struct { func (x *StartActionRequest_MySQLQuerySelectParams) Reset() { *x = StartActionRequest_MySQLQuerySelectParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[40] + mi := &file_agentpb_agent_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2706,7 +2967,7 @@ func (x *StartActionRequest_MySQLQuerySelectParams) String() string { func (*StartActionRequest_MySQLQuerySelectParams) ProtoMessage() {} func (x *StartActionRequest_MySQLQuerySelectParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[40] + mi := &file_agentpb_agent_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2749,7 +3010,7 @@ type StartActionRequest_PostgreSQLQueryShowParams struct { func (x *StartActionRequest_PostgreSQLQueryShowParams) Reset() { *x = StartActionRequest_PostgreSQLQueryShowParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[41] + mi := &file_agentpb_agent_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2762,7 +3023,7 @@ func (x *StartActionRequest_PostgreSQLQueryShowParams) String() string { func (*StartActionRequest_PostgreSQLQueryShowParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLQueryShowParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[41] + mi := &file_agentpb_agent_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2800,7 +3061,7 @@ type StartActionRequest_PostgreSQLQuerySelectParams struct { func (x *StartActionRequest_PostgreSQLQuerySelectParams) Reset() { *x = StartActionRequest_PostgreSQLQuerySelectParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[42] + mi := &file_agentpb_agent_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2813,7 +3074,7 @@ func (x *StartActionRequest_PostgreSQLQuerySelectParams) String() string { func (*StartActionRequest_PostgreSQLQuerySelectParams) ProtoMessage() {} func (x *StartActionRequest_PostgreSQLQuerySelectParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[42] + mi := &file_agentpb_agent_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2859,7 +3120,7 @@ type StartActionRequest_MongoDBQueryGetParameterParams struct { func (x *StartActionRequest_MongoDBQueryGetParameterParams) Reset() { *x = StartActionRequest_MongoDBQueryGetParameterParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[43] + mi := &file_agentpb_agent_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2872,7 +3133,7 @@ func (x *StartActionRequest_MongoDBQueryGetParameterParams) String() string { func (*StartActionRequest_MongoDBQueryGetParameterParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryGetParameterParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[43] + mi := &file_agentpb_agent_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2918,7 +3179,7 @@ type StartActionRequest_MongoDBQueryBuildInfoParams struct { func (x *StartActionRequest_MongoDBQueryBuildInfoParams) Reset() { *x = StartActionRequest_MongoDBQueryBuildInfoParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[44] + mi := &file_agentpb_agent_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2931,7 +3192,7 @@ func (x *StartActionRequest_MongoDBQueryBuildInfoParams) String() string { func (*StartActionRequest_MongoDBQueryBuildInfoParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryBuildInfoParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[44] + mi := &file_agentpb_agent_proto_msgTypes[49] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2977,7 +3238,7 @@ type StartActionRequest_MongoDBQueryGetCmdLineOptsParams struct { func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) Reset() { *x = StartActionRequest_MongoDBQueryGetCmdLineOptsParams{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[45] + mi := &file_agentpb_agent_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2990,7 +3251,7 @@ func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) String() string { func (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams) ProtoMessage() {} func (x *StartActionRequest_MongoDBQueryGetCmdLineOptsParams) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[45] + mi := &file_agentpb_agent_proto_msgTypes[50] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3033,7 +3294,7 @@ type CheckConnectionResponse_Stats struct { func (x *CheckConnectionResponse_Stats) Reset() { *x = CheckConnectionResponse_Stats{} if protoimpl.UnsafeEnabled { - mi := &file_agentpb_agent_proto_msgTypes[46] + mi := &file_agentpb_agent_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3046,7 +3307,7 @@ func (x *CheckConnectionResponse_Stats) String() string { func (*CheckConnectionResponse_Stats) ProtoMessage() {} func (x *CheckConnectionResponse_Stats) ProtoReflect() protoreflect.Message { - mi := &file_agentpb_agent_proto_msgTypes[46] + mi := &file_agentpb_agent_proto_msgTypes[51] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3059,7 +3320,7 @@ func (x *CheckConnectionResponse_Stats) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckConnectionResponse_Stats.ProtoReflect.Descriptor instead. func (*CheckConnectionResponse_Stats) Descriptor() ([]byte, []int) { - return file_agentpb_agent_proto_rawDescGZIP(), []int{20, 0} + return file_agentpb_agent_proto_rawDescGZIP(), []int{22, 0} } func (x *CheckConnectionResponse_Stats) GetTableCount() int32 { @@ -3075,63 +3336,72 @@ var file_agentpb_agent_proto_rawDesc = []byte{ 0x0a, 0x13, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x1a, 0x17, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x70, 0x62, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x70, 0x62, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1a, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, - 0x09, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2e, 0x0a, - 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x64, - 0x65, 0x6c, 0x69, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, - 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x12, 0x30, 0x0a, - 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, 0x5f, - 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x65, 0x6d, - 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x1a, - 0x38, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x06, 0x0a, 0x04, 0x50, 0x69, 0x6e, - 0x67, 0x22, 0x45, 0x0a, 0x04, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x51, 0x41, 0x4e, 0x43, - 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, - 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0d, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x41, - 0x4e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x81, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x50, 0x6f, 0x72, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x07, 0x0a, - 0x0f, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x53, 0x0a, 0x0f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x70, 0x62, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1a, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, + 0x0a, 0x09, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x05, 0x66, + 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x2e, + 0x0a, 0x13, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x5f, + 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x65, 0x6d, + 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4c, 0x65, 0x66, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x6d, 0x12, 0x30, + 0x0a, 0x14, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x69, 0x67, 0x68, 0x74, + 0x5f, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x74, 0x65, + 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x69, 0x67, 0x68, 0x74, 0x44, 0x65, 0x6c, 0x69, 0x6d, + 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x06, 0x0a, 0x04, 0x50, 0x69, + 0x6e, 0x67, 0x22, 0x45, 0x0a, 0x04, 0x50, 0x6f, 0x6e, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x11, 0x51, 0x41, 0x4e, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, + 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x0d, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x51, + 0x41, 0x4e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdb, 0x09, + 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x53, 0x0a, 0x0f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, + 0x6e, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x74, + 0x69, 0x6e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x50, 0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, - 0x6e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xf4, 0x02, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x1a, 0xf4, 0x02, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, @@ -3181,382 +3451,430 @@ var file_agentpb_agent_proto_rawDesc = []byte{ 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x12, - 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xc0, 0x02, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x04, 0x62, - 0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, - 0x6c, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x75, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, - 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x6c, 0x69, - 0x63, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42, 0x06, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x41, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x6c, 0x69, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x60, + 0x0a, 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x29, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xe2, + 0xdf, 0x1f, 0x04, 0x18, 0x80, 0x80, 0x04, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x2b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x70, + 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x08, 0xe2, 0xdf, 0x1f, 0x04, 0x18, + 0x80, 0x80, 0x04, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x72, 0x74, + 0x1a, 0x59, 0x0a, 0x0c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa2, 0x01, 0x0a, 0x10, + 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3e, 0x0a, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x1a, 0x4e, 0x0a, 0x0c, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xc0, 0x02, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x6e, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x04, 0x62, 0x6f, 0x6f, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, + 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x01, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x2f, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x48, 0x00, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, + 0x12, 0x29, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x22, 0x41, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x12, 0x30, 0x0a, 0x03, 0x6d, 0x61, 0x70, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x2e, 0x4d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x4f, 0x0a, 0x08, 0x4d, + 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x12, 0x30, 0x0a, 0x03, 0x6d, - 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x2e, - 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x4f, 0x0a, - 0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, - 0x01, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, - 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x6c, 0x69, 0x63, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x64, - 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, - 0x52, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x22, 0xce, 0x19, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x60, 0x0a, 0x14, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x45, - 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7a, 0x0a, 0x1e, - 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1a, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7a, 0x0a, 0x1e, 0x6d, 0x79, 0x73, 0x71, - 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x34, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1a, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x85, 0x01, 0x0a, + 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6c, + 0x69, 0x63, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x64, 0x6f, 0x63, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x52, 0x04, + 0x64, 0x6f, 0x63, 0x73, 0x22, 0xce, 0x19, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x60, 0x0a, 0x14, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x12, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, + 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7a, 0x0a, 0x1e, 0x6d, 0x79, + 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, + 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1a, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7a, 0x0a, 0x1e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, + 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, - 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x14, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x68, - 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x89, 0x01, - 0x0a, 0x23, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, - 0x77, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x61, 0x67, + 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1a, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x68, 0x6f, + 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x67, 0x0a, 0x17, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x14, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x68, 0x6f, 0x77, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x23, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, + 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x76, 0x0a, 0x1c, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x48, 0x00, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x66, 0x0a, 0x16, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, 0x78, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, + 0x00, 0x52, 0x14, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x70, 0x74, 0x5f, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x54, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, + 0x0f, 0x70, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x6d, 0x0a, 0x19, 0x70, 0x74, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, + 0x54, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x16, 0x70, 0x74, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x64, 0x62, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x67, 0x0a, 0x17, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, + 0x68, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, + 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x48, 0x00, 0x52, 0x14, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, + 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x19, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, - 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x71, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x76, 0x0a, 0x1c, 0x70, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x71, 0x6c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x66, 0x0a, 0x16, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, 0x78, 0x70, - 0x6c, 0x61, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, - 0x67, 0x6f, 0x44, 0x42, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x48, 0x00, 0x52, 0x14, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x45, 0x78, 0x70, 0x6c, - 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x57, 0x0a, 0x11, 0x70, 0x74, 0x5f, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x50, 0x54, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, - 0x00, 0x52, 0x0f, 0x70, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x19, 0x70, 0x74, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, - 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x2e, 0x50, 0x54, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x16, 0x70, 0x74, 0x4d, 0x6f, 0x6e, - 0x67, 0x6f, 0x64, 0x62, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x67, 0x0a, 0x17, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x32, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x48, 0x00, 0x52, 0x14, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x19, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, + 0x16, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x76, 0x0a, 0x1c, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x68, 0x6f, 0x77, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, - 0x00, 0x52, 0x16, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x76, 0x0a, 0x1c, 0x70, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x68, - 0x6f, 0x77, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x34, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x33, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, - 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x7c, 0x0a, 0x1e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x48, 0x00, 0x52, 0x19, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x7c, 0x0a, 0x1e, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, + 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x85, 0x01, + 0x0a, 0x21, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x67, 0x65, 0x74, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x48, 0x00, 0x52, 0x1b, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x85, 0x01, 0x0a, 0x21, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x67, 0x65, 0x74, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7c, 0x0a, 0x1e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, - 0x64, 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, - 0x66, 0x6f, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x37, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, - 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, - 0x62, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x66, 0x6f, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x23, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, - 0x62, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x67, 0x65, 0x74, 0x63, 0x6d, 0x64, 0x6c, 0x69, - 0x6e, 0x65, 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x38, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, - 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6d, - 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, - 0x00, 0x52, 0x20, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x6f, 0x70, 0x74, 0x73, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x82, 0x01, 0x0a, 0x12, 0x4d, 0x79, 0x53, - 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x7c, 0x0a, 0x1e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x66, 0x6f, + 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x37, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x1b, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x66, 0x6f, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x23, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x67, 0x65, 0x74, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x6f, 0x70, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x38, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x6f, 0x6e, + 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6d, 0x64, 0x4c, + 0x69, 0x6e, 0x65, 0x4f, 0x70, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, + 0x20, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x6f, 0x70, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x82, 0x01, 0x0a, 0x12, 0x4d, 0x79, 0x53, 0x51, 0x4c, + 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, + 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0c, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x1a, 0x44, 0x0a, 0x1a, 0x4d, + 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x1a, 0x44, 0x0a, 0x1a, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x3e, 0x0a, 0x14, 0x4d, 0x79, 0x53, 0x51, 0x4c, + 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x1f, 0x50, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x1a, 0x43, 0x0a, 0x19, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, + 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, + 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x6f, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x44, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6c, - 0x61, 0x69, 0x6e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, - 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x1a, 0x44, 0x0a, - 0x1a, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, - 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x1a, 0x44, 0x0a, 0x1a, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x3e, 0x0a, 0x14, 0x4d, 0x79, 0x53, - 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x49, 0x0a, 0x1f, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, - 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, - 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x43, 0x0a, 0x19, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, - 0x51, 0x4c, 0x53, 0x68, 0x6f, 0x77, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x1a, 0x6f, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, - 0x67, 0x6f, 0x44, 0x42, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, - 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, - 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x11, 0x0a, 0x0f, 0x50, 0x54, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x78, 0x0a, - 0x16, 0x50, 0x54, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x3e, 0x0a, 0x14, 0x4d, 0x79, 0x53, 0x51, 0x4c, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, + 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x74, + 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x11, 0x0a, 0x0f, 0x50, 0x54, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x78, 0x0a, 0x16, 0x50, + 0x54, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x3e, 0x0a, 0x14, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x40, 0x0a, 0x16, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x40, 0x0a, 0x16, 0x4d, 0x79, 0x53, 0x51, 0x4c, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x2d, 0x0a, 0x19, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x1a, 0x45, 0x0a, 0x1b, 0x50, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, - 0x63, 0x0a, 0x1e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x2d, 0x0a, 0x19, 0x50, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x1a, 0x45, 0x0a, 0x1b, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x53, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x63, 0x0a, + 0x1e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, + 0x6e, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, + 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x1b, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x60, 0x0a, 0x1b, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x74, 0x65, 0x78, - 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x65, 0x0a, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, - 0x42, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6d, 0x64, 0x4c, 0x69, 0x6e, 0x65, - 0x4f, 0x70, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x2f, 0x0a, 0x0a, - 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x08, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, - 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x14, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x16, 0x0a, 0x14, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, - 0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x33, 0x0a, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, - 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x17, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x1a, 0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x04, 0x0a, 0x0c, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x04, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x12, - 0x41, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x71, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x51, 0x41, 0x4e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x48, 0x00, 0x52, 0x0a, 0x71, 0x61, 0x6e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, - 0x41, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6e, 0x67, 0x48, 0x00, 0x52, - 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x12, 0x36, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x48, 0x00, 0x52, 0x08, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, - 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x00, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, - 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x70, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, - 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x10, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, + 0x69, 0x6c, 0x65, 0x73, 0x1a, 0x65, 0x0a, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6d, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x4f, 0x70, + 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x6e, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x0a, 0x11, + 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x14, + 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x13, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x16, 0x0a, 0x14, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0a, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x23, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x08, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, + 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3b, 0x0a, + 0x0d, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x41, 0x63, 0x6b, 0x12, 0x2a, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xb6, 0x04, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6e, - 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x0d, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x3c, 0x0a, - 0x0b, 0x71, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x41, 0x4e, 0x43, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, - 0x0a, 0x71, 0x61, 0x6e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, - 0x00, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x21, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x69, - 0x6e, 0x67, 0x12, 0x35, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, - 0x08, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x74, 0x61, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x73, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x64, 0x73, 0x6e, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x09, + 0x74, 0x65, 0x78, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x17, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0xac, 0x05, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, + 0x04, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x71, 0x61, 0x6e, 0x5f, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x41, 0x4e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x71, 0x61, 0x6e, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x34, 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x48, 0x00, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x6e, + 0x67, 0x12, 0x36, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, + 0x08, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x74, 0x6f, - 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, - 0x00, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0xc4, 0x01, - 0x0a, 0x18, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x59, - 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x50, - 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, - 0x44, 0x10, 0x00, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, - 0x4c, 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, - 0x41, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x24, 0x0a, 0x20, + 0x1a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0b, 0x73, 0x74, + 0x6f, 0x70, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, + 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, + 0x61, 0x41, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, + 0x74, 0x61, 0x41, 0x63, 0x6b, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x22, 0xac, 0x05, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x6e, 0x67, 0x48, 0x00, 0x52, + 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x12, 0x42, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x71, 0x61, 0x6e, + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x41, 0x4e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x71, 0x61, 0x6e, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3e, 0x0a, 0x0f, 0x74, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x61, 0x63, 0x6b, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x41, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x41, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x04, 0x70, + 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x35, + 0x0a, 0x09, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x73, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x5f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x70, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x10, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x0a, 0x0b, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x44, 0x61, 0x74, 0x61, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, + 0xc4, 0x01, 0x0a, 0x18, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, - 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, - 0x10, 0x02, 0x12, 0x30, 0x0a, 0x2c, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4c, - 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, - 0x54, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, 0x4a, 0x53, - 0x4f, 0x4e, 0x10, 0x03, 0x32, 0x41, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, - 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x14, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x15, 0x5a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x41, + 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x27, 0x0a, 0x23, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, + 0x58, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, + 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x01, 0x12, 0x24, + 0x0a, 0x20, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x5f, + 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x53, + 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x30, 0x0a, 0x2c, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x5f, 0x45, 0x58, + 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x46, 0x4f, 0x52, + 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x5f, + 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x03, 0x32, 0x41, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, + 0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, + 0x14, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x15, 0x5a, 0x13, 0x61, 0x70, 0x69, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x70, 0x62, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3572,7 +3890,7 @@ func file_agentpb_agent_proto_rawDescGZIP() []byte { } var file_agentpb_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_agentpb_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 52) var file_agentpb_agent_proto_goTypes = []interface{}{ (MysqlExplainOutputFormat)(0), // 0: agent.MysqlExplainOutputFormat (*TextFiles)(nil), // 1: agent.TextFiles @@ -3594,113 +3912,128 @@ var file_agentpb_agent_proto_goTypes = []interface{}{ (*StopActionResponse)(nil), // 17: agent.StopActionResponse (*ActionResultRequest)(nil), // 18: agent.ActionResultRequest (*ActionResultResponse)(nil), // 19: agent.ActionResultResponse - (*CheckConnectionRequest)(nil), // 20: agent.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 21: agent.CheckConnectionResponse - (*AgentMessage)(nil), // 22: agent.AgentMessage - (*ServerMessage)(nil), // 23: agent.ServerMessage - nil, // 24: agent.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 25: agent.SetStateRequest.AgentProcess - nil, // 26: agent.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 27: agent.SetStateRequest.BuiltinAgent - nil, // 28: agent.SetStateRequest.BuiltinAgentsEntry - nil, // 29: agent.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 30: agent.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 31: agent.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 32: agent.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 33: agent.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 34: agent.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 35: agent.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 36: agent.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 37: agent.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 38: agent.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 39: agent.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 40: agent.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 41: agent.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 42: agent.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 43: agent.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 44: agent.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 45: agent.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 46: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*CheckConnectionResponse_Stats)(nil), // 47: agent.CheckConnectionResponse.Stats - (*timestamp.Timestamp)(nil), // 48: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 49: agent.MetricsBucket - (inventorypb.AgentStatus)(0), // 50: inventory.AgentStatus - (*duration.Duration)(nil), // 51: google.protobuf.Duration - (inventorypb.ServiceType)(0), // 52: inventory.ServiceType - (inventorypb.AgentType)(0), // 53: inventory.AgentType + (*TunnelData)(nil), // 20: agent.TunnelData + (*TunnelDataAck)(nil), // 21: agent.TunnelDataAck + (*CheckConnectionRequest)(nil), // 22: agent.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 23: agent.CheckConnectionResponse + (*AgentMessage)(nil), // 24: agent.AgentMessage + (*ServerMessage)(nil), // 25: agent.ServerMessage + nil, // 26: agent.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 27: agent.SetStateRequest.AgentProcess + nil, // 28: agent.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 29: agent.SetStateRequest.BuiltinAgent + nil, // 30: agent.SetStateRequest.BuiltinAgentsEntry + (*SetStateRequest_Tunnel)(nil), // 31: agent.SetStateRequest.Tunnel + nil, // 32: agent.SetStateRequest.TunnelsEntry + nil, // 33: agent.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 34: agent.SetStateResponse.TunnelsEntry + nil, // 35: agent.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 36: agent.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 37: agent.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 38: agent.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 39: agent.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 40: agent.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 41: agent.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 42: agent.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 43: agent.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 44: agent.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 45: agent.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 46: agent.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 47: agent.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 48: agent.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 49: agent.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 50: agent.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 51: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*CheckConnectionResponse_Stats)(nil), // 52: agent.CheckConnectionResponse.Stats + (*timestamp.Timestamp)(nil), // 53: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 54: agent.MetricsBucket + (inventorypb.AgentStatus)(0), // 55: inventory.AgentStatus + (*duration.Duration)(nil), // 56: google.protobuf.Duration + (*status.Status)(nil), // 57: google.rpc.Status + (inventorypb.ServiceType)(0), // 58: inventory.ServiceType + (inventorypb.AgentType)(0), // 59: inventory.AgentType } var file_agentpb_agent_proto_depIdxs = []int32{ - 24, // 0: agent.TextFiles.files:type_name -> agent.TextFiles.FilesEntry - 48, // 1: agent.Pong.current_time:type_name -> google.protobuf.Timestamp - 49, // 2: agent.QANCollectRequest.metrics_bucket:type_name -> agent.MetricsBucket - 50, // 3: agent.StateChangedRequest.status:type_name -> inventory.AgentStatus - 26, // 4: agent.SetStateRequest.agent_processes:type_name -> agent.SetStateRequest.AgentProcessesEntry - 28, // 5: agent.SetStateRequest.builtin_agents:type_name -> agent.SetStateRequest.BuiltinAgentsEntry - 48, // 6: agent.QueryActionValue.timestamp:type_name -> google.protobuf.Timestamp - 11, // 7: agent.QueryActionValue.slice:type_name -> agent.QueryActionSlice - 12, // 8: agent.QueryActionValue.map:type_name -> agent.QueryActionMap - 10, // 9: agent.QueryActionSlice.slice:type_name -> agent.QueryActionValue - 30, // 10: agent.QueryActionMap.map:type_name -> agent.QueryActionMap.MapEntry - 11, // 11: agent.QueryActionResult.rows:type_name -> agent.QueryActionSlice - 12, // 12: agent.QueryActionResult.docs:type_name -> agent.QueryActionMap - 31, // 13: agent.StartActionRequest.mysql_explain_params:type_name -> agent.StartActionRequest.MySQLExplainParams - 32, // 14: agent.StartActionRequest.mysql_show_create_table_params:type_name -> agent.StartActionRequest.MySQLShowCreateTableParams - 33, // 15: agent.StartActionRequest.mysql_show_table_status_params:type_name -> agent.StartActionRequest.MySQLShowTableStatusParams - 34, // 16: agent.StartActionRequest.mysql_show_index_params:type_name -> agent.StartActionRequest.MySQLShowIndexParams - 35, // 17: agent.StartActionRequest.postgresql_show_create_table_params:type_name -> agent.StartActionRequest.PostgreSQLShowCreateTableParams - 36, // 18: agent.StartActionRequest.postgresql_show_index_params:type_name -> agent.StartActionRequest.PostgreSQLShowIndexParams - 37, // 19: agent.StartActionRequest.mongodb_explain_params:type_name -> agent.StartActionRequest.MongoDBExplainParams - 38, // 20: agent.StartActionRequest.pt_summary_params:type_name -> agent.StartActionRequest.PTSummaryParams - 39, // 21: agent.StartActionRequest.pt_mongodb_summary_params:type_name -> agent.StartActionRequest.PTMongoDBSummaryParams - 40, // 22: agent.StartActionRequest.mysql_query_show_params:type_name -> agent.StartActionRequest.MySQLQueryShowParams - 41, // 23: agent.StartActionRequest.mysql_query_select_params:type_name -> agent.StartActionRequest.MySQLQuerySelectParams - 42, // 24: agent.StartActionRequest.postgresql_query_show_params:type_name -> agent.StartActionRequest.PostgreSQLQueryShowParams - 43, // 25: agent.StartActionRequest.postgresql_query_select_params:type_name -> agent.StartActionRequest.PostgreSQLQuerySelectParams - 44, // 26: agent.StartActionRequest.mongodb_query_getparameter_params:type_name -> agent.StartActionRequest.MongoDBQueryGetParameterParams - 45, // 27: agent.StartActionRequest.mongodb_query_buildinfo_params:type_name -> agent.StartActionRequest.MongoDBQueryBuildInfoParams - 46, // 28: agent.StartActionRequest.mongodb_query_getcmdlineopts_params:type_name -> agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - 51, // 29: agent.StartActionRequest.timeout:type_name -> google.protobuf.Duration - 52, // 30: agent.CheckConnectionRequest.type:type_name -> inventory.ServiceType - 51, // 31: agent.CheckConnectionRequest.timeout:type_name -> google.protobuf.Duration - 1, // 32: agent.CheckConnectionRequest.text_files:type_name -> agent.TextFiles - 47, // 33: agent.CheckConnectionResponse.stats:type_name -> agent.CheckConnectionResponse.Stats - 2, // 34: agent.AgentMessage.ping:type_name -> agent.Ping - 6, // 35: agent.AgentMessage.state_changed:type_name -> agent.StateChangedRequest - 4, // 36: agent.AgentMessage.qan_collect:type_name -> agent.QANCollectRequest - 18, // 37: agent.AgentMessage.action_result:type_name -> agent.ActionResultRequest - 3, // 38: agent.AgentMessage.pong:type_name -> agent.Pong - 9, // 39: agent.AgentMessage.set_state:type_name -> agent.SetStateResponse - 15, // 40: agent.AgentMessage.start_action:type_name -> agent.StartActionResponse - 17, // 41: agent.AgentMessage.stop_action:type_name -> agent.StopActionResponse - 21, // 42: agent.AgentMessage.check_connection:type_name -> agent.CheckConnectionResponse - 3, // 43: agent.ServerMessage.pong:type_name -> agent.Pong - 7, // 44: agent.ServerMessage.state_changed:type_name -> agent.StateChangedResponse - 5, // 45: agent.ServerMessage.qan_collect:type_name -> agent.QANCollectResponse - 19, // 46: agent.ServerMessage.action_result:type_name -> agent.ActionResultResponse - 2, // 47: agent.ServerMessage.ping:type_name -> agent.Ping - 8, // 48: agent.ServerMessage.set_state:type_name -> agent.SetStateRequest - 14, // 49: agent.ServerMessage.start_action:type_name -> agent.StartActionRequest - 16, // 50: agent.ServerMessage.stop_action:type_name -> agent.StopActionRequest - 20, // 51: agent.ServerMessage.check_connection:type_name -> agent.CheckConnectionRequest - 53, // 52: agent.SetStateRequest.AgentProcess.type:type_name -> inventory.AgentType - 29, // 53: agent.SetStateRequest.AgentProcess.text_files:type_name -> agent.SetStateRequest.AgentProcess.TextFilesEntry - 25, // 54: agent.SetStateRequest.AgentProcessesEntry.value:type_name -> agent.SetStateRequest.AgentProcess - 53, // 55: agent.SetStateRequest.BuiltinAgent.type:type_name -> inventory.AgentType - 1, // 56: agent.SetStateRequest.BuiltinAgent.text_files:type_name -> agent.TextFiles - 27, // 57: agent.SetStateRequest.BuiltinAgentsEntry.value:type_name -> agent.SetStateRequest.BuiltinAgent - 10, // 58: agent.QueryActionMap.MapEntry.value:type_name -> agent.QueryActionValue - 0, // 59: agent.StartActionRequest.MySQLExplainParams.output_format:type_name -> agent.MysqlExplainOutputFormat - 1, // 60: agent.StartActionRequest.MongoDBExplainParams.text_files:type_name -> agent.TextFiles - 1, // 61: agent.StartActionRequest.MongoDBQueryGetParameterParams.text_files:type_name -> agent.TextFiles - 1, // 62: agent.StartActionRequest.MongoDBQueryBuildInfoParams.text_files:type_name -> agent.TextFiles - 1, // 63: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams.text_files:type_name -> agent.TextFiles - 22, // 64: agent.Agent.Connect:input_type -> agent.AgentMessage - 23, // 65: agent.Agent.Connect:output_type -> agent.ServerMessage - 65, // [65:66] is the sub-list for method output_type - 64, // [64:65] is the sub-list for method input_type - 64, // [64:64] is the sub-list for extension type_name - 64, // [64:64] is the sub-list for extension extendee - 0, // [0:64] is the sub-list for field type_name + 26, // 0: agent.TextFiles.files:type_name -> agent.TextFiles.FilesEntry + 53, // 1: agent.Pong.current_time:type_name -> google.protobuf.Timestamp + 54, // 2: agent.QANCollectRequest.metrics_bucket:type_name -> agent.MetricsBucket + 55, // 3: agent.StateChangedRequest.status:type_name -> inventory.AgentStatus + 28, // 4: agent.SetStateRequest.agent_processes:type_name -> agent.SetStateRequest.AgentProcessesEntry + 30, // 5: agent.SetStateRequest.builtin_agents:type_name -> agent.SetStateRequest.BuiltinAgentsEntry + 32, // 6: agent.SetStateRequest.tunnels:type_name -> agent.SetStateRequest.TunnelsEntry + 34, // 7: agent.SetStateResponse.tunnels:type_name -> agent.SetStateResponse.TunnelsEntry + 53, // 8: agent.QueryActionValue.timestamp:type_name -> google.protobuf.Timestamp + 11, // 9: agent.QueryActionValue.slice:type_name -> agent.QueryActionSlice + 12, // 10: agent.QueryActionValue.map:type_name -> agent.QueryActionMap + 10, // 11: agent.QueryActionSlice.slice:type_name -> agent.QueryActionValue + 35, // 12: agent.QueryActionMap.map:type_name -> agent.QueryActionMap.MapEntry + 11, // 13: agent.QueryActionResult.rows:type_name -> agent.QueryActionSlice + 12, // 14: agent.QueryActionResult.docs:type_name -> agent.QueryActionMap + 36, // 15: agent.StartActionRequest.mysql_explain_params:type_name -> agent.StartActionRequest.MySQLExplainParams + 37, // 16: agent.StartActionRequest.mysql_show_create_table_params:type_name -> agent.StartActionRequest.MySQLShowCreateTableParams + 38, // 17: agent.StartActionRequest.mysql_show_table_status_params:type_name -> agent.StartActionRequest.MySQLShowTableStatusParams + 39, // 18: agent.StartActionRequest.mysql_show_index_params:type_name -> agent.StartActionRequest.MySQLShowIndexParams + 40, // 19: agent.StartActionRequest.postgresql_show_create_table_params:type_name -> agent.StartActionRequest.PostgreSQLShowCreateTableParams + 41, // 20: agent.StartActionRequest.postgresql_show_index_params:type_name -> agent.StartActionRequest.PostgreSQLShowIndexParams + 42, // 21: agent.StartActionRequest.mongodb_explain_params:type_name -> agent.StartActionRequest.MongoDBExplainParams + 43, // 22: agent.StartActionRequest.pt_summary_params:type_name -> agent.StartActionRequest.PTSummaryParams + 44, // 23: agent.StartActionRequest.pt_mongodb_summary_params:type_name -> agent.StartActionRequest.PTMongoDBSummaryParams + 45, // 24: agent.StartActionRequest.mysql_query_show_params:type_name -> agent.StartActionRequest.MySQLQueryShowParams + 46, // 25: agent.StartActionRequest.mysql_query_select_params:type_name -> agent.StartActionRequest.MySQLQuerySelectParams + 47, // 26: agent.StartActionRequest.postgresql_query_show_params:type_name -> agent.StartActionRequest.PostgreSQLQueryShowParams + 48, // 27: agent.StartActionRequest.postgresql_query_select_params:type_name -> agent.StartActionRequest.PostgreSQLQuerySelectParams + 49, // 28: agent.StartActionRequest.mongodb_query_getparameter_params:type_name -> agent.StartActionRequest.MongoDBQueryGetParameterParams + 50, // 29: agent.StartActionRequest.mongodb_query_buildinfo_params:type_name -> agent.StartActionRequest.MongoDBQueryBuildInfoParams + 51, // 30: agent.StartActionRequest.mongodb_query_getcmdlineopts_params:type_name -> agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + 56, // 31: agent.StartActionRequest.timeout:type_name -> google.protobuf.Duration + 57, // 32: agent.TunnelDataAck.status:type_name -> google.rpc.Status + 58, // 33: agent.CheckConnectionRequest.type:type_name -> inventory.ServiceType + 56, // 34: agent.CheckConnectionRequest.timeout:type_name -> google.protobuf.Duration + 1, // 35: agent.CheckConnectionRequest.text_files:type_name -> agent.TextFiles + 52, // 36: agent.CheckConnectionResponse.stats:type_name -> agent.CheckConnectionResponse.Stats + 2, // 37: agent.AgentMessage.ping:type_name -> agent.Ping + 6, // 38: agent.AgentMessage.state_changed:type_name -> agent.StateChangedRequest + 4, // 39: agent.AgentMessage.qan_collect:type_name -> agent.QANCollectRequest + 18, // 40: agent.AgentMessage.action_result:type_name -> agent.ActionResultRequest + 20, // 41: agent.AgentMessage.tunnel_data:type_name -> agent.TunnelData + 3, // 42: agent.AgentMessage.pong:type_name -> agent.Pong + 9, // 43: agent.AgentMessage.set_state:type_name -> agent.SetStateResponse + 15, // 44: agent.AgentMessage.start_action:type_name -> agent.StartActionResponse + 17, // 45: agent.AgentMessage.stop_action:type_name -> agent.StopActionResponse + 23, // 46: agent.AgentMessage.check_connection:type_name -> agent.CheckConnectionResponse + 21, // 47: agent.AgentMessage.tunnel_data_ack:type_name -> agent.TunnelDataAck + 3, // 48: agent.ServerMessage.pong:type_name -> agent.Pong + 7, // 49: agent.ServerMessage.state_changed:type_name -> agent.StateChangedResponse + 5, // 50: agent.ServerMessage.qan_collect:type_name -> agent.QANCollectResponse + 19, // 51: agent.ServerMessage.action_result:type_name -> agent.ActionResultResponse + 21, // 52: agent.ServerMessage.tunnel_data_ack:type_name -> agent.TunnelDataAck + 2, // 53: agent.ServerMessage.ping:type_name -> agent.Ping + 8, // 54: agent.ServerMessage.set_state:type_name -> agent.SetStateRequest + 14, // 55: agent.ServerMessage.start_action:type_name -> agent.StartActionRequest + 16, // 56: agent.ServerMessage.stop_action:type_name -> agent.StopActionRequest + 22, // 57: agent.ServerMessage.check_connection:type_name -> agent.CheckConnectionRequest + 20, // 58: agent.ServerMessage.tunnel_data:type_name -> agent.TunnelData + 59, // 59: agent.SetStateRequest.AgentProcess.type:type_name -> inventory.AgentType + 33, // 60: agent.SetStateRequest.AgentProcess.text_files:type_name -> agent.SetStateRequest.AgentProcess.TextFilesEntry + 27, // 61: agent.SetStateRequest.AgentProcessesEntry.value:type_name -> agent.SetStateRequest.AgentProcess + 59, // 62: agent.SetStateRequest.BuiltinAgent.type:type_name -> inventory.AgentType + 1, // 63: agent.SetStateRequest.BuiltinAgent.text_files:type_name -> agent.TextFiles + 29, // 64: agent.SetStateRequest.BuiltinAgentsEntry.value:type_name -> agent.SetStateRequest.BuiltinAgent + 31, // 65: agent.SetStateRequest.TunnelsEntry.value:type_name -> agent.SetStateRequest.Tunnel + 57, // 66: agent.SetStateResponse.TunnelsEntry.value:type_name -> google.rpc.Status + 10, // 67: agent.QueryActionMap.MapEntry.value:type_name -> agent.QueryActionValue + 0, // 68: agent.StartActionRequest.MySQLExplainParams.output_format:type_name -> agent.MysqlExplainOutputFormat + 1, // 69: agent.StartActionRequest.MongoDBExplainParams.text_files:type_name -> agent.TextFiles + 1, // 70: agent.StartActionRequest.MongoDBQueryGetParameterParams.text_files:type_name -> agent.TextFiles + 1, // 71: agent.StartActionRequest.MongoDBQueryBuildInfoParams.text_files:type_name -> agent.TextFiles + 1, // 72: agent.StartActionRequest.MongoDBQueryGetCmdLineOptsParams.text_files:type_name -> agent.TextFiles + 24, // 73: agent.Agent.Connect:input_type -> agent.AgentMessage + 25, // 74: agent.Agent.Connect:output_type -> agent.ServerMessage + 74, // [74:75] is the sub-list for method output_type + 73, // [73:74] is the sub-list for method input_type + 73, // [73:73] is the sub-list for extension type_name + 73, // [73:73] is the sub-list for extension extendee + 0, // [0:73] is the sub-list for field type_name } func init() { file_agentpb_agent_proto_init() } @@ -3939,7 +4272,7 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckConnectionRequest); i { + switch v := v.(*TunnelData); i { case 0: return &v.state case 1: @@ -3951,7 +4284,7 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckConnectionResponse); i { + switch v := v.(*TunnelDataAck); i { case 0: return &v.state case 1: @@ -3963,7 +4296,7 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AgentMessage); i { + switch v := v.(*CheckConnectionRequest); i { case 0: return &v.state case 1: @@ -3975,7 +4308,19 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerMessage); i { + switch v := v.(*CheckConnectionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agentpb_agent_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AgentMessage); i { case 0: return &v.state case 1: @@ -3987,7 +4332,7 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetStateRequest_AgentProcess); i { + switch v := v.(*ServerMessage); i { case 0: return &v.state case 1: @@ -3999,6 +4344,18 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStateRequest_AgentProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agentpb_agent_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetStateRequest_BuiltinAgent); i { case 0: return &v.state @@ -4011,6 +4368,18 @@ func file_agentpb_agent_proto_init() { } } file_agentpb_agent_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetStateRequest_Tunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agentpb_agent_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLExplainParams); i { case 0: return &v.state @@ -4022,7 +4391,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLShowCreateTableParams); i { case 0: return &v.state @@ -4034,7 +4403,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLShowTableStatusParams); i { case 0: return &v.state @@ -4046,7 +4415,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLShowIndexParams); i { case 0: return &v.state @@ -4058,7 +4427,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PostgreSQLShowCreateTableParams); i { case 0: return &v.state @@ -4070,7 +4439,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PostgreSQLShowIndexParams); i { case 0: return &v.state @@ -4082,7 +4451,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MongoDBExplainParams); i { case 0: return &v.state @@ -4094,7 +4463,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PTSummaryParams); i { case 0: return &v.state @@ -4106,7 +4475,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PTMongoDBSummaryParams); i { case 0: return &v.state @@ -4118,7 +4487,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLQueryShowParams); i { case 0: return &v.state @@ -4130,7 +4499,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MySQLQuerySelectParams); i { case 0: return &v.state @@ -4142,7 +4511,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PostgreSQLQueryShowParams); i { case 0: return &v.state @@ -4154,7 +4523,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_PostgreSQLQuerySelectParams); i { case 0: return &v.state @@ -4166,7 +4535,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MongoDBQueryGetParameterParams); i { case 0: return &v.state @@ -4178,7 +4547,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MongoDBQueryBuildInfoParams); i { case 0: return &v.state @@ -4190,7 +4559,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartActionRequest_MongoDBQueryGetCmdLineOptsParams); i { case 0: return &v.state @@ -4202,7 +4571,7 @@ func file_agentpb_agent_proto_init() { return nil } } - file_agentpb_agent_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + file_agentpb_agent_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CheckConnectionResponse_Stats); i { case 0: return &v.state @@ -4244,27 +4613,31 @@ func file_agentpb_agent_proto_init() { (*StartActionRequest_MongodbQueryBuildinfoParams)(nil), (*StartActionRequest_MongodbQueryGetcmdlineoptsParams)(nil), } - file_agentpb_agent_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_agentpb_agent_proto_msgTypes[23].OneofWrappers = []interface{}{ (*AgentMessage_Ping)(nil), (*AgentMessage_StateChanged)(nil), (*AgentMessage_QanCollect)(nil), (*AgentMessage_ActionResult)(nil), + (*AgentMessage_TunnelData)(nil), (*AgentMessage_Pong)(nil), (*AgentMessage_SetState)(nil), (*AgentMessage_StartAction)(nil), (*AgentMessage_StopAction)(nil), (*AgentMessage_CheckConnection)(nil), + (*AgentMessage_TunnelDataAck)(nil), } - file_agentpb_agent_proto_msgTypes[22].OneofWrappers = []interface{}{ + file_agentpb_agent_proto_msgTypes[24].OneofWrappers = []interface{}{ (*ServerMessage_Pong)(nil), (*ServerMessage_StateChanged)(nil), (*ServerMessage_QanCollect)(nil), (*ServerMessage_ActionResult)(nil), + (*ServerMessage_TunnelDataAck)(nil), (*ServerMessage_Ping)(nil), (*ServerMessage_SetState)(nil), (*ServerMessage_StartAction)(nil), (*ServerMessage_StopAction)(nil), (*ServerMessage_CheckConnection)(nil), + (*ServerMessage_TunnelData)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -4272,7 +4645,7 @@ func file_agentpb_agent_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_agentpb_agent_proto_rawDesc, NumEnums: 1, - NumMessages: 47, + NumMessages: 52, NumExtensions: 0, NumServices: 1, }, @@ -4353,7 +4726,7 @@ type UnimplementedAgentServer struct { } func (*UnimplementedAgentServer) Connect(Agent_ConnectServer) error { - return status.Errorf(codes.Unimplemented, "method Connect not implemented") + return status1.Errorf(codes.Unimplemented, "method Connect not implemented") } func RegisterAgentServer(s *grpc.Server, srv AgentServer) { diff --git a/vendor/github.com/percona/pmm/api/agentpb/agent.validator.pb.go b/vendor/github.com/percona/pmm/api/agentpb/agent.validator.pb.go index 0371361ba..499c5f932 100644 --- a/vendor/github.com/percona/pmm/api/agentpb/agent.validator.pb.go +++ b/vendor/github.com/percona/pmm/api/agentpb/agent.validator.pb.go @@ -8,8 +8,10 @@ import ( proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/duration" _ "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/mwitkow/go-proto-validators" github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" _ "github.com/percona/pmm/api/inventorypb" + _ "google.golang.org/genproto/googleapis/rpc/status" math "math" ) @@ -53,6 +55,7 @@ func (this *StateChangedResponse) Validate() error { return nil } func (this *SetStateRequest) Validate() error { + // Validation of proto3 map<> fields is unsupported. // Validation of proto3 map<> fields is unsupported. // Validation of proto3 map<> fields is unsupported. return nil @@ -69,7 +72,17 @@ func (this *SetStateRequest_BuiltinAgent) Validate() error { } return nil } +func (this *SetStateRequest_Tunnel) Validate() error { + if !(this.ListenPort < 65536) { + return github_com_mwitkow_go_proto_validators.FieldError("ListenPort", fmt.Errorf(`value '%v' must be less than '65536'`, this.ListenPort)) + } + if !(this.ConnectPort < 65536) { + return github_com_mwitkow_go_proto_validators.FieldError("ConnectPort", fmt.Errorf(`value '%v' must be less than '65536'`, this.ConnectPort)) + } + return nil +} func (this *SetStateResponse) Validate() error { + // Validation of proto3 map<> fields is unsupported. return nil } func (this *QueryActionValue) Validate() error { @@ -330,6 +343,23 @@ func (this *ActionResultRequest) Validate() error { func (this *ActionResultResponse) Validate() error { return nil } +func (this *TunnelData) Validate() error { + if this.TunnelId == "" { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelId", fmt.Errorf(`value '%v' must not be an empty string`, this.TunnelId)) + } + if this.ConnectionId == "" { + return github_com_mwitkow_go_proto_validators.FieldError("ConnectionId", fmt.Errorf(`value '%v' must not be an empty string`, this.ConnectionId)) + } + return nil +} +func (this *TunnelDataAck) Validate() error { + if this.Status != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Status); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Status", err) + } + } + return nil +} func (this *CheckConnectionRequest) Validate() error { if this.Timeout != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Timeout); err != nil { @@ -383,6 +413,13 @@ func (this *AgentMessage) Validate() error { } } } + if oneOfNester, ok := this.GetPayload().(*AgentMessage_TunnelData); ok { + if oneOfNester.TunnelData != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TunnelData); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelData", err) + } + } + } if oneOfNester, ok := this.GetPayload().(*AgentMessage_Pong); ok { if oneOfNester.Pong != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.Pong); err != nil { @@ -418,6 +455,13 @@ func (this *AgentMessage) Validate() error { } } } + if oneOfNester, ok := this.GetPayload().(*AgentMessage_TunnelDataAck); ok { + if oneOfNester.TunnelDataAck != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TunnelDataAck); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelDataAck", err) + } + } + } return nil } func (this *ServerMessage) Validate() error { @@ -449,6 +493,13 @@ func (this *ServerMessage) Validate() error { } } } + if oneOfNester, ok := this.GetPayload().(*ServerMessage_TunnelDataAck); ok { + if oneOfNester.TunnelDataAck != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TunnelDataAck); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelDataAck", err) + } + } + } if oneOfNester, ok := this.GetPayload().(*ServerMessage_Ping); ok { if oneOfNester.Ping != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.Ping); err != nil { @@ -484,5 +535,12 @@ func (this *ServerMessage) Validate() error { } } } + if oneOfNester, ok := this.GetPayload().(*ServerMessage_TunnelData); ok { + if oneOfNester.TunnelData != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TunnelData); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelData", err) + } + } + } return nil } diff --git a/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.go b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.go new file mode 100644 index 000000000..70ca83e13 --- /dev/null +++ b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.go @@ -0,0 +1,805 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: inventorypb/tunnels.proto + +package inventorypb + +import ( + context "context" + proto "github.com/golang/protobuf/proto" + _ "github.com/mwitkow/go-proto-validators" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +// Tunnel represents a single Tunnel configuration. +type Tunnel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tunnel ID. + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` + // Agent ID of the listening pmm-agent. + ListenAgentId string `protobuf:"bytes,2,opt,name=listen_agent_id,json=listenAgentId,proto3" json:"listen_agent_id,omitempty"` + // Listen port of the listening pmm-agent. + ListenPort uint32 `protobuf:"varint,3,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` + // Agent ID of the connecting pmm-agent. + ConnectAgentId string `protobuf:"bytes,4,opt,name=connect_agent_id,json=connectAgentId,proto3" json:"connect_agent_id,omitempty"` + // Target port of the connecting pmm-agent. + ConnectPort uint32 `protobuf:"varint,5,opt,name=connect_port,json=connectPort,proto3" json:"connect_port,omitempty"` +} + +func (x *Tunnel) Reset() { + *x = Tunnel{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tunnel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tunnel) ProtoMessage() {} + +func (x *Tunnel) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tunnel.ProtoReflect.Descriptor instead. +func (*Tunnel) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{0} +} + +func (x *Tunnel) GetTunnelId() string { + if x != nil { + return x.TunnelId + } + return "" +} + +func (x *Tunnel) GetListenAgentId() string { + if x != nil { + return x.ListenAgentId + } + return "" +} + +func (x *Tunnel) GetListenPort() uint32 { + if x != nil { + return x.ListenPort + } + return 0 +} + +func (x *Tunnel) GetConnectAgentId() string { + if x != nil { + return x.ConnectAgentId + } + return "" +} + +func (x *Tunnel) GetConnectPort() uint32 { + if x != nil { + return x.ConnectPort + } + return 0 +} + +type ListTunnelsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Return only Tunnels where one (or both) pmm-agent has this ID. + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` +} + +func (x *ListTunnelsRequest) Reset() { + *x = ListTunnelsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTunnelsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTunnelsRequest) ProtoMessage() {} + +func (x *ListTunnelsRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTunnelsRequest.ProtoReflect.Descriptor instead. +func (*ListTunnelsRequest) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{1} +} + +func (x *ListTunnelsRequest) GetAgentId() string { + if x != nil { + return x.AgentId + } + return "" +} + +type ListTunnelsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tunnel []*Tunnel `protobuf:"bytes,1,rep,name=tunnel,proto3" json:"tunnel,omitempty"` +} + +func (x *ListTunnelsResponse) Reset() { + *x = ListTunnelsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListTunnelsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListTunnelsResponse) ProtoMessage() {} + +func (x *ListTunnelsResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListTunnelsResponse.ProtoReflect.Descriptor instead. +func (*ListTunnelsResponse) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{2} +} + +func (x *ListTunnelsResponse) GetTunnel() []*Tunnel { + if x != nil { + return x.Tunnel + } + return nil +} + +type AddTunnelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Agent ID of the listening pmm-agent. + ListenAgentId string `protobuf:"bytes,1,opt,name=listen_agent_id,json=listenAgentId,proto3" json:"listen_agent_id,omitempty"` + // Listen port of the listening pmm-agent. + ListenPort uint32 `protobuf:"varint,2,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` + // Agent ID of the connecting pmm-agent. + ConnectAgentId string `protobuf:"bytes,3,opt,name=connect_agent_id,json=connectAgentId,proto3" json:"connect_agent_id,omitempty"` + // Target port of the connecting pmm-agent. + ConnectPort uint32 `protobuf:"varint,4,opt,name=connect_port,json=connectPort,proto3" json:"connect_port,omitempty"` +} + +func (x *AddTunnelRequest) Reset() { + *x = AddTunnelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddTunnelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddTunnelRequest) ProtoMessage() {} + +func (x *AddTunnelRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddTunnelRequest.ProtoReflect.Descriptor instead. +func (*AddTunnelRequest) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{3} +} + +func (x *AddTunnelRequest) GetListenAgentId() string { + if x != nil { + return x.ListenAgentId + } + return "" +} + +func (x *AddTunnelRequest) GetListenPort() uint32 { + if x != nil { + return x.ListenPort + } + return 0 +} + +func (x *AddTunnelRequest) GetConnectAgentId() string { + if x != nil { + return x.ConnectAgentId + } + return "" +} + +func (x *AddTunnelRequest) GetConnectPort() uint32 { + if x != nil { + return x.ConnectPort + } + return 0 +} + +type AddTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Tunnel ID. + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (x *AddTunnelResponse) Reset() { + *x = AddTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddTunnelResponse) ProtoMessage() {} + +func (x *AddTunnelResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddTunnelResponse.ProtoReflect.Descriptor instead. +func (*AddTunnelResponse) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{4} +} + +func (x *AddTunnelResponse) GetTunnelId() string { + if x != nil { + return x.TunnelId + } + return "" +} + +type RemoveTunnelRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TunnelId string `protobuf:"bytes,1,opt,name=tunnel_id,json=tunnelId,proto3" json:"tunnel_id,omitempty"` +} + +func (x *RemoveTunnelRequest) Reset() { + *x = RemoveTunnelRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveTunnelRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveTunnelRequest) ProtoMessage() {} + +func (x *RemoveTunnelRequest) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveTunnelRequest.ProtoReflect.Descriptor instead. +func (*RemoveTunnelRequest) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{5} +} + +func (x *RemoveTunnelRequest) GetTunnelId() string { + if x != nil { + return x.TunnelId + } + return "" +} + +type RemoveTunnelResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RemoveTunnelResponse) Reset() { + *x = RemoveTunnelResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inventorypb_tunnels_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveTunnelResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveTunnelResponse) ProtoMessage() {} + +func (x *RemoveTunnelResponse) ProtoReflect() protoreflect.Message { + mi := &file_inventorypb_tunnels_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveTunnelResponse.ProtoReflect.Descriptor instead. +func (*RemoveTunnelResponse) Descriptor() ([]byte, []int) { + return file_inventorypb_tunnels_proto_rawDescGZIP(), []int{6} +} + +var File_inventorypb_tunnels_proto protoreflect.FileDescriptor + +var file_inventorypb_tunnels_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x2f, 0x74, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, + 0x06, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x28, 0x0a, + 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x2f, 0x0a, 0x12, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x06, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0xd0, 0x01, + 0x0a, 0x10, 0x41, 0x64, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, + 0x02, 0x58, 0x01, 0x52, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xe2, 0xdf, 0x1f, 0x06, 0x10, 0x00, 0x18, + 0x80, 0x80, 0x04, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, + 0x30, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x58, + 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, + 0x64, 0x12, 0x2d, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0a, 0xe2, 0xdf, 0x1f, 0x06, 0x10, 0x00, 0x18, + 0x80, 0x80, 0x04, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x50, 0x6f, 0x72, 0x74, + 0x22, 0x30, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x49, 0x64, 0x22, 0x3a, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x6e, + 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, 0x74, 0x75, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0xdf, + 0x1f, 0x02, 0x58, 0x01, 0x52, 0x08, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x22, 0x16, + 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe6, 0x02, 0x0a, 0x07, 0x54, 0x75, 0x6e, 0x6e, 0x65, + 0x6c, 0x73, 0x12, 0x73, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x12, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, + 0x4c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x6c, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x41, 0x64, 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x41, 0x64, + 0x64, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x41, + 0x64, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x78, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, + 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, + 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x54, 0x75, + 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x2f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x3a, 0x01, 0x2a, 0x42, + 0x1d, 0x5a, 0x1b, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x70, 0x62, 0x3b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_inventorypb_tunnels_proto_rawDescOnce sync.Once + file_inventorypb_tunnels_proto_rawDescData = file_inventorypb_tunnels_proto_rawDesc +) + +func file_inventorypb_tunnels_proto_rawDescGZIP() []byte { + file_inventorypb_tunnels_proto_rawDescOnce.Do(func() { + file_inventorypb_tunnels_proto_rawDescData = protoimpl.X.CompressGZIP(file_inventorypb_tunnels_proto_rawDescData) + }) + return file_inventorypb_tunnels_proto_rawDescData +} + +var file_inventorypb_tunnels_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_inventorypb_tunnels_proto_goTypes = []interface{}{ + (*Tunnel)(nil), // 0: inventory.Tunnel + (*ListTunnelsRequest)(nil), // 1: inventory.ListTunnelsRequest + (*ListTunnelsResponse)(nil), // 2: inventory.ListTunnelsResponse + (*AddTunnelRequest)(nil), // 3: inventory.AddTunnelRequest + (*AddTunnelResponse)(nil), // 4: inventory.AddTunnelResponse + (*RemoveTunnelRequest)(nil), // 5: inventory.RemoveTunnelRequest + (*RemoveTunnelResponse)(nil), // 6: inventory.RemoveTunnelResponse +} +var file_inventorypb_tunnels_proto_depIdxs = []int32{ + 0, // 0: inventory.ListTunnelsResponse.tunnel:type_name -> inventory.Tunnel + 1, // 1: inventory.Tunnels.ListTunnels:input_type -> inventory.ListTunnelsRequest + 3, // 2: inventory.Tunnels.AddTunnel:input_type -> inventory.AddTunnelRequest + 5, // 3: inventory.Tunnels.RemoveTunnel:input_type -> inventory.RemoveTunnelRequest + 2, // 4: inventory.Tunnels.ListTunnels:output_type -> inventory.ListTunnelsResponse + 4, // 5: inventory.Tunnels.AddTunnel:output_type -> inventory.AddTunnelResponse + 6, // 6: inventory.Tunnels.RemoveTunnel:output_type -> inventory.RemoveTunnelResponse + 4, // [4:7] is the sub-list for method output_type + 1, // [1:4] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_inventorypb_tunnels_proto_init() } +func file_inventorypb_tunnels_proto_init() { + if File_inventorypb_tunnels_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_inventorypb_tunnels_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tunnel); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTunnelsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTunnelsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddTunnelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveTunnelRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inventorypb_tunnels_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveTunnelResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_inventorypb_tunnels_proto_rawDesc, + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_inventorypb_tunnels_proto_goTypes, + DependencyIndexes: file_inventorypb_tunnels_proto_depIdxs, + MessageInfos: file_inventorypb_tunnels_proto_msgTypes, + }.Build() + File_inventorypb_tunnels_proto = out.File + file_inventorypb_tunnels_proto_rawDesc = nil + file_inventorypb_tunnels_proto_goTypes = nil + file_inventorypb_tunnels_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// TunnelsClient is the client API for Tunnels service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TunnelsClient interface { + // ListTunnels returns a list of all Tunnels. + ListTunnels(ctx context.Context, in *ListTunnelsRequest, opts ...grpc.CallOption) (*ListTunnelsResponse, error) + // AddTunnel adds a Tunnel. + AddTunnel(ctx context.Context, in *AddTunnelRequest, opts ...grpc.CallOption) (*AddTunnelResponse, error) + // RemoveTunnel removes a Tunnel. + RemoveTunnel(ctx context.Context, in *RemoveTunnelRequest, opts ...grpc.CallOption) (*RemoveTunnelResponse, error) +} + +type tunnelsClient struct { + cc grpc.ClientConnInterface +} + +func NewTunnelsClient(cc grpc.ClientConnInterface) TunnelsClient { + return &tunnelsClient{cc} +} + +func (c *tunnelsClient) ListTunnels(ctx context.Context, in *ListTunnelsRequest, opts ...grpc.CallOption) (*ListTunnelsResponse, error) { + out := new(ListTunnelsResponse) + err := c.cc.Invoke(ctx, "/inventory.Tunnels/ListTunnels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tunnelsClient) AddTunnel(ctx context.Context, in *AddTunnelRequest, opts ...grpc.CallOption) (*AddTunnelResponse, error) { + out := new(AddTunnelResponse) + err := c.cc.Invoke(ctx, "/inventory.Tunnels/AddTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *tunnelsClient) RemoveTunnel(ctx context.Context, in *RemoveTunnelRequest, opts ...grpc.CallOption) (*RemoveTunnelResponse, error) { + out := new(RemoveTunnelResponse) + err := c.cc.Invoke(ctx, "/inventory.Tunnels/RemoveTunnel", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TunnelsServer is the server API for Tunnels service. +type TunnelsServer interface { + // ListTunnels returns a list of all Tunnels. + ListTunnels(context.Context, *ListTunnelsRequest) (*ListTunnelsResponse, error) + // AddTunnel adds a Tunnel. + AddTunnel(context.Context, *AddTunnelRequest) (*AddTunnelResponse, error) + // RemoveTunnel removes a Tunnel. + RemoveTunnel(context.Context, *RemoveTunnelRequest) (*RemoveTunnelResponse, error) +} + +// UnimplementedTunnelsServer can be embedded to have forward compatible implementations. +type UnimplementedTunnelsServer struct { +} + +func (*UnimplementedTunnelsServer) ListTunnels(context.Context, *ListTunnelsRequest) (*ListTunnelsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListTunnels not implemented") +} +func (*UnimplementedTunnelsServer) AddTunnel(context.Context, *AddTunnelRequest) (*AddTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddTunnel not implemented") +} +func (*UnimplementedTunnelsServer) RemoveTunnel(context.Context, *RemoveTunnelRequest) (*RemoveTunnelResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveTunnel not implemented") +} + +func RegisterTunnelsServer(s *grpc.Server, srv TunnelsServer) { + s.RegisterService(&_Tunnels_serviceDesc, srv) +} + +func _Tunnels_ListTunnels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTunnelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TunnelsServer).ListTunnels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/inventory.Tunnels/ListTunnels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TunnelsServer).ListTunnels(ctx, req.(*ListTunnelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Tunnels_AddTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddTunnelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TunnelsServer).AddTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/inventory.Tunnels/AddTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TunnelsServer).AddTunnel(ctx, req.(*AddTunnelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Tunnels_RemoveTunnel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveTunnelRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TunnelsServer).RemoveTunnel(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/inventory.Tunnels/RemoveTunnel", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TunnelsServer).RemoveTunnel(ctx, req.(*RemoveTunnelRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Tunnels_serviceDesc = grpc.ServiceDesc{ + ServiceName: "inventory.Tunnels", + HandlerType: (*TunnelsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListTunnels", + Handler: _Tunnels_ListTunnels_Handler, + }, + { + MethodName: "AddTunnel", + Handler: _Tunnels_AddTunnel_Handler, + }, + { + MethodName: "RemoveTunnel", + Handler: _Tunnels_RemoveTunnel_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "inventorypb/tunnels.proto", +} diff --git a/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.gw.go b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.gw.go new file mode 100644 index 000000000..46bf90346 --- /dev/null +++ b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.pb.gw.go @@ -0,0 +1,331 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: inventorypb/tunnels.proto + +/* +Package inventorypb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package inventorypb + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Tunnels_ListTunnels_0(ctx context.Context, marshaler runtime.Marshaler, client TunnelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTunnelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListTunnels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Tunnels_ListTunnels_0(ctx context.Context, marshaler runtime.Marshaler, server TunnelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListTunnelsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListTunnels(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Tunnels_AddTunnel_0(ctx context.Context, marshaler runtime.Marshaler, client TunnelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddTunnelRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddTunnel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Tunnels_AddTunnel_0(ctx context.Context, marshaler runtime.Marshaler, server TunnelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddTunnelRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddTunnel(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Tunnels_RemoveTunnel_0(ctx context.Context, marshaler runtime.Marshaler, client TunnelsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveTunnelRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveTunnel(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Tunnels_RemoveTunnel_0(ctx context.Context, marshaler runtime.Marshaler, server TunnelsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveTunnelRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveTunnel(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTunnelsHandlerServer registers the http handlers for service Tunnels to "mux". +// UnaryRPC :call TunnelsServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTunnelsHandlerFromEndpoint instead. +func RegisterTunnelsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TunnelsServer) error { + + mux.Handle("POST", pattern_Tunnels_ListTunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Tunnels_ListTunnels_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_ListTunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Tunnels_AddTunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Tunnels_AddTunnel_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_AddTunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Tunnels_RemoveTunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Tunnels_RemoveTunnel_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_RemoveTunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterTunnelsHandlerFromEndpoint is same as RegisterTunnelsHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTunnelsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterTunnelsHandler(ctx, mux, conn) +} + +// RegisterTunnelsHandler registers the http handlers for service Tunnels to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTunnelsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTunnelsHandlerClient(ctx, mux, NewTunnelsClient(conn)) +} + +// RegisterTunnelsHandlerClient registers the http handlers for service Tunnels +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TunnelsClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TunnelsClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TunnelsClient" to call the correct interceptors. +func RegisterTunnelsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TunnelsClient) error { + + mux.Handle("POST", pattern_Tunnels_ListTunnels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Tunnels_ListTunnels_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_ListTunnels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Tunnels_AddTunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Tunnels_AddTunnel_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_AddTunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Tunnels_RemoveTunnel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Tunnels_RemoveTunnel_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Tunnels_RemoveTunnel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Tunnels_ListTunnels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Tunnels", "List"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Tunnels_AddTunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Tunnels", "Add"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Tunnels_RemoveTunnel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "inventory", "Tunnels", "Remove"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_Tunnels_ListTunnels_0 = runtime.ForwardResponseMessage + + forward_Tunnels_AddTunnel_0 = runtime.ForwardResponseMessage + + forward_Tunnels_RemoveTunnel_0 = runtime.ForwardResponseMessage +) diff --git a/vendor/github.com/percona/pmm/api/inventorypb/tunnels.validator.pb.go b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.validator.pb.go new file mode 100644 index 000000000..4560c6c51 --- /dev/null +++ b/vendor/github.com/percona/pmm/api/inventorypb/tunnels.validator.pb.go @@ -0,0 +1,68 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: inventorypb/tunnels.proto + +package inventorypb + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + _ "github.com/mwitkow/go-proto-validators" + github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" + _ "google.golang.org/genproto/googleapis/api/annotations" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (this *Tunnel) Validate() error { + return nil +} +func (this *ListTunnelsRequest) Validate() error { + return nil +} +func (this *ListTunnelsResponse) Validate() error { + for _, item := range this.Tunnel { + if item != nil { + if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { + return github_com_mwitkow_go_proto_validators.FieldError("Tunnel", err) + } + } + } + return nil +} +func (this *AddTunnelRequest) Validate() error { + if this.ListenAgentId == "" { + return github_com_mwitkow_go_proto_validators.FieldError("ListenAgentId", fmt.Errorf(`value '%v' must not be an empty string`, this.ListenAgentId)) + } + if !(this.ListenPort > 0) { + return github_com_mwitkow_go_proto_validators.FieldError("ListenPort", fmt.Errorf(`value '%v' must be greater than '0'`, this.ListenPort)) + } + if !(this.ListenPort < 65536) { + return github_com_mwitkow_go_proto_validators.FieldError("ListenPort", fmt.Errorf(`value '%v' must be less than '65536'`, this.ListenPort)) + } + if this.ConnectAgentId == "" { + return github_com_mwitkow_go_proto_validators.FieldError("ConnectAgentId", fmt.Errorf(`value '%v' must not be an empty string`, this.ConnectAgentId)) + } + if !(this.ConnectPort > 0) { + return github_com_mwitkow_go_proto_validators.FieldError("ConnectPort", fmt.Errorf(`value '%v' must be greater than '0'`, this.ConnectPort)) + } + if !(this.ConnectPort < 65536) { + return github_com_mwitkow_go_proto_validators.FieldError("ConnectPort", fmt.Errorf(`value '%v' must be less than '65536'`, this.ConnectPort)) + } + return nil +} +func (this *AddTunnelResponse) Validate() error { + return nil +} +func (this *RemoveTunnelRequest) Validate() error { + if this.TunnelId == "" { + return github_com_mwitkow_go_proto_validators.FieldError("TunnelId", fmt.Errorf(`value '%v' must not be an empty string`, this.TunnelId)) + } + return nil +} +func (this *RemoveTunnelResponse) Validate() error { + return nil +} diff --git a/vendor/golang.org/x/net/nettest/conntest.go b/vendor/golang.org/x/net/nettest/conntest.go new file mode 100644 index 000000000..39cc6a631 --- /dev/null +++ b/vendor/golang.org/x/net/nettest/conntest.go @@ -0,0 +1,464 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +import ( + "bytes" + "encoding/binary" + "io" + "io/ioutil" + "math/rand" + "net" + "runtime" + "sync" + "testing" + "time" +) + +// MakePipe creates a connection between two endpoints and returns the pair +// as c1 and c2, such that anything written to c1 is read by c2 and vice-versa. +// The stop function closes all resources, including c1, c2, and the underlying +// net.Listener (if there is one), and should not be nil. +type MakePipe func() (c1, c2 net.Conn, stop func(), err error) + +// TestConn tests that a net.Conn implementation properly satisfies the interface. +// The tests should not produce any false positives, but may experience +// false negatives. Thus, some issues may only be detected when the test is +// run multiple times. For maximal effectiveness, run the tests under the +// race detector. +func TestConn(t *testing.T, mp MakePipe) { + t.Run("BasicIO", func(t *testing.T) { timeoutWrapper(t, mp, testBasicIO) }) + t.Run("PingPong", func(t *testing.T) { timeoutWrapper(t, mp, testPingPong) }) + t.Run("RacyRead", func(t *testing.T) { timeoutWrapper(t, mp, testRacyRead) }) + t.Run("RacyWrite", func(t *testing.T) { timeoutWrapper(t, mp, testRacyWrite) }) + t.Run("ReadTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testReadTimeout) }) + t.Run("WriteTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testWriteTimeout) }) + t.Run("PastTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPastTimeout) }) + t.Run("PresentTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPresentTimeout) }) + t.Run("FutureTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testFutureTimeout) }) + t.Run("CloseTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testCloseTimeout) }) + t.Run("ConcurrentMethods", func(t *testing.T) { timeoutWrapper(t, mp, testConcurrentMethods) }) +} + +type connTester func(t *testing.T, c1, c2 net.Conn) + +func timeoutWrapper(t *testing.T, mp MakePipe, f connTester) { + t.Helper() + c1, c2, stop, err := mp() + if err != nil { + t.Fatalf("unable to make pipe: %v", err) + } + var once sync.Once + defer once.Do(func() { stop() }) + timer := time.AfterFunc(time.Minute, func() { + once.Do(func() { + t.Error("test timed out; terminating pipe") + stop() + }) + }) + defer timer.Stop() + f(t, c1, c2) +} + +// testBasicIO tests that the data sent on c1 is properly received on c2. +func testBasicIO(t *testing.T, c1, c2 net.Conn) { + want := make([]byte, 1<<20) + rand.New(rand.NewSource(0)).Read(want) + + dataCh := make(chan []byte) + go func() { + rd := bytes.NewReader(want) + if err := chunkedCopy(c1, rd); err != nil { + t.Errorf("unexpected c1.Write error: %v", err) + } + if err := c1.Close(); err != nil { + t.Errorf("unexpected c1.Close error: %v", err) + } + }() + + go func() { + wr := new(bytes.Buffer) + if err := chunkedCopy(wr, c2); err != nil { + t.Errorf("unexpected c2.Read error: %v", err) + } + if err := c2.Close(); err != nil { + t.Errorf("unexpected c2.Close error: %v", err) + } + dataCh <- wr.Bytes() + }() + + if got := <-dataCh; !bytes.Equal(got, want) { + t.Error("transmitted data differs") + } +} + +// testPingPong tests that the two endpoints can synchronously send data to +// each other in a typical request-response pattern. +func testPingPong(t *testing.T, c1, c2 net.Conn) { + var wg sync.WaitGroup + defer wg.Wait() + + pingPonger := func(c net.Conn) { + defer wg.Done() + buf := make([]byte, 8) + var prev uint64 + for { + if _, err := io.ReadFull(c, buf); err != nil { + if err == io.EOF { + break + } + t.Errorf("unexpected Read error: %v", err) + } + + v := binary.LittleEndian.Uint64(buf) + binary.LittleEndian.PutUint64(buf, v+1) + if prev != 0 && prev+2 != v { + t.Errorf("mismatching value: got %d, want %d", v, prev+2) + } + prev = v + if v == 1000 { + break + } + + if _, err := c.Write(buf); err != nil { + t.Errorf("unexpected Write error: %v", err) + break + } + } + if err := c.Close(); err != nil { + t.Errorf("unexpected Close error: %v", err) + } + } + + wg.Add(2) + go pingPonger(c1) + go pingPonger(c2) + + // Start off the chain reaction. + if _, err := c1.Write(make([]byte, 8)); err != nil { + t.Errorf("unexpected c1.Write error: %v", err) + } +} + +// testRacyRead tests that it is safe to mutate the input Read buffer +// immediately after cancelation has occurred. +func testRacyRead(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(c2, rand.New(rand.NewSource(0))) + + var wg sync.WaitGroup + defer wg.Wait() + + c1.SetReadDeadline(time.Now().Add(time.Millisecond)) + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + + b1 := make([]byte, 1024) + b2 := make([]byte, 1024) + for j := 0; j < 100; j++ { + _, err := c1.Read(b1) + copy(b1, b2) // Mutate b1 to trigger potential race + if err != nil { + checkForTimeoutError(t, err) + c1.SetReadDeadline(time.Now().Add(time.Millisecond)) + } + } + }() + } +} + +// testRacyWrite tests that it is safe to mutate the input Write buffer +// immediately after cancelation has occurred. +func testRacyWrite(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(ioutil.Discard, c2) + + var wg sync.WaitGroup + defer wg.Wait() + + c1.SetWriteDeadline(time.Now().Add(time.Millisecond)) + for i := 0; i < 10; i++ { + wg.Add(1) + go func() { + defer wg.Done() + + b1 := make([]byte, 1024) + b2 := make([]byte, 1024) + for j := 0; j < 100; j++ { + _, err := c1.Write(b1) + copy(b1, b2) // Mutate b1 to trigger potential race + if err != nil { + checkForTimeoutError(t, err) + c1.SetWriteDeadline(time.Now().Add(time.Millisecond)) + } + } + }() + } +} + +// testReadTimeout tests that Read timeouts do not affect Write. +func testReadTimeout(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(ioutil.Discard, c2) + + c1.SetReadDeadline(aLongTimeAgo) + _, err := c1.Read(make([]byte, 1024)) + checkForTimeoutError(t, err) + if _, err := c1.Write(make([]byte, 1024)); err != nil { + t.Errorf("unexpected Write error: %v", err) + } +} + +// testWriteTimeout tests that Write timeouts do not affect Read. +func testWriteTimeout(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(c2, rand.New(rand.NewSource(0))) + + c1.SetWriteDeadline(aLongTimeAgo) + _, err := c1.Write(make([]byte, 1024)) + checkForTimeoutError(t, err) + if _, err := c1.Read(make([]byte, 1024)); err != nil { + t.Errorf("unexpected Read error: %v", err) + } +} + +// testPastTimeout tests that a deadline set in the past immediately times out +// Read and Write requests. +func testPastTimeout(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(c2, c2) + + testRoundtrip(t, c1) + + c1.SetDeadline(aLongTimeAgo) + n, err := c1.Write(make([]byte, 1024)) + if n != 0 { + t.Errorf("unexpected Write count: got %d, want 0", n) + } + checkForTimeoutError(t, err) + n, err = c1.Read(make([]byte, 1024)) + if n != 0 { + t.Errorf("unexpected Read count: got %d, want 0", n) + } + checkForTimeoutError(t, err) + + testRoundtrip(t, c1) +} + +// testPresentTimeout tests that a past deadline set while there are pending +// Read and Write operations immediately times out those operations. +func testPresentTimeout(t *testing.T, c1, c2 net.Conn) { + var wg sync.WaitGroup + defer wg.Wait() + wg.Add(3) + + deadlineSet := make(chan bool, 1) + go func() { + defer wg.Done() + time.Sleep(100 * time.Millisecond) + deadlineSet <- true + c1.SetReadDeadline(aLongTimeAgo) + c1.SetWriteDeadline(aLongTimeAgo) + }() + go func() { + defer wg.Done() + n, err := c1.Read(make([]byte, 1024)) + if n != 0 { + t.Errorf("unexpected Read count: got %d, want 0", n) + } + checkForTimeoutError(t, err) + if len(deadlineSet) == 0 { + t.Error("Read timed out before deadline is set") + } + }() + go func() { + defer wg.Done() + var err error + for err == nil { + _, err = c1.Write(make([]byte, 1024)) + } + checkForTimeoutError(t, err) + if len(deadlineSet) == 0 { + t.Error("Write timed out before deadline is set") + } + }() +} + +// testFutureTimeout tests that a future deadline will eventually time out +// Read and Write operations. +func testFutureTimeout(t *testing.T, c1, c2 net.Conn) { + var wg sync.WaitGroup + wg.Add(2) + + c1.SetDeadline(time.Now().Add(100 * time.Millisecond)) + go func() { + defer wg.Done() + _, err := c1.Read(make([]byte, 1024)) + checkForTimeoutError(t, err) + }() + go func() { + defer wg.Done() + var err error + for err == nil { + _, err = c1.Write(make([]byte, 1024)) + } + checkForTimeoutError(t, err) + }() + wg.Wait() + + go chunkedCopy(c2, c2) + resyncConn(t, c1) + testRoundtrip(t, c1) +} + +// testCloseTimeout tests that calling Close immediately times out pending +// Read and Write operations. +func testCloseTimeout(t *testing.T, c1, c2 net.Conn) { + go chunkedCopy(c2, c2) + + var wg sync.WaitGroup + defer wg.Wait() + wg.Add(3) + + // Test for cancelation upon connection closure. + c1.SetDeadline(neverTimeout) + go func() { + defer wg.Done() + time.Sleep(100 * time.Millisecond) + c1.Close() + }() + go func() { + defer wg.Done() + var err error + buf := make([]byte, 1024) + for err == nil { + _, err = c1.Read(buf) + } + }() + go func() { + defer wg.Done() + var err error + buf := make([]byte, 1024) + for err == nil { + _, err = c1.Write(buf) + } + }() +} + +// testConcurrentMethods tests that the methods of net.Conn can safely +// be called concurrently. +func testConcurrentMethods(t *testing.T, c1, c2 net.Conn) { + if runtime.GOOS == "plan9" { + t.Skip("skipping on plan9; see https://golang.org/issue/20489") + } + go chunkedCopy(c2, c2) + + // The results of the calls may be nonsensical, but this should + // not trigger a race detector warning. + var wg sync.WaitGroup + for i := 0; i < 100; i++ { + wg.Add(7) + go func() { + defer wg.Done() + c1.Read(make([]byte, 1024)) + }() + go func() { + defer wg.Done() + c1.Write(make([]byte, 1024)) + }() + go func() { + defer wg.Done() + c1.SetDeadline(time.Now().Add(10 * time.Millisecond)) + }() + go func() { + defer wg.Done() + c1.SetReadDeadline(aLongTimeAgo) + }() + go func() { + defer wg.Done() + c1.SetWriteDeadline(aLongTimeAgo) + }() + go func() { + defer wg.Done() + c1.LocalAddr() + }() + go func() { + defer wg.Done() + c1.RemoteAddr() + }() + } + wg.Wait() // At worst, the deadline is set 10ms into the future + + resyncConn(t, c1) + testRoundtrip(t, c1) +} + +// checkForTimeoutError checks that the error satisfies the Error interface +// and that Timeout returns true. +func checkForTimeoutError(t *testing.T, err error) { + t.Helper() + if nerr, ok := err.(net.Error); ok { + if !nerr.Timeout() { + t.Errorf("err.Timeout() = false, want true") + } + } else { + t.Errorf("got %T, want net.Error", err) + } +} + +// testRoundtrip writes something into c and reads it back. +// It assumes that everything written into c is echoed back to itself. +func testRoundtrip(t *testing.T, c net.Conn) { + t.Helper() + if err := c.SetDeadline(neverTimeout); err != nil { + t.Errorf("roundtrip SetDeadline error: %v", err) + } + + const s = "Hello, world!" + buf := []byte(s) + if _, err := c.Write(buf); err != nil { + t.Errorf("roundtrip Write error: %v", err) + } + if _, err := io.ReadFull(c, buf); err != nil { + t.Errorf("roundtrip Read error: %v", err) + } + if string(buf) != s { + t.Errorf("roundtrip data mismatch: got %q, want %q", buf, s) + } +} + +// resyncConn resynchronizes the connection into a sane state. +// It assumes that everything written into c is echoed back to itself. +// It assumes that 0xff is not currently on the wire or in the read buffer. +func resyncConn(t *testing.T, c net.Conn) { + t.Helper() + c.SetDeadline(neverTimeout) + errCh := make(chan error) + go func() { + _, err := c.Write([]byte{0xff}) + errCh <- err + }() + buf := make([]byte, 1024) + for { + n, err := c.Read(buf) + if n > 0 && bytes.IndexByte(buf[:n], 0xff) == n-1 { + break + } + if err != nil { + t.Errorf("unexpected Read error: %v", err) + break + } + } + if err := <-errCh; err != nil { + t.Errorf("unexpected Write error: %v", err) + } +} + +// chunkedCopy copies from r to w in fixed-width chunks to avoid +// causing a Write that exceeds the maximum packet size for packet-based +// connections like "unixpacket". +// We assume that the maximum packet size is at least 1024. +func chunkedCopy(w io.Writer, r io.Reader) error { + b := make([]byte, 1024) + _, err := io.CopyBuffer(struct{ io.Writer }{w}, struct{ io.Reader }{r}, b) + return err +} diff --git a/vendor/golang.org/x/net/nettest/nettest.go b/vendor/golang.org/x/net/nettest/nettest.go new file mode 100644 index 000000000..a402a46bb --- /dev/null +++ b/vendor/golang.org/x/net/nettest/nettest.go @@ -0,0 +1,347 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package nettest provides utilities for network testing. +package nettest + +import ( + "errors" + "fmt" + "io/ioutil" + "net" + "os" + "os/exec" + "runtime" + "strconv" + "strings" + "sync" + "time" +) + +var ( + stackOnce sync.Once + ipv4Enabled bool + ipv6Enabled bool + unStrmDgramEnabled bool + rawSocketSess bool + + aLongTimeAgo = time.Unix(233431200, 0) + neverTimeout = time.Time{} + + errNoAvailableInterface = errors.New("no available interface") + errNoAvailableAddress = errors.New("no available address") +) + +func probeStack() { + if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil { + ln.Close() + ipv4Enabled = true + } + if ln, err := net.Listen("tcp6", "[::1]:0"); err == nil { + ln.Close() + ipv6Enabled = true + } + rawSocketSess = supportsRawSocket() + switch runtime.GOOS { + case "aix": + // Unix network isn't properly working on AIX 7.2 with + // Technical Level < 2. + out, _ := exec.Command("oslevel", "-s").Output() + if len(out) >= len("7200-XX-ZZ-YYMM") { // AIX 7.2, Tech Level XX, Service Pack ZZ, date YYMM + ver := string(out[:4]) + tl, _ := strconv.Atoi(string(out[5:7])) + unStrmDgramEnabled = ver > "7200" || (ver == "7200" && tl >= 2) + } + default: + unStrmDgramEnabled = true + } +} + +func unixStrmDgramEnabled() bool { + stackOnce.Do(probeStack) + return unStrmDgramEnabled +} + +// SupportsIPv4 reports whether the platform supports IPv4 networking +// functionality. +func SupportsIPv4() bool { + stackOnce.Do(probeStack) + return ipv4Enabled +} + +// SupportsIPv6 reports whether the platform supports IPv6 networking +// functionality. +func SupportsIPv6() bool { + stackOnce.Do(probeStack) + return ipv6Enabled +} + +// SupportsRawSocket reports whether the current session is available +// to use raw sockets. +func SupportsRawSocket() bool { + stackOnce.Do(probeStack) + return rawSocketSess +} + +// TestableNetwork reports whether network is testable on the current +// platform configuration. +// +// See func Dial of the standard library for the supported networks. +func TestableNetwork(network string) bool { + ss := strings.Split(network, ":") + switch ss[0] { + case "ip+nopriv": + // This is an internal network name for testing on the + // package net of the standard library. + switch runtime.GOOS { + case "android", "fuchsia", "hurd", "js", "nacl", "plan9", "windows": + return false + case "darwin": + // iOS doesn't support it. + if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" { + return false + } + } + case "ip", "ip4", "ip6": + switch runtime.GOOS { + case "fuchsia", "hurd", "js", "nacl", "plan9": + return false + default: + if os.Getuid() != 0 { + return false + } + } + case "unix", "unixgram": + switch runtime.GOOS { + case "android", "fuchsia", "hurd", "js", "nacl", "plan9", "windows": + return false + case "aix": + return unixStrmDgramEnabled() + case "darwin": + // iOS does not support unix, unixgram. + if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" { + return false + } + } + case "unixpacket": + switch runtime.GOOS { + case "aix", "android", "fuchsia", "hurd", "darwin", "js", "nacl", "plan9", "windows": + return false + case "netbsd": + // It passes on amd64 at least. 386 fails + // (Issue 22927). arm is unknown. + if runtime.GOARCH == "386" { + return false + } + } + } + switch ss[0] { + case "tcp4", "udp4", "ip4": + return SupportsIPv4() + case "tcp6", "udp6", "ip6": + return SupportsIPv6() + } + return true +} + +// TestableAddress reports whether address of network is testable on +// the current platform configuration. +func TestableAddress(network, address string) bool { + switch ss := strings.Split(network, ":"); ss[0] { + case "unix", "unixgram", "unixpacket": + // Abstract unix domain sockets, a Linux-ism. + if address[0] == '@' && runtime.GOOS != "linux" { + return false + } + } + return true +} + +// NewLocalListener returns a listener which listens to a loopback IP +// address or local file system path. +// +// The provided network must be "tcp", "tcp4", "tcp6", "unix" or +// "unixpacket". +func NewLocalListener(network string) (net.Listener, error) { + switch network { + case "tcp": + if SupportsIPv4() { + if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil { + return ln, nil + } + } + if SupportsIPv6() { + return net.Listen("tcp6", "[::1]:0") + } + case "tcp4": + if SupportsIPv4() { + return net.Listen("tcp4", "127.0.0.1:0") + } + case "tcp6": + if SupportsIPv6() { + return net.Listen("tcp6", "[::1]:0") + } + case "unix", "unixpacket": + path, err := LocalPath() + if err != nil { + return nil, err + } + return net.Listen(network, path) + } + return nil, fmt.Errorf("%s is not supported on %s/%s", network, runtime.GOOS, runtime.GOARCH) +} + +// NewLocalPacketListener returns a packet listener which listens to a +// loopback IP address or local file system path. +// +// The provided network must be "udp", "udp4", "udp6" or "unixgram". +func NewLocalPacketListener(network string) (net.PacketConn, error) { + switch network { + case "udp": + if SupportsIPv4() { + if c, err := net.ListenPacket("udp4", "127.0.0.1:0"); err == nil { + return c, nil + } + } + if SupportsIPv6() { + return net.ListenPacket("udp6", "[::1]:0") + } + case "udp4": + if SupportsIPv4() { + return net.ListenPacket("udp4", "127.0.0.1:0") + } + case "udp6": + if SupportsIPv6() { + return net.ListenPacket("udp6", "[::1]:0") + } + case "unixgram": + path, err := LocalPath() + if err != nil { + return nil, err + } + return net.ListenPacket(network, path) + } + return nil, fmt.Errorf("%s is not supported on %s/%s", network, runtime.GOOS, runtime.GOARCH) +} + +// LocalPath returns a local path that can be used for Unix-domain +// protocol testing. +func LocalPath() (string, error) { + f, err := ioutil.TempFile("", "go-nettest") + if err != nil { + return "", err + } + path := f.Name() + f.Close() + os.Remove(path) + return path, nil +} + +// MulticastSource returns a unicast IP address on ifi when ifi is an +// IP multicast-capable network interface. +// +// The provided network must be "ip", "ip4" or "ip6". +func MulticastSource(network string, ifi *net.Interface) (net.IP, error) { + switch network { + case "ip", "ip4", "ip6": + default: + return nil, errNoAvailableAddress + } + if ifi == nil || ifi.Flags&net.FlagUp == 0 || ifi.Flags&net.FlagMulticast == 0 { + return nil, errNoAvailableAddress + } + ip, ok := hasRoutableIP(network, ifi) + if !ok { + return nil, errNoAvailableAddress + } + return ip, nil +} + +// LoopbackInterface returns an available logical network interface +// for loopback test. +func LoopbackInterface() (*net.Interface, error) { + ift, err := net.Interfaces() + if err != nil { + return nil, errNoAvailableInterface + } + for _, ifi := range ift { + if ifi.Flags&net.FlagLoopback != 0 && ifi.Flags&net.FlagUp != 0 { + return &ifi, nil + } + } + return nil, errNoAvailableInterface +} + +// RoutedInterface returns a network interface that can route IP +// traffic and satisfies flags. +// +// The provided network must be "ip", "ip4" or "ip6". +func RoutedInterface(network string, flags net.Flags) (*net.Interface, error) { + switch network { + case "ip", "ip4", "ip6": + default: + return nil, errNoAvailableInterface + } + ift, err := net.Interfaces() + if err != nil { + return nil, errNoAvailableInterface + } + for _, ifi := range ift { + if ifi.Flags&flags != flags { + continue + } + if _, ok := hasRoutableIP(network, &ifi); !ok { + continue + } + return &ifi, nil + } + return nil, errNoAvailableInterface +} + +func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) { + ifat, err := ifi.Addrs() + if err != nil { + return nil, false + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip, ok := routableIP(network, ifa.IP); ok { + return ip, true + } + case *net.IPNet: + if ip, ok := routableIP(network, ifa.IP); ok { + return ip, true + } + } + } + return nil, false +} + +func routableIP(network string, ip net.IP) (net.IP, bool) { + if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsGlobalUnicast() { + return nil, false + } + switch network { + case "ip4": + if ip := ip.To4(); ip != nil { + return ip, true + } + case "ip6": + if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation + return nil, false + } + if ip := ip.To16(); ip != nil && ip.To4() == nil { + return ip, true + } + default: + if ip := ip.To4(); ip != nil { + return ip, true + } + if ip := ip.To16(); ip != nil { + return ip, true + } + } + return nil, false +} diff --git a/vendor/golang.org/x/net/nettest/nettest_stub.go b/vendor/golang.org/x/net/nettest/nettest_stub.go new file mode 100644 index 000000000..2bb8c0576 --- /dev/null +++ b/vendor/golang.org/x/net/nettest/nettest_stub.go @@ -0,0 +1,11 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows + +package nettest + +func supportsRawSocket() bool { + return false +} diff --git a/vendor/golang.org/x/net/nettest/nettest_unix.go b/vendor/golang.org/x/net/nettest/nettest_unix.go new file mode 100644 index 000000000..afff744e8 --- /dev/null +++ b/vendor/golang.org/x/net/nettest/nettest_unix.go @@ -0,0 +1,21 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris + +package nettest + +import "syscall" + +func supportsRawSocket() bool { + for _, af := range []int{syscall.AF_INET, syscall.AF_INET6} { + s, err := syscall.Socket(af, syscall.SOCK_RAW, 0) + if err != nil { + continue + } + syscall.Close(s) + return true + } + return false +} diff --git a/vendor/golang.org/x/net/nettest/nettest_windows.go b/vendor/golang.org/x/net/nettest/nettest_windows.go new file mode 100644 index 000000000..4939964db --- /dev/null +++ b/vendor/golang.org/x/net/nettest/nettest_windows.go @@ -0,0 +1,26 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +import "syscall" + +func supportsRawSocket() bool { + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548.aspx: + // Note: To use a socket of type SOCK_RAW requires administrative privileges. + // Users running Winsock applications that use raw sockets must be a member of + // the Administrators group on the local computer, otherwise raw socket calls + // will fail with an error code of WSAEACCES. On Windows Vista and later, access + // for raw sockets is enforced at socket creation. In earlier versions of Windows, + // access for raw sockets is enforced during other socket operations. + for _, af := range []int{syscall.AF_INET, syscall.AF_INET6} { + s, err := syscall.Socket(af, syscall.SOCK_RAW, 0) + if err != nil { + continue + } + syscall.Closesocket(s) + return true + } + return false +}