agentlocalpb

package
v2.0.0-beta7+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2019 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package agentlocalpb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAgentLocalHandler

func RegisterAgentLocalHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAgentLocalHandler registers the http handlers for service AgentLocal to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAgentLocalHandlerClient

func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalClient) error

RegisterAgentLocalHandlerClient registers the http handlers for service AgentLocal to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentLocalClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentLocalClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AgentLocalClient" to call the correct interceptors.

func RegisterAgentLocalHandlerFromEndpoint

func RegisterAgentLocalHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAgentLocalHandlerFromEndpoint is same as RegisterAgentLocalHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAgentLocalServer

func RegisterAgentLocalServer(s *grpc.Server, srv AgentLocalServer)

Types

type AgentInfo

type AgentInfo struct {
	AgentId   string                  `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
	AgentType agentpb.Type            `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=agent.Type" json:"agent_type,omitempty"`
	Status    inventorypb.AgentStatus `protobuf:"varint,3,opt,name=status,proto3,enum=inventory.AgentStatus" json:"status,omitempty"`
	// TODO https://jira.percona.com/browse/PMM-3758
	Logs                 []string `protobuf:"bytes,4,rep,name=logs,proto3" json:"logs,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

AgentInfo contains information about Agent managed by pmm-agent.

func (*AgentInfo) Descriptor

func (*AgentInfo) Descriptor() ([]byte, []int)

func (*AgentInfo) GetAgentId

func (m *AgentInfo) GetAgentId() string

func (*AgentInfo) GetAgentType

func (m *AgentInfo) GetAgentType() agentpb.Type

func (*AgentInfo) GetLogs

func (m *AgentInfo) GetLogs() []string

func (*AgentInfo) GetStatus

func (m *AgentInfo) GetStatus() inventorypb.AgentStatus

func (*AgentInfo) ProtoMessage

func (*AgentInfo) ProtoMessage()

func (*AgentInfo) Reset

func (m *AgentInfo) Reset()

func (*AgentInfo) String

func (m *AgentInfo) String() string

func (*AgentInfo) Validate

func (this *AgentInfo) Validate() error

func (*AgentInfo) XXX_DiscardUnknown

func (m *AgentInfo) XXX_DiscardUnknown()

func (*AgentInfo) XXX_Marshal

func (m *AgentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AgentInfo) XXX_Merge

func (m *AgentInfo) XXX_Merge(src proto.Message)

func (*AgentInfo) XXX_Size

func (m *AgentInfo) XXX_Size() int

func (*AgentInfo) XXX_Unmarshal

func (m *AgentInfo) XXX_Unmarshal(b []byte) error

type AgentLocalClient

type AgentLocalClient interface {
	// Status returns current pmm-agent status.
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
	// Reload reloads pmm-agent configuration.
	Reload(ctx context.Context, in *ReloadRequest, opts ...grpc.CallOption) (*ReloadResponse, error)
}

AgentLocalClient is the client API for AgentLocal service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewAgentLocalClient

func NewAgentLocalClient(cc *grpc.ClientConn) AgentLocalClient

type AgentLocalServer

type AgentLocalServer interface {
	// Status returns current pmm-agent status.
	Status(context.Context, *StatusRequest) (*StatusResponse, error)
	// Reload reloads pmm-agent configuration.
	Reload(context.Context, *ReloadRequest) (*ReloadResponse, error)
}

AgentLocalServer is the server API for AgentLocal service.

type ReloadRequest

type ReloadRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReloadRequest) Descriptor

func (*ReloadRequest) Descriptor() ([]byte, []int)

func (*ReloadRequest) ProtoMessage

func (*ReloadRequest) ProtoMessage()

func (*ReloadRequest) Reset

func (m *ReloadRequest) Reset()

func (*ReloadRequest) String

func (m *ReloadRequest) String() string

func (*ReloadRequest) Validate

func (this *ReloadRequest) Validate() error

func (*ReloadRequest) XXX_DiscardUnknown

func (m *ReloadRequest) XXX_DiscardUnknown()

func (*ReloadRequest) XXX_Marshal

func (m *ReloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReloadRequest) XXX_Merge

func (m *ReloadRequest) XXX_Merge(src proto.Message)

func (*ReloadRequest) XXX_Size

func (m *ReloadRequest) XXX_Size() int

func (*ReloadRequest) XXX_Unmarshal

func (m *ReloadRequest) XXX_Unmarshal(b []byte) error

type ReloadResponse

type ReloadResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ReloadRequest may not be received by the client due to pmm-agent restart.

func (*ReloadResponse) Descriptor

func (*ReloadResponse) Descriptor() ([]byte, []int)

func (*ReloadResponse) ProtoMessage

func (*ReloadResponse) ProtoMessage()

func (*ReloadResponse) Reset

func (m *ReloadResponse) Reset()

func (*ReloadResponse) String

func (m *ReloadResponse) String() string

func (*ReloadResponse) Validate

func (this *ReloadResponse) Validate() error

func (*ReloadResponse) XXX_DiscardUnknown

func (m *ReloadResponse) XXX_DiscardUnknown()

func (*ReloadResponse) XXX_Marshal

func (m *ReloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReloadResponse) XXX_Merge

func (m *ReloadResponse) XXX_Merge(src proto.Message)

func (*ReloadResponse) XXX_Size

func (m *ReloadResponse) XXX_Size() int

func (*ReloadResponse) XXX_Unmarshal

func (m *ReloadResponse) XXX_Unmarshal(b []byte) error

type ServerInfo

type ServerInfo struct {
	// PMM Server URL in a form https://HOST:PORT/.
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// PMM Server's TLS certificate validation should be skipped if true.
	InsecureTls bool `protobuf:"varint,2,opt,name=insecure_tls,json=insecureTls,proto3" json:"insecure_tls,omitempty"`
	// PMM Server version; empty if pmm-agent is not connected to the server.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// Clock drift between pmm-managed and pmm-agent.
	ClockDrift *duration.Duration `protobuf:"bytes,4,opt,name=clock_drift,json=clockDrift,proto3" json:"clock_drift,omitempty"`
	// Ping time from pmm-agent to pmm-managed.
	Latency *duration.Duration `protobuf:"bytes,5,opt,name=latency,proto3" json:"latency,omitempty"`
	// True if pmm-agent is currently connected to the server.
	Connected            bool     `protobuf:"varint,6,opt,name=connected,proto3" json:"connected,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ServerInfo contains information about the PMM Server.

func (*ServerInfo) Descriptor

func (*ServerInfo) Descriptor() ([]byte, []int)

func (*ServerInfo) GetClockDrift

func (m *ServerInfo) GetClockDrift() *duration.Duration

func (*ServerInfo) GetConnected

func (m *ServerInfo) GetConnected() bool

func (*ServerInfo) GetInsecureTls

func (m *ServerInfo) GetInsecureTls() bool

func (*ServerInfo) GetLatency

func (m *ServerInfo) GetLatency() *duration.Duration

func (*ServerInfo) GetUrl

func (m *ServerInfo) GetUrl() string

func (*ServerInfo) GetVersion

func (m *ServerInfo) GetVersion() string

func (*ServerInfo) ProtoMessage

func (*ServerInfo) ProtoMessage()

func (*ServerInfo) Reset

func (m *ServerInfo) Reset()

func (*ServerInfo) String

func (m *ServerInfo) String() string

func (*ServerInfo) Validate

func (this *ServerInfo) Validate() error

func (*ServerInfo) XXX_DiscardUnknown

func (m *ServerInfo) XXX_DiscardUnknown()

func (*ServerInfo) XXX_Marshal

func (m *ServerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfo) XXX_Merge

func (m *ServerInfo) XXX_Merge(src proto.Message)

func (*ServerInfo) XXX_Size

func (m *ServerInfo) XXX_Size() int

func (*ServerInfo) XXX_Unmarshal

func (m *ServerInfo) XXX_Unmarshal(b []byte) error

type StatusRequest

type StatusRequest struct {
	// TODO https://jira.percona.com/browse/PMM-3758
	GetLogs bool `protobuf:"varint,1,opt,name=get_logs,json=getLogs,proto3" json:"get_logs,omitempty"`
	// Returns network info if set true.
	GetNetworkInfo       bool     `protobuf:"varint,2,opt,name=get_network_info,json=getNetworkInfo,proto3" json:"get_network_info,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StatusRequest) Descriptor

func (*StatusRequest) Descriptor() ([]byte, []int)

func (*StatusRequest) GetGetLogs

func (m *StatusRequest) GetGetLogs() bool

func (*StatusRequest) GetGetNetworkInfo

func (m *StatusRequest) GetGetNetworkInfo() bool

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) String

func (m *StatusRequest) String() string

func (*StatusRequest) Validate

func (this *StatusRequest) Validate() error

func (*StatusRequest) XXX_DiscardUnknown

func (m *StatusRequest) XXX_DiscardUnknown()

func (*StatusRequest) XXX_Marshal

func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusRequest) XXX_Merge

func (m *StatusRequest) XXX_Merge(src proto.Message)

func (*StatusRequest) XXX_Size

func (m *StatusRequest) XXX_Size() int

func (*StatusRequest) XXX_Unmarshal

func (m *StatusRequest) XXX_Unmarshal(b []byte) error

type StatusResponse

type StatusResponse struct {
	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"`
	// Config file path if pmm-agent was started with one.
	ConfigFilePath       string   `protobuf:"bytes,5,opt,name=config_file_path,json=configFilePath,proto3" json:"config_file_path,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StatusResponse) Descriptor

func (*StatusResponse) Descriptor() ([]byte, []int)

func (*StatusResponse) GetAgentId

func (m *StatusResponse) GetAgentId() string

func (*StatusResponse) GetAgentsInfo

func (m *StatusResponse) GetAgentsInfo() []*AgentInfo

func (*StatusResponse) GetConfigFilePath

func (m *StatusResponse) GetConfigFilePath() string

func (*StatusResponse) GetRunsOnNodeId

func (m *StatusResponse) GetRunsOnNodeId() string

func (*StatusResponse) GetServerInfo

func (m *StatusResponse) GetServerInfo() *ServerInfo

func (*StatusResponse) ProtoMessage

func (*StatusResponse) ProtoMessage()

func (*StatusResponse) Reset

func (m *StatusResponse) Reset()

func (*StatusResponse) String

func (m *StatusResponse) String() string

func (*StatusResponse) Validate

func (this *StatusResponse) Validate() error

func (*StatusResponse) XXX_DiscardUnknown

func (m *StatusResponse) XXX_DiscardUnknown()

func (*StatusResponse) XXX_Marshal

func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StatusResponse) XXX_Merge

func (m *StatusResponse) XXX_Merge(src proto.Message)

func (*StatusResponse) XXX_Size

func (m *StatusResponse) XXX_Size() int

func (*StatusResponse) XXX_Unmarshal

func (m *StatusResponse) XXX_Unmarshal(b []byte) error

type UnimplementedAgentLocalServer

type UnimplementedAgentLocalServer struct {
}

UnimplementedAgentLocalServer can be embedded to have forward compatible implementations.

func (*UnimplementedAgentLocalServer) Reload

func (*UnimplementedAgentLocalServer) Status

Directories

Path Synopsis
json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL