flapjack

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2014 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Entity  string `json:"entity"`
	Check   string `json:"check"`
	Type    string `json:"type"`
	State   string `json:"state"`
	Summary string `json:"summary"`
	Time    int64  `json:"time"`
}

Event is a basic representation of a Flapjack event. Find more at http://flapjack.io/docs/1.0/development/DATA_STRUCTURES

func (Event) IsValid

func (e Event) IsValid() error

IsValid performs basic validations on the event data.

type Transport

type Transport struct {
	Address    string
	Database   int
	Connection redis.Conn
}

Transport is a representation of a Redis connection.

func Dial

func Dial(address string, database int) (Transport, error)

Dial establishes a connection to Redis, wrapped in a Transport.

func (Transport) Send

func (t Transport) Send(event Event) (interface{}, error)

Send takes an event and sends it over a transport.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL