Documentation ¶
Overview ¶
Package report implements reporting on client runs and node changes. See http://docs.opscode.com/reporting.html for details. CURRENTLY EXPERIMENTAL.
Index ¶
- Constants
- func GetList() []string
- type Report
- func AllReports() []*Report
- func Get(runID string) (*Report, util.Gerror)
- func GetNodeList(nodeName string, from, until time.Time, rows int, status string) ([]*Report, error)
- func GetReportList(from, until time.Time, rows int, status string) ([]*Report, error)
- func New(runID string, nodeName string) (*Report, util.Gerror)
- func NewFromJSON(nodeName string, jsonReport map[string]interface{}) (*Report, util.Gerror)
Constants ¶
const ReportTimeFormat = "2006-01-02 15:04:05 -0700"
The format for reporting start and end times in JSON. Of course, subtly different from MySQL's time format, but only subtly.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Report ¶
type Report struct { RunID string `json:"run_id"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` TotalResCount int `json:"total_res_count"` Status string `json:"status"` RunList string `json:"run_list"` Resources []interface{} `json:"resources"` Data map[string]interface{} `json:"data"` // I think this is right NodeName string `json:"nodeName"` // contains filtered or unexported fields }
Report holds information on a chef client's run, including when, what resources changed, what recipes were in the run list, and whether the run was successful or not.
func AllReports ¶ added in v0.5.2
func AllReports() []*Report
AllReports returns all run reports currently on the server for export.
func GetNodeList ¶
func GetNodeList(nodeName string, from, until time.Time, rows int, status string) ([]*Report, error)
GetNodeList returns a list of reports from the given node in the time range and status given. Status may be "" for all statuses.
func GetReportList ¶
GetReportList returns a list of reports on the system in the given time range and with the given status, which may be "" for any status.
func NewFromJSON ¶ added in v0.6.0
NewFromJSON creates a new report from the given uploaded JSON.