Documentation
¶
Overview ¶
*
This package is for all interfaces that are imported in multiple packages in the code base This package MUST never import any other `steampipe` package
*
Index ¶
- Constants
- type BenchmarkResult
- type ControlResult
- func (r *ControlResult) Children() []ControlResultTreeNode
- func (r *ControlResult) Finished() bool
- func (r *ControlResult) GetStatus() ControlRunStatus
- func (r *ControlResult) SetError(err error)
- func (r *ControlResult) Start(result *QueryResult)
- func (r *ControlResult) ValidateColumns(result *QueryResult) error
- type ControlResultItem
- type ControlResultTreeNode
- type ControlRunStatus
- type ControlStatus
- type QueryResult
- type ResultStreamer
- type RowResult
- type SyncQueryResult
Constants ¶
View Source
const ( ControlOk = "ok" ControlAlarm = "alarm" ControlSkipped = "skipped" ControlInfo = "info" ControlError = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchmarkResult ¶
type BenchmarkResult struct { }
BenchmarkResult :: the result of a control run - will contain one or more result items (oi.e. for one or more resources)
type ControlResult ¶
type ControlResult struct { Error error // any completed results items Results []*ControlResultItem // the parent control Control *modconfig.Control // contains filtered or unexported fields }
ControlResult :: the result of a control run - will contain one or more result items (oi.e. for one or more resources)
func NewControlResult ¶
func NewControlResult(control *modconfig.Control) *ControlResult
func (*ControlResult) Children ¶
func (r *ControlResult) Children() []ControlResultTreeNode
Children :: implementation of ControlResultTreeNode
func (*ControlResult) Finished ¶
func (r *ControlResult) Finished() bool
func (*ControlResult) GetStatus ¶
func (r *ControlResult) GetStatus() ControlRunStatus
func (*ControlResult) SetError ¶
func (r *ControlResult) SetError(err error)
func (*ControlResult) Start ¶
func (r *ControlResult) Start(result *QueryResult)
func (*ControlResult) ValidateColumns ¶
func (r *ControlResult) ValidateColumns(result *QueryResult) error
type ControlResultItem ¶
type ControlResultItem struct { Reason string Resource string Status ControlStatus // the parent control Control *modconfig.Control }
ControlResultItem :: the result of a control for a single resource
func NewControlResultItem ¶
func NewControlResultItem(control *modconfig.Control, row *RowResult, colTypes []*sql.ColumnType) (*ControlResultItem, error)
type ControlResultTreeNode ¶
type ControlResultTreeNode interface { Children() []ControlResultTreeNode Parent() BenchmarkResult }
type ControlRunStatus ¶
type ControlRunStatus uint32
const ( ControlRunReady ControlRunStatus = 1 << iota ControlRunStarted ControlRunComplete ControlRunError )
type ControlStatus ¶
type ControlStatus string
type QueryResult ¶
type QueryResult struct { RowChan *chan *RowResult ColTypes []*sql.ColumnType Duration chan time.Duration }
func NewQueryResult ¶
func NewQueryResult(colTypes []*sql.ColumnType) *QueryResult
func (QueryResult) StreamError ¶
func (r QueryResult) StreamError(err error)
func (QueryResult) StreamRow ¶
func (r QueryResult) StreamRow(rowResult []interface{})
type ResultStreamer ¶
type ResultStreamer struct { Results chan *QueryResult // contains filtered or unexported fields }
func NewResultStreamer ¶
func NewResultStreamer() *ResultStreamer
func (*ResultStreamer) Close ¶
func (q *ResultStreamer) Close()
func (*ResultStreamer) Done ¶
func (q *ResultStreamer) Done()
Done :: signals that the next QueryResult has been processed
func (*ResultStreamer) StreamResult ¶
func (q *ResultStreamer) StreamResult(result *QueryResult)
func (*ResultStreamer) StreamSingleResult ¶
func (q *ResultStreamer) StreamSingleResult(result *QueryResult)
func (*ResultStreamer) Wait ¶
func (q *ResultStreamer) Wait()
Wait :: waits for the next QueryResult to get processed
type SyncQueryResult ¶
type SyncQueryResult struct { Rows []interface{} ColTypes []*sql.ColumnType Duration time.Duration }
Click to show internal directories.
Click to hide internal directories.