Documentation
¶
Overview ¶
The cis package handles sending data to CIS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffered ¶
type Buffered struct {
// contains filtered or unexported fields
}
Buffered buffers CIS data for bulk writing.
func NewBuffered ¶
func NewBuffered(size int, writer BulkWriter) *Buffered
NewBuffered creates a new Buffered instance. size is the size of the buffer; writer is the instrument that writes the data to CIS. Buffered instances are safe to use with multiple goroutines.
func (*Buffered) Flush ¶
Flush writes out the contents of the buffer, clears the buffer, and returns the pieces written or the pieces that would have been written if there was any error.
func (*Buffered) Write ¶
Write buffers data. When size pieces of data are buffered, Write bulk clears the buffer, and returns the pieces written or the pieces that would have been written if there was any error. When simply adding to the buffer instead of bulk writing, Write always returns nil, nil.
type BulkWriter ¶
BulkWriter is the interface for batch writing data to CIS.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a client connection to CIS. Client instances are safe to use with multiple goroutines.
type Config ¶
type Config struct { // CIS endpoint. Example. "http://a.cis.endpoint.net:8080" Endpoint string // Required: data center e.g us-east-1. DataCenter string // Optional: Name for writing tricorder metrics for async http. // If ommitted, writing is synchronous. Name string }
Config represents the configuration for connecting to CIS
type PackageEntry ¶
type PackageEntry struct { // Package name e.g python3.4 Name string // Package version e.g 3.4 Version string // Package size Size uint64 }
PackageEntry represents a single package on a machine This type should support ==
type PackageInfo ¶
type PackageInfo struct { // The packaging type e.g debian. ManagementType string // The individual packages Packages []PackageEntry }
PackageInfo represents all the packages on a machine
func (*PackageInfo) Equals ¶
func (p *PackageInfo) Equals(rhs *PackageInfo) bool
Equals returns true if p is equivalent to rhs.
type Stats ¶
type Stats struct { // Time the data were fetched TimeStamp time.Time // The AWS instance ID of the machine InstanceId string // The packags on the machine Packages PackageInfo }
Stats represents fetching package data for a machine