Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonMarshaller ¶
type JsonMarshaller interface {
ToJson() []byte
}
JsonMarshaller defines objects that can be marshalled to json.
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output handles all output during an operation
func New ¶
New returns a new output object. It handles all the different outputs that should happen during a wrestic operation.
func (*Output) TriggerAll ¶
func (o *Output) TriggerAll()
TriggerAll handles all the registered outputs and pushes the output to the webhook/prometheus endpoint.
func (*Output) TriggerHook ¶
func (o *Output) TriggerHook(data JsonMarshaller)
TriggerHook pushes a single json
func (*Output) TriggerProm ¶
func (o *Output) TriggerProm(prom prometheus.Collector)
TriggerProm pushes a prometheus collector
type Outputter ¶
type Outputter interface { Webhook Prometheus Console }
Outputter bundles Webhook and Prometheus into one interface
type Prometheus ¶
type Prometheus interface { // ToProm should return a slice of prometheus collectors that are ready to // be sent to the push gateway. ToProm() []prometheus.Collector }
Prometheus defines an interface to send stats to a prometheus push gateway
type Trigger ¶
type Trigger interface { TriggerHook(data JsonMarshaller) TriggerProm(prom prometheus.Collector) }
Trigger is the interface used for a single. Also intended for the use outside of the output module.
type Webhook ¶
type Webhook interface { // GetWebhookData should return a slice with all the objects that should be // sent to the webhook endpoint. GetWebhookData() []JsonMarshaller }
Webhook defines an interface to send stats to a webhook url