Documentation ¶
Overview ¶
Represent an API object
Index ¶
- func StartApi(serverAddr string)
- type API
- func (a *API) AgentGetSample(w http.ResponseWriter, r *http.Request)
- func (a *API) AgentListSamples(w http.ResponseWriter, r *http.Request)
- func (a *API) AgentPushMetrics(w http.ResponseWriter, r *http.Request)
- func (a *API) CreateSetup(w http.ResponseWriter, r *http.Request)
- func (a *API) GetAgent(w http.ResponseWriter, r *http.Request)
- func (a *API) GetMetrics(w http.ResponseWriter, r *http.Request)
- func (a *API) GetSampleResult(w http.ResponseWriter, r *http.Request)
- func (a *API) ListAgents(w http.ResponseWriter, r *http.Request)
- func (a *API) ListSamples(w http.ResponseWriter, r *http.Request)
- func (a *API) Login(w http.ResponseWriter, r *http.Request)
- func (a *API) Ping(w http.ResponseWriter, r *http.Request)
- func (a *API) RegisterAgent(w http.ResponseWriter, r *http.Request)
- func (a *API) RegisterSample(w http.ResponseWriter, r *http.Request)
- func (a *API) SetupStatus(w http.ResponseWriter, r *http.Request)
- func (a *API) UpdateAgent(w http.ResponseWriter, r *http.Request)
- func (a *API) UpdateSample(w http.ResponseWriter, r *http.Request)
- func (a *API) VerifyToken(w http.ResponseWriter, r *http.Request)
- type CreateSetupRequest
- type ListAgentsResponse
- type ListSampleResponse
- type LoginRequest
- type LoginResponse
- type MetricResponse
- type MetricValueResponse
- type PingResponse
- type RegisterAgentRequest
- type RegisterAgentResponse
- type SetupStatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
Represent API object
func (*API) AgentGetSample ¶
func (a *API) AgentGetSample(w http.ResponseWriter, r *http.Request)
Get one sample from agent
func (*API) AgentListSamples ¶
func (a *API) AgentListSamples(w http.ResponseWriter, r *http.Request)
Get a list of samples by id and checksum
func (*API) AgentPushMetrics ¶
func (a *API) AgentPushMetrics(w http.ResponseWriter, r *http.Request)
Recieve new metrics from an agent
func (*API) CreateSetup ¶
func (a *API) CreateSetup(w http.ResponseWriter, r *http.Request)
func (*API) GetAgent ¶
func (a *API) GetAgent(w http.ResponseWriter, r *http.Request)
Get a list of samples by id and checksum
func (*API) GetMetrics ¶
func (a *API) GetMetrics(w http.ResponseWriter, r *http.Request)
func (*API) GetSampleResult ¶
func (a *API) GetSampleResult(w http.ResponseWriter, r *http.Request)
func (*API) ListAgents ¶
func (a *API) ListAgents(w http.ResponseWriter, r *http.Request)
Get a list of samples by id and checksum
func (*API) ListSamples ¶
func (a *API) ListSamples(w http.ResponseWriter, r *http.Request)
Get a list of samples by id and checksum
func (*API) Login ¶
func (a *API) Login(w http.ResponseWriter, r *http.Request)
Generate a login session
func (*API) Ping ¶
func (a *API) Ping(w http.ResponseWriter, r *http.Request)
This method return Pong
func (*API) RegisterAgent ¶
func (a *API) RegisterAgent(w http.ResponseWriter, r *http.Request)
Register a new agent, and generate a secret.
func (*API) RegisterSample ¶
func (a *API) RegisterSample(w http.ResponseWriter, r *http.Request)
Generate a new sample
func (*API) SetupStatus ¶
func (a *API) SetupStatus(w http.ResponseWriter, r *http.Request)
func (*API) UpdateAgent ¶
func (a *API) UpdateAgent(w http.ResponseWriter, r *http.Request)
Register a new agent, and generate a secret.
func (*API) UpdateSample ¶
func (a *API) UpdateSample(w http.ResponseWriter, r *http.Request)
Generate a new sample
func (*API) VerifyToken ¶
func (a *API) VerifyToken(w http.ResponseWriter, r *http.Request)
Get a list of samples by id and checksum
type CreateSetupRequest ¶
type ListAgentsResponse ¶
type ListAgentsResponse struct { Id string Name string Description string Secret string Tags map[string]string UpdatedAt time.Time }
List sample response struct
type ListSampleResponse ¶
type ListSampleResponse struct { Id string Name string Description string UpdatedAt time.Time Kind string }
List sample response struct
type LoginRequest ¶
type LoginResponse ¶
type MetricResponse ¶
type MetricResponse struct { MetricName string Labels map[string]string Values []MetricValueResponse }
type MetricValueResponse ¶
type RegisterAgentRequest ¶
type RegisterAgentResponse ¶
type RegisterAgentResponse struct {
Secret string
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.