report

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

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

View Source
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

func GetList

func GetList() []string

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:"node_name"`
	// contains filtered or unexported fields
}

func AllReports added in v0.5.2

func AllReports() []*Report

Return all run reports currently on the server for export.

func Get

func Get(runId string) (*Report, util.Gerror)

func GetNodeList

func GetNodeList(nodeName string, from, until time.Time, rows int) ([]*Report, error)

func GetReportList

func GetReportList(from, until time.Time, rows int) ([]*Report, error)

func New

func New(runId string, nodeName string) (*Report, util.Gerror)

func NewFromJson

func NewFromJson(node_name string, json_report map[string]interface{}) (*Report, util.Gerror)

func (*Report) Delete

func (r *Report) Delete() error

func (*Report) GobDecode

func (r *Report) GobDecode(b []byte) error

func (*Report) GobEncode

func (r *Report) GobEncode() ([]byte, error)

func (*Report) Save

func (r *Report) Save() error

func (*Report) UpdateFromJson

func (r *Report) UpdateFromJson(json_report map[string]interface{}) util.Gerror

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL