Documentation ¶
Index ¶
Constants ¶
View Source
const ANNOTATION_PREFIX = "com.uswitch.alert"
Variables ¶
View Source
var ( WantPods = Want{ "pods", &v1.Pod{}, func(cs *kubernetes.Clientset) rest.Interface { return cs.CoreV1().RESTClient() }, } WantDeployments = Want{ "deployments", &appsv1.Deployment{}, func(cs *kubernetes.Clientset) rest.Interface { return cs.AppsV1().RESTClient() }, } WantCronJobs = Want{ "cronjobs", &batchv1.CronJob{}, func(cs *kubernetes.Clientset) rest.Interface { return cs.BatchV1().RESTClient() }, } WantIngress = Want{ "ingresses", &networkingv1.Ingress{}, func(cs *kubernetes.Clientset) rest.Interface { return cs.NetworkingV1().RESTClient() }, } )
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func NewEngine ¶
func NewEngine(clientSet *kubernetes.Clientset) *Engine
type Rule ¶
type Rule struct { Id string Wants []Want Handler RuleHandler }
func NewRule ¶
func NewRule(handler RuleHandler, wants ...Want) *Rule
type RuleHandler ¶
type RuleHandler func(runtime.Object, runtime.Object, *RuleHandlerContext)
type RuleHandlerContext ¶
type RuleHandlerContext struct {
// contains filtered or unexported fields
}
func (*RuleHandlerContext) Alert ¶
func (ctx *RuleHandlerContext) Alert(obj runtime.Object, message string)
func (*RuleHandlerContext) Alertf ¶
func (ctx *RuleHandlerContext) Alertf(obj runtime.Object, format string, objs ...interface{})
func (*RuleHandlerContext) Client ¶
func (ctx *RuleHandlerContext) Client() *kubernetes.Clientset
Click to show internal directories.
Click to hide internal directories.