Documentation ¶
Index ¶
- Constants
- Variables
- func FormatSentReport(r SentReport) string
- type DiskvSpooler
- func (s *DiskvSpooler) CancelFiles()
- func (s *DiskvSpooler) Files() <-chan string
- func (s *DiskvSpooler) Purge(now time.Time, limits pc.DataSpoolLimits) (int, map[string][]string)
- func (s *DiskvSpooler) PurgeChan(c chan time.Time)
- func (s *DiskvSpooler) Read(file string) ([]byte, error)
- func (s *DiskvSpooler) Reject(file string) error
- func (s *DiskvSpooler) Remove(file string) error
- func (s *DiskvSpooler) Start(sz proto.Serializer) error
- func (s *DiskvSpooler) Status() map[string]string
- func (s *DiskvSpooler) Stop() error
- func (s *DiskvSpooler) Write(service string, data interface{}) error
- type Manager
- func (m *Manager) GetConfig() ([]proto.AgentConfig, []error)
- func (m *Manager) GetDefaults() map[string]interface{}
- func (m *Manager) Handle(cmd *proto.Cmd) *proto.Reply
- func (m *Manager) Sender() *Sender
- func (m *Manager) Spooler() Spooler
- func (m *Manager) Start() error
- func (m *Manager) Status() map[string]string
- func (m *Manager) Stop() error
- type Sender
- type SenderStats
- type SentInfo
- type SentReport
- type Spooler
Constants ¶
View Source
const ( DEFAULT_DATA_ENCODING = "gzip" DEFAULT_DATA_SEND_INTERVAL = 63 DEFAULT_DATA_MAX_AGE = 3600 * 24 // 1d DEFAULT_DATA_MAX_SIZE = 1024 * 1024 * 100 // 100 MiB DEFAULT_DATA_MAX_FILES = 1000 )
View Source
const ( MAX_SEND_ERRORS = 3 CONNECT_ERROR_WAIT = 3 )
View Source
const ( WRITE_BUFFER = 100 CACHE_SIZE = 1024 * 1024 * 8 // 8M )
Variables ¶
View Source
var ( BaseReportFormat string = "%d files, %s, %s, %s net util, %s net speed" ErrorReportFormat = "%d errors, %d API errors, %d timeouts, %d bad files" )
View Source
var DebugStats = false
View Source
var ErrSpoolTimeout = errors.New("Timeout spooling data")
Functions ¶
func FormatSentReport ¶
func FormatSentReport(r SentReport) string
Types ¶
type DiskvSpooler ¶
type DiskvSpooler struct {
// contains filtered or unexported fields
}
http://godoc.org/github.com/peterbourgon/diskv
func NewDiskvSpooler ¶
func NewDiskvSpooler(logger *pct.Logger, dataDir, trashDir, hostname string, limits pc.DataSpoolLimits) *DiskvSpooler
func (*DiskvSpooler) CancelFiles ¶
func (s *DiskvSpooler) CancelFiles()
func (*DiskvSpooler) Files ¶
func (s *DiskvSpooler) Files() <-chan string
func (*DiskvSpooler) Purge ¶
func (s *DiskvSpooler) Purge(now time.Time, limits pc.DataSpoolLimits) (int, map[string][]string)
func (*DiskvSpooler) PurgeChan ¶
func (s *DiskvSpooler) PurgeChan(c chan time.Time)
func (*DiskvSpooler) Reject ¶
func (s *DiskvSpooler) Reject(file string) error
func (*DiskvSpooler) Remove ¶
func (s *DiskvSpooler) Remove(file string) error
func (*DiskvSpooler) Start ¶
func (s *DiskvSpooler) Start(sz proto.Serializer) error
func (*DiskvSpooler) Status ¶
func (s *DiskvSpooler) Status() map[string]string
func (*DiskvSpooler) Stop ¶
func (s *DiskvSpooler) Stop() error
func (*DiskvSpooler) Write ¶
func (s *DiskvSpooler) Write(service string, data interface{}) error
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) GetDefaults ¶
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
type SenderStats ¶
type SenderStats struct {
// contains filtered or unexported fields
}
func NewSenderStats ¶
func NewSenderStats(d time.Duration) *SenderStats
func (*SenderStats) Dump ¶
func (s *SenderStats) Dump() []SentInfo
func (*SenderStats) Report ¶
func (s *SenderStats) Report() SentReport
func (*SenderStats) Sent ¶
func (s *SenderStats) Sent(info SentInfo)
type SentReport ¶
type SentReport struct { // -- Begin time.Time End time.Time Bytes string // humanized bytes, e.g. 443.59 kB Duration string // End - Begin, humanized Utilization string // bytes / (End - Begin), Mbps Throughput string // bytes / sendTime, Mbps Files uint Errs uint ApiErrs uint Timeouts uint BadFiles uint // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.