Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReload = errors.New("reload")
ErrReload is returned from Service.Run after request to reload configuration.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents local pmm-agent API server.
func NewServer ¶
func NewServer(cfg *config.Config, supervisor supervisor, client client, configFilepath string) *Server
NewServer creates new server.
Caller should call Run.
func (*Server) Reload ¶
func (s *Server) Reload(ctx context.Context, req *agentlocalpb.ReloadRequest) (*agentlocalpb.ReloadResponse, error)
Reload reloads pmm-agent and it configuration.
func (*Server) Run ¶
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 (*Server) Status ¶
func (s *Server) Status(ctx context.Context, req *agentlocalpb.StatusRequest) (*agentlocalpb.StatusResponse, error)
Status returns current pmm-agent status.
Click to show internal directories.
Click to hide internal directories.