Documentation ¶
Overview ¶
Package agentlocalpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAgentLocalHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAgentLocalHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalClient) error
- func RegisterAgentLocalHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServer) error
- func RegisterAgentLocalServer(s *grpc.Server, srv AgentLocalServer)
- type AgentInfo
- func (*AgentInfo) Descriptor() ([]byte, []int)deprecated
- func (x *AgentInfo) GetAgentId() string
- func (x *AgentInfo) GetAgentType() inventorypb.AgentType
- func (x *AgentInfo) GetListenPort() uint32
- func (x *AgentInfo) GetStatus() inventorypb.AgentStatus
- func (*AgentInfo) ProtoMessage()
- func (x *AgentInfo) ProtoReflect() protoreflect.Message
- func (x *AgentInfo) Reset()
- func (x *AgentInfo) String() string
- func (this *AgentInfo) Validate() error
- type AgentLocalClient
- type AgentLocalServer
- type ReloadRequest
- type ReloadResponse
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ServerInfo) GetClockDrift() *duration.Duration
- func (x *ServerInfo) GetConnected() bool
- func (x *ServerInfo) GetInsecureTls() bool
- func (x *ServerInfo) GetLatency() *duration.Duration
- func (x *ServerInfo) GetUrl() string
- func (x *ServerInfo) GetVersion() string
- func (*ServerInfo) ProtoMessage()
- func (x *ServerInfo) ProtoReflect() protoreflect.Message
- func (x *ServerInfo) Reset()
- func (x *ServerInfo) String() string
- func (this *ServerInfo) Validate() error
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatusRequest) GetGetNetworkInfo() bool
- func (*StatusRequest) ProtoMessage()
- func (x *StatusRequest) ProtoReflect() protoreflect.Message
- func (x *StatusRequest) Reset()
- func (x *StatusRequest) String() string
- func (this *StatusRequest) Validate() error
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetAgentId() string
- func (x *StatusResponse) GetAgentVersion() string
- func (x *StatusResponse) GetAgentsInfo() []*AgentInfo
- func (x *StatusResponse) GetConfigFilepath() string
- func (x *StatusResponse) GetRunsOnNodeId() string
- func (x *StatusResponse) GetServerInfo() *ServerInfo
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- func (this *StatusResponse) Validate() error
- type UnimplementedAgentLocalServer
Constants ¶
This section is empty.
Variables ¶
var File_agentlocalpb_agentlocal_proto protoreflect.FileDescriptor
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 RegisterAgentLocalHandlerServer ¶
func RegisterAgentLocalHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServer) error
RegisterAgentLocalHandlerServer registers the http handlers for service AgentLocal to "mux". UnaryRPC :call AgentLocalServer 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 RegisterAgentLocalHandlerFromEndpoint instead.
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 inventorypb.AgentType `protobuf:"varint,2,opt,name=agent_type,json=agentType,proto3,enum=inventory.AgentType" json:"agent_type,omitempty"` Status inventorypb.AgentStatus `protobuf:"varint,3,opt,name=status,proto3,enum=inventory.AgentStatus" json:"status,omitempty"` // The current listen port of this Agent (exporter or vmagent). // Zero for other Agent types, or if unknown or not yet supported. ListenPort uint32 `protobuf:"varint,4,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` // contains filtered or unexported fields }
AgentInfo contains information about Agent managed by pmm-agent.
func (*AgentInfo) Descriptor
deprecated
func (*AgentInfo) GetAgentId ¶
func (*AgentInfo) GetAgentType ¶
func (x *AgentInfo) GetAgentType() inventorypb.AgentType
func (*AgentInfo) GetListenPort ¶
func (*AgentInfo) GetStatus ¶
func (x *AgentInfo) GetStatus() inventorypb.AgentStatus
func (*AgentInfo) ProtoMessage ¶
func (*AgentInfo) ProtoMessage()
func (*AgentInfo) ProtoReflect ¶
func (x *AgentInfo) ProtoReflect() protoreflect.Message
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.ClientConnInterface) 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 {
// contains filtered or unexported fields
}
func (*ReloadRequest) Descriptor
deprecated
func (*ReloadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReloadRequest.ProtoReflect.Descriptor instead.
func (*ReloadRequest) ProtoMessage ¶
func (*ReloadRequest) ProtoMessage()
func (*ReloadRequest) ProtoReflect ¶
func (x *ReloadRequest) ProtoReflect() protoreflect.Message
func (*ReloadRequest) Reset ¶
func (x *ReloadRequest) Reset()
func (*ReloadRequest) String ¶
func (x *ReloadRequest) String() string
func (*ReloadRequest) Validate ¶
func (this *ReloadRequest) Validate() error
type ReloadResponse ¶
type ReloadResponse struct {
// contains filtered or unexported fields
}
ReloadRequest may not be received by the client due to pmm-agent restart.
func (*ReloadResponse) Descriptor
deprecated
func (*ReloadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReloadResponse.ProtoReflect.Descriptor instead.
func (*ReloadResponse) ProtoMessage ¶
func (*ReloadResponse) ProtoMessage()
func (*ReloadResponse) ProtoReflect ¶
func (x *ReloadResponse) ProtoReflect() protoreflect.Message
func (*ReloadResponse) Reset ¶
func (x *ReloadResponse) Reset()
func (*ReloadResponse) String ¶
func (x *ReloadResponse) String() string
func (*ReloadResponse) Validate ¶
func (this *ReloadResponse) Validate() 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"` // True if pmm-agent is currently connected to the server. Connected bool `protobuf:"varint,3,opt,name=connected,proto3" json:"connected,omitempty"` // PMM Server version (if agent is connected). Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // Ping time from pmm-agent to pmm-managed (if agent is connected). Latency *duration.Duration `protobuf:"bytes,5,opt,name=latency,proto3" json:"latency,omitempty"` // Clock drift from PMM Server (if agent is connected). ClockDrift *duration.Duration `protobuf:"bytes,6,opt,name=clock_drift,json=clockDrift,proto3" json:"clock_drift,omitempty"` // contains filtered or unexported fields }
ServerInfo contains information about the PMM Server.
func (*ServerInfo) Descriptor
deprecated
func (*ServerInfo) Descriptor() ([]byte, []int)
Deprecated: Use ServerInfo.ProtoReflect.Descriptor instead.
func (*ServerInfo) GetClockDrift ¶
func (x *ServerInfo) GetClockDrift() *duration.Duration
func (*ServerInfo) GetConnected ¶
func (x *ServerInfo) GetConnected() bool
func (*ServerInfo) GetInsecureTls ¶
func (x *ServerInfo) GetInsecureTls() bool
func (*ServerInfo) GetLatency ¶
func (x *ServerInfo) GetLatency() *duration.Duration
func (*ServerInfo) GetUrl ¶
func (x *ServerInfo) GetUrl() string
func (*ServerInfo) GetVersion ¶
func (x *ServerInfo) GetVersion() string
func (*ServerInfo) ProtoMessage ¶
func (*ServerInfo) ProtoMessage()
func (*ServerInfo) ProtoReflect ¶
func (x *ServerInfo) ProtoReflect() protoreflect.Message
func (*ServerInfo) Reset ¶
func (x *ServerInfo) Reset()
func (*ServerInfo) String ¶
func (x *ServerInfo) String() string
func (*ServerInfo) Validate ¶
func (this *ServerInfo) Validate() error
type StatusRequest ¶
type StatusRequest struct { // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `protobuf:"varint,1,opt,name=get_network_info,json=getNetworkInfo,proto3" json:"get_network_info,omitempty"` // contains filtered or unexported fields }
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) GetGetNetworkInfo ¶
func (x *StatusRequest) GetGetNetworkInfo() bool
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
func (*StatusRequest) Validate ¶
func (this *StatusRequest) Validate() 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_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"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetAgentId ¶
func (x *StatusResponse) GetAgentId() string
func (*StatusResponse) GetAgentVersion ¶
func (x *StatusResponse) GetAgentVersion() string
func (*StatusResponse) GetAgentsInfo ¶
func (x *StatusResponse) GetAgentsInfo() []*AgentInfo
func (*StatusResponse) GetConfigFilepath ¶
func (x *StatusResponse) GetConfigFilepath() string
func (*StatusResponse) GetRunsOnNodeId ¶
func (x *StatusResponse) GetRunsOnNodeId() string
func (*StatusResponse) GetServerInfo ¶
func (x *StatusResponse) GetServerInfo() *ServerInfo
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
func (*StatusResponse) Validate ¶
func (this *StatusResponse) Validate() error
type UnimplementedAgentLocalServer ¶
type UnimplementedAgentLocalServer struct { }
UnimplementedAgentLocalServer can be embedded to have forward compatible implementations.
func (*UnimplementedAgentLocalServer) Reload ¶
func (*UnimplementedAgentLocalServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error)
func (*UnimplementedAgentLocalServer) Status ¶
func (*UnimplementedAgentLocalServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)