grpcplugin

package
v0.0.0-...-d76060a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(eh EventHandler) *handler

NewHandler returns an initialized handler

func Serve

func Serve(bindAddress string, handler EventHandler, opt ...grpc.ServerOption) error

Serve registers the EventHandler and starts the GRPC server

Types

type CloudEvent

type CloudEvent proto.CloudEvent

type EventHandler

type EventHandler interface {
	Handle(*CloudEvent) (*Result, error)
}

EventHandler should be implemented by the plugins that are doing some actions based on alerts

type Result

type Result proto.Result

Directories

Path Synopsis
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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