notification

package
v0.0.0-...-8f2995f Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2016 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndExecuteNotifier

func CheckAndExecuteNotifier(replicationControllerNotifier *ReplicationControllerNotifier) (bool, error)

func CheckAndExecuteNotifierOnReplicationController

func CheckAndExecuteNotifierOnReplicationController(replicationControllerNotifier *ReplicationControllerNotifier, replicationControllerName string) (bool, error)

func ReloadStorage

func ReloadStorage(storageType int) error

Types

type DummyError

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

func (*DummyError) Error

func (dummyError *DummyError) Error() string

type EmailServerSMTP

type EmailServerSMTP struct {
	Name     string
	Account  string
	Password string
	Host     string
	Port     int
}

func (*EmailServerSMTP) SendEmail

func (emailServerSMTP *EmailServerSMTP) SendEmail(senderAccount string, senderPassword string, senderHost string,
	senderPort int, receiverAccountSlice []string, subject string, body string) error

type Indicator

type Indicator struct {
	Type                  string
	AboveAllOrOne         bool
	AbovePercentageOfData float64
	AboveThreshold        int64
	BelowAllOrOne         bool
	BelowPercentageOfData float64
	BelowThreshold        int64
}

type Notifier

type Notifier interface {
	// contains filtered or unexported methods
}

type NotifierEmail

type NotifierEmail struct {
	Destination          string
	ReceiverAccountSlice []string
}

type NotifierSMSNexmo

type NotifierSMSNexmo struct {
	Destination         string
	Sender              string
	ReceiverNumberSlice []string
}

type NotifierSerializable

type NotifierSerializable struct {
	Kind string
	Data string
}

type ReplicationControllerNotifier

type ReplicationControllerNotifier struct {
	Check                 bool
	CoolDownDuration      time.Duration
	RemainingCoolDown     time.Duration
	KubeApiServerEndPoint string
	KubeApiServerToken    string
	Namespace             string
	Kind                  string
	Name                  string
	NotifierSlice         []Notifier
	IndicatorSlice        []Indicator
}

func ConvertFromSerializable

func ConvertFromSerializable(replicationControllerNotifierSerializable ReplicationControllerNotifierSerializable) (ReplicationControllerNotifier, error)

type ReplicationControllerNotifierSerializable

type ReplicationControllerNotifierSerializable struct {
	Check                 bool
	CoolDownDuration      int64
	RemainingCoolDown     int64
	KubeApiServerEndPoint string
	KubeApiServerToken    string
	Namespace             string
	Kind                  string
	Name                  string
	NotifierSlice         []NotifierSerializable
	IndicatorSlice        []Indicator
}

func ConvertToSerializable

func ConvertToSerializable(replicationControllerNotifier ReplicationControllerNotifier) (ReplicationControllerNotifierSerializable, error)

type SMSNexmo

type SMSNexmo struct {
	Name      string
	Url       string
	APIKey    string
	APISecret string
}

func (*SMSNexmo) SendSMSNexmo

func (smsNexmo *SMSNexmo) SendSMSNexmo(smsNexmoURL string, smsNexmoAPIKey string, smsNexmoAPISecret string,
	sender string, receiverNumberSlice []string, text string) error

type Storage

type Storage interface {
	DeleteReplicationControllerNotifierSerializable(namespace string, kind string, name string) error
	SaveReplicationControllerNotifierSerializable(replicationControllerNotifierSerializable *ReplicationControllerNotifierSerializable) error
	LoadReplicationControllerNotifierSerializable(namespace string, kind string, name string) (*ReplicationControllerNotifierSerializable, error)
	LoadAllReplicationControllerNotifierSerializable() ([]ReplicationControllerNotifierSerializable, error)
	DeleteEmailServerSMTP(name string) error
	SaveEmailServerSMTP(emailServerSMTP *EmailServerSMTP) error
	LoadEmailServerSMTP(name string) (*EmailServerSMTP, error)
	LoadAllEmailServerSMTP() ([]EmailServerSMTP, error)
	DeleteSMSNexmo(name string) error
	SaveSMSNexmo(sMSNexmo *SMSNexmo) error
	LoadSMSNexmo(name string) (*SMSNexmo, error)
	LoadAllSMSNexmo() ([]SMSNexmo, error)
	// contains filtered or unexported methods
}

func GetStorage

func GetStorage() Storage

type StorageCassandra

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

func (*StorageCassandra) DeleteEmailServerSMTP

func (storageCassandra *StorageCassandra) DeleteEmailServerSMTP(name string) error

func (*StorageCassandra) DeleteReplicationControllerNotifierSerializable

func (storageCassandra *StorageCassandra) DeleteReplicationControllerNotifierSerializable(namespace string, kind string, name string) error

func (*StorageCassandra) DeleteSMSNexmo

func (storageCassandra *StorageCassandra) DeleteSMSNexmo(name string) error

func (*StorageCassandra) LoadAllEmailServerSMTP

func (storageCassandra *StorageCassandra) LoadAllEmailServerSMTP() ([]EmailServerSMTP, error)

func (*StorageCassandra) LoadAllReplicationControllerNotifierSerializable

func (storageCassandra *StorageCassandra) LoadAllReplicationControllerNotifierSerializable() ([]ReplicationControllerNotifierSerializable, error)

func (*StorageCassandra) LoadAllSMSNexmo

func (storageCassandra *StorageCassandra) LoadAllSMSNexmo() ([]SMSNexmo, error)

func (*StorageCassandra) LoadEmailServerSMTP

func (storageCassandra *StorageCassandra) LoadEmailServerSMTP(name string) (*EmailServerSMTP, error)

func (*StorageCassandra) LoadReplicationControllerNotifierSerializable

