Documentation ¶
Index ¶
- Constants
- type Action
- type Application
- type Context
- type Entity
- type Error
- type Event
- type Filter
- type FilterKind
- type Line
- type Manager
- type Message
- type SinkEvent
- type SourceURL
- func (u SourceURL) Hash() int
- func (u SourceURL) HashString() string
- func (u *SourceURL) Normalize()
- func (u *SourceURL) QueryFlag(key string) bool
- func (u *SourceURL) QueryInt64(key string) (*int64, error)
- func (u *SourceURL) QueryKey(key string) (string, bool)
- func (u SourceURL) ShortForm() string
- func (u SourceURL) String() string
- type Timestamp
Constants ¶
const HumanTimeFormat = "human"
HumanTimeFormat ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { // Timestamp the timestamp. This field is required, and should default to time.Now() if not present. Timestamp Timestamp `json:"timestamp" regroup:"timestamp"` // Level the level. This field is required, and should default to Info if not present. Level level.Level `json:"level" regroup:"level"` // Message the message. This field is required. Message Message `json:"message" regroup:"message"` // Application is the name of the application that generated this event. This field is optional. Application Application `json:"application" regroup:"application"` // Action the action name. This field is optional. Action Action `json:"action" regroup:"action"` // Line the line number. This field is optional. Line Line `json:"line" regroup:"line"` // Context the context name. This field is optional. Context Context `json:"context" regroup:"context"` // Entity the entity name. This field is optional. Entity Entity `json:"entity" regroup:"entity"` // Error the error. This field is optional. Error Error `json:"error" regroup:"error"` }
Event a log event
type FilterKind ¶
type FilterKind int
FilterKind ...
const ( // Exclude ... Exclude FilterKind // AlertOnce ... AlertOnce // Include ... Include )
type Line ¶
type Line uint64
Line a line number.
const ( // NoLineNumber indicates no line number is present. NoLineNumber Line = 0 )
type Manager ¶
type Manager interface { // Run ... Run() error // Start the Manager. Start() error // Stop the Manager. Stop() // Wait for the manager to stop. Wait() // Register one or more sinks or registry. Register(opts ...interface{}) error // TrapSignals ... TrapSignals() }
Manager manages the lifecycle of registry, and the routing of their events to the sinks.
type Message ¶
type Message string
Message a message.
func (Message) Matches ¶
func (msg Message) Matches(filters *[]Filter) FilterKind
Matches determines if an event Matches the filters criteria.
type SourceURL ¶
SourceURL ...
func (*SourceURL) Normalize ¶
func (u *SourceURL) Normalize()
Normalize fixes situations where scheme://some/path/list is given rather than scheme:///some/path/list. In the first case this results in a hostname of some and a path of /path/list. This action rewrites it into the proper second form.
func (*SourceURL) QueryFlag ¶
QueryFlag looks up a QueryKey parameter value. If the key exists with an empty value, it is the equivalent of having set the value to true.
func (*SourceURL) QueryInt64 ¶
QueryInt64 returns the value of the QueryKey parameter a pointer to an int64. If the parameter is not set, or is set to empty, a nil pointer with no error is returned.