Documentation ¶
Overview ¶
Package agentlocalpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- 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)
- func (m *AgentInfo) GetAgentId() string
- func (m *AgentInfo) GetAgentType() inventorypb.AgentType
- func (m *AgentInfo) GetStatus() inventorypb.AgentStatus
- func (*AgentInfo) ProtoMessage()
- func (m *AgentInfo) Reset()
- func (m *AgentInfo) String() string
- func (this *AgentInfo) Validate() error
- func (m *AgentInfo) XXX_DiscardUnknown()
- func (m *AgentInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AgentInfo) XXX_Merge(src proto.Message)
- func (m *AgentInfo) XXX_Size() int
- func (m *AgentInfo) XXX_Unmarshal(b []byte) error
- type AgentLocalClient
- type AgentLocalServer
- type ReloadRequest
- func (*ReloadRequest) Descriptor() ([]byte, []int)
- func (*ReloadRequest) ProtoMessage()
- func (m *ReloadRequest) Reset()
- func (m *ReloadRequest) String() string
- func (this *ReloadRequest) Validate() error
- func (m *ReloadRequest) XXX_DiscardUnknown()
- func (m *ReloadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReloadRequest) XXX_Merge(src proto.Message)
- func (m *ReloadRequest) XXX_Size() int
- func (m *ReloadRequest) XXX_Unmarshal(b []byte) error
- type ReloadResponse
- func (*ReloadResponse) Descriptor() ([]byte, []int)
- func (*ReloadResponse) ProtoMessage()
- func (m *ReloadResponse) Reset()
- func (m *ReloadResponse) String() string
- func (this *ReloadResponse) Validate() error
- func (m *ReloadResponse) XXX_DiscardUnknown()
- func (m *ReloadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReloadResponse) XXX_Merge(src proto.Message)
- func (m *ReloadResponse) XXX_Size() int
- func (m *ReloadResponse) XXX_Unmarshal(b []byte) error
- type ServerInfo
- func (*ServerInfo) Descriptor() ([]byte, []int)
- func (m *ServerInfo) GetClockDrift() *duration.Duration
- func (m *ServerInfo) GetConnected() bool
- func (m *ServerInfo) GetInsecureTls() bool
- func (m *ServerInfo) GetLatency() *duration.Duration
- func (m *ServerInfo) GetUrl() string
- func (m *ServerInfo) GetVersion() string
- func (*ServerInfo) ProtoMessage()
- func (m *ServerInfo) Reset()
- func (m *ServerInfo) String() string
- func (this *ServerInfo) Validate() error
- func (m *ServerInfo) XXX_DiscardUnknown()
- func (m *ServerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ServerInfo) XXX_Merge(src proto.Message)
- func (m *ServerInfo) XXX_Size() int
- func (m *ServerInfo) XXX_Unmarshal(b []byte) error
- type StatusRequest
- func (*StatusRequest) Descriptor() ([]byte, []int)
- func (m *StatusRequest) GetGetNetworkInfo() bool
- func (*StatusRequest) ProtoMessage()
- func (m *StatusRequest) Reset()
- func (m *StatusRequest) String() string
- func (this *StatusRequest) Validate() error
- func (m *StatusRequest) XXX_DiscardUnknown()
- func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatusRequest) XXX_Merge(src proto.Message)
- func (m *StatusRequest) XXX_Size() int
- func (m *StatusRequest) XXX_Unmarshal(b []byte) error
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)
- func (m *StatusResponse) GetAgentId() string
- func (m *StatusResponse) GetAgentsInfo() []*AgentInfo
- func (m *StatusResponse) GetConfigFilepath() string
- func (m *StatusResponse) GetRunsOnNodeId() string
- func (m *StatusResponse) GetServerInfo() *ServerInfo
- func (*StatusResponse) ProtoMessage()
- func (m *StatusResponse) Reset()
- func (m *StatusResponse) String() string
- func (this *StatusResponse) Validate() error
- func (m *StatusResponse) XXX_DiscardUnknown()
- func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatusResponse) XXX_Merge(src proto.Message)
- func (m *StatusResponse) XXX_Size() int
- func (m *StatusResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedAgentLocalServer
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 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.
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"` 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) GetAgentId ¶
func (*AgentInfo) GetAgentType ¶
func (m *AgentInfo) GetAgentType() inventorypb.AgentType
func (*AgentInfo) GetStatus ¶
func (m *AgentInfo) GetStatus() inventorypb.AgentStatus
func (*AgentInfo) ProtoMessage ¶
func (*AgentInfo) ProtoMessage()
func (*AgentInfo) XXX_DiscardUnknown ¶
func (m *AgentInfo) XXX_DiscardUnknown()
func (*AgentInfo) XXX_Marshal ¶
func (*AgentInfo) XXX_Unmarshal ¶
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"` // 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"` 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 { // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatusRequest) Descriptor ¶
func (*StatusRequest) Descriptor() ([]byte, []int)
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_filepath,json=configFilepath,proto3" json:"config_filepath,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) Reload(ctx context.Context, req *ReloadRequest) (*ReloadResponse, error)
func (*UnimplementedAgentLocalServer) Status ¶
func (*UnimplementedAgentLocalServer) Status(ctx context.Context, req *StatusRequest) (*StatusResponse, error)