Documentation ¶
Overview ¶
Package drain handles the storing and publishing of logs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Publisher PublisherDrain // default publish drain Archiver ArchiverDrain // default archive drain )
View Source
var (
// How often to clean, exported for testing
CleanFreq = 60
)
Functions ¶
Types ¶
type ArchiverDrain ¶
type ArchiverDrain interface { // Init initializes the archiver drain Init() error // Slice returns a slice of logs based on the name, offset, limit, and log-level Slice(name, host, tag string, offset, end, limit int64, level int) ([]logvac.Message, error) // Write writes the message to database Write(msg logvac.Message) // Expire cleans up old logs Expire() }
Archiver defines a storage type drain
type BoltArchive ¶
type BoltArchive struct { Done chan bool // contains filtered or unexported fields }
BoltArchive is a boltDB archiver
func NewBoltArchive ¶
func NewBoltArchive(path string) (*BoltArchive, error)
NewBoltArchive creates a new boltDB archiver
func (BoltArchive) Slice ¶
func (a BoltArchive) Slice(name, host, tag string, offset, end, limit int64, level int) ([]logvac.Message, error)
Slice returns a slice of logs based on the name, offset, limit, and log-level
func (BoltArchive) Write ¶
func (a BoltArchive) Write(msg logvac.Message)
Write writes the message to database
type Mist ¶
type Mist struct {
// contains filtered or unexported fields
}
Mist is a mist publisher
func NewMistClient ¶
NewMistClient creates a new mist publisher
type PublisherDrain ¶
type PublisherDrain interface { // Init initializes the publish drain Init() error // Publish publishes the tagged data Publish(msg logvac.Message) }
Publisher defines a pub-sub type drain
Click to show internal directories.
Click to hide internal directories.