adapters

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2015 License: MIT Imports: 6 Imported by: 0

README

Sentinel Adapters

Documentation

Overview

adapters package stores various plugins aimed at bot communication with an operator.

Index

Constants

This section is empty.

Variables

View Source
var Plugins = map[string]Creator{}
View Source
var TABLE_HEADER = []string{"title", "recipient", "message"}

Functions

func Add

func Add(name string, creator Creator)

Types

type Creator

type Creator func(map[string]string) (Plugin, error)

NOTE map[string]interface{} for better type support after casting ?

type Envelope

type Envelope struct {
	Title     string
	Recipient string
}

type Plugin

type Plugin interface {
	Send(Envelope, string) error
}

type Pushbullet

type Pushbullet struct {
	// contains filtered or unexported fields
}

func NewPushbullet

func NewPushbullet(apiKey string) *Pushbullet

func (Pushbullet) Send

func (p Pushbullet) Send(envelope_ Envelope, message string) error

type Serf

type Serf struct {
	RPC *client.RPCClient
	// contains filtered or unexported fields
}

func (Serf) Send

func (p Serf) Send(envelope_ Envelope, payload string) error

type Shell

type Shell struct {
	// contains filtered or unexported fields
}

func (Shell) Send

func (s Shell) Send(envelope_ Envelope, message string) error

Jump to

Keyboard shortcuts

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