Documentation
¶
Index ¶
- type Aluminum
- type Data
- type Destination
- type Zebrule
- func (z *Zebrule) Feed(report Data) error
- func (z *Zebrule) SetDebug(id string, c interface{}) (*Zebrule, error)
- func (z *Zebrule) SetError(id string, c interface{}) (*Zebrule, error)
- func (z *Zebrule) SetInfo(id string, c interface{}) (*Zebrule, error)
- func (z *Zebrule) SetNotice(id string, c interface{}) (*Zebrule, error)
- func (z *Zebrule) SetWarning(id string, c interface{}) (*Zebrule, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aluminum ¶
type Aluminum interface {
Bytes() []byte
}
Aluminum is the data interface, in case you don't want to use the default
type Data ¶
type Data struct { Type string `required:"true"` //which destination to report to Aluminum Aluminum `required:"true"` }
Data is what the zebrule reports
type Destination ¶
type Destination struct { Type reflect.Type `required:"true"` ID string `required:"true"` Config *interface{} `required:"true"` }
Destination is where the stuff gets sent
func NewDestination ¶
func NewDestination(id string, conf interface{}) Destination
NewDestination returns a blank destination to use
type Zebrule ¶
type Zebrule struct { Fatal Destination `required:"true"` Warning Destination `required:"true"` Error Destination `required:"true"` Debug Destination `required:"true"` Info Destination `required:"true"` Notice Destination `required:"true"` }
Zebrule is a poor struct, brought into this world only to eat aluminum and stream logs
func NewZebrule ¶
func NewZebrule(fatal, erro, warning Destination) (*Zebrule, error)
NewZebrule returns a zebrule to use
Click to show internal directories.
Click to hide internal directories.