func (storageCassandra *StorageCassandra) LoadReplicationControllerNotifierSerializable(namespace string, kind string, name string) (*ReplicationControllerNotifierSerializable, error)

func (*StorageCassandra) LoadSMSNexmo

func (storageCassandra *StorageCassandra) LoadSMSNexmo(name string) (*SMSNexmo, error)

func (*StorageCassandra) SaveEmailServerSMTP

func (storageCassandra *StorageCassandra) SaveEmailServerSMTP(emailServerSMTP *EmailServerSMTP) error

func (*StorageCassandra) SaveReplicationControllerNotifierSerializable

func (storageCassandra *StorageCassandra) SaveReplicationControllerNotifierSerializable(replicationControllerNotifierSerializable *ReplicationControllerNotifierSerializable) error

func (*StorageCassandra) SaveSMSNexmo

func (storageCassandra *StorageCassandra) SaveSMSNexmo(sMSNexmo *SMSNexmo) error

type StorageDummy

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

func (*StorageDummy) DeleteEmailServerSMTP

func (storageDummy *StorageDummy) DeleteEmailServerSMTP(name string) error

func (*StorageDummy) DeleteReplicationControllerNotifierSerializable

func (storageDummy *StorageDummy) DeleteReplicationControllerNotifierSerializable(namespace string, kind string, name string) error

func (*StorageDummy) DeleteSMSNexmo

func (storageDummy *StorageDummy) DeleteSMSNexmo(name string) error

func (*StorageDummy) LoadAllEmailServerSMTP

func (storageDummy *StorageDummy) LoadAllEmailServerSMTP() ([]EmailServerSMTP, error)

func (*StorageDummy) LoadAllReplicationControllerNotifierSerializable

func (storageDummy *StorageDummy) LoadAllReplicationControllerNotifierSerializable() ([]ReplicationControllerNotifierSerializable, error)

func (*StorageDummy) LoadAllSMSNexmo

func (storageDummy *StorageDummy) LoadAllSMSNexmo() ([]SMSNexmo, error)

func (*StorageDummy) LoadEmailServerSMTP

func (storageDummy *StorageDummy) LoadEmailServerSMTP(name string) (*EmailServerSMTP, error)

func (*StorageDummy) LoadReplicationControllerNotifierSerializable

func (storageDummy *StorageDummy) LoadReplicationControllerNotifierSerializable(namespace string, kind string, name string) (*ReplicationControllerNotifierSerializable, error)

func (*StorageDummy) LoadSMSNexmo

func (storageDummy *StorageDummy) LoadSMSNexmo(name string) (*SMSNexmo, error)

func (*StorageDummy) SaveEmailServerSMTP

func (storageDummy *StorageDummy) SaveEmailServerSMTP(emailServerSMTP *EmailServerSMTP) error

func (*StorageDummy) SaveReplicationControllerNotifierSerializable

func (storageDummy *StorageDummy) SaveReplicationControllerNotifierSerializable(replicationControllerNotifierSerializable *ReplicationControllerNotifierSerializable) error

func (*StorageDummy) SaveSMSNexmo

func (storageDummy *StorageDummy) SaveSMSNexmo(sMSNexmo *SMSNexmo) error

func (*StorageDummy) ShouldCheck

func (storageDummy *StorageDummy) ShouldCheck() bool

type StorageEtcd

type StorageEtcd struct {
}

func (*StorageEtcd) DeleteEmailServerSMTP

func (storageEtcd *StorageEtcd) DeleteEmailServerSMTP(name string) error

func (*StorageEtcd) DeleteReplicationControllerNotifierSerializable

func (storageEtcd *StorageEtcd) DeleteReplicationControllerNotifierSerializable(namespace string, kind string, name string) error

func (*StorageEtcd) DeleteSMSNexmo

func (storageEtcd *StorageEtcd) DeleteSMSNexmo(name string) error

func (*StorageEtcd) LoadAllEmailServerSMTP

func (storageEtcd *StorageEtcd) LoadAllEmailServerSMTP() ([]EmailServerSMTP, error)

func (*StorageEtcd) LoadAllReplicationControllerNotifierSerializable

func (storageEtcd *StorageEtcd) LoadAllReplicationControllerNotifierSerializable() ([]ReplicationControllerNotifierSerializable, error)

func (*StorageEtcd) LoadAllSMSNexmo

func (storageEtcd *StorageEtcd) LoadAllSMSNexmo() ([]SMSNexmo, error)

func (*StorageEtcd) LoadEmailServerSMTP

func (storageEtcd *StorageEtcd) LoadEmailServerSMTP(name string) (*EmailServerSMTP, error)

func (*StorageEtcd) LoadReplicationControllerNotifierSerializable

func (storageEtcd *StorageEtcd) LoadReplicationControllerNotifierSerializable(namespace string, kind string, name string) (*ReplicationControllerNotifierSerializable, error)

func (*StorageEtcd) LoadSMSNexmo

func (storageEtcd *StorageEtcd) LoadSMSNexmo(name string) (*SMSNexmo, error)

func (*StorageEtcd) SaveEmailServerSMTP

func (storageEtcd *StorageEtcd) SaveEmailServerSMTP(emailServerSMTP *EmailServerSMTP) error

func (*StorageEtcd) SaveReplicationControllerNotifierSerializable

func (storageEtcd *StorageEtcd) SaveReplicationControllerNotifierSerializable(replicationControllerNotifierSerializable *ReplicationControllerNotifierSerializable) error

func (*StorageEtcd) SaveSMSNexmo

func (storageEtcd *StorageEtcd) SaveSMSNexmo(smsNexmo *SMSNexmo) error

Jump to

Keyboard shortcuts

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