Documentation
¶
Overview ¶
Package client は pprotein の HTTP API を読む。 CLI と、自分自身の API から材料を読むサーバー側の集計(analysis / trend)が使う。
Index ¶
- Variables
- func GroupIDs(entries []Entry) []string
- func Latest(entries []Entry) (string, error)
- func Warning(e Entry) string
- type Client
- func (c *Client) AllEntries() ([]Entry, error)
- func (c *Client) Config(typ string) ([]byte, error)
- func (c *Client) Content(typ, id string) (string, error)
- func (c *Client) Entries(typ string) ([]Entry, error)
- func (c *Client) GetQuery(path string, query url.Values) ([]byte, error)
- func (c *Client) RawData(typ, id string) ([]byte, error)
- func (c *Client) Score(id string) (*score.Value, error)
- func (c *Client) StartCollect() error
- type Entry
Constants ¶
This section is empty.
Variables ¶
View Source
var Types = []string{"score", "httplog", "slowlog", "ptqd", "resource", "pprof", "memo", "dbquery"}
Types は pprotein の収集タイプ。
Functions ¶
Types ¶
type Client ¶
Client は pprotein の HTTP API クライアント。
func (*Client) AllEntries ¶
AllEntries は全タイプのエントリをまとめて取る。 収集タイプが存在しない(古い pprotein)場合はそのタイプを黙って飛ばす。
type Entry ¶
type Entry struct {
Snapshot struct {
Type string
ID string
Datetime time.Time
Repository *git.RepositoryInfo
GroupId string
Label string
Duration int
}
Status string
Message string
}
Entry は /api/<type> が返すエントリ。
Click to show internal directories.
Click to hide internal directories.