action

package
v0.0.0-...-8548692 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List all the registered actions.

func Register

func Register(name string, initFunc InitFunc) error

Register registers an InitFunc for the action.

Types

type Action

type Action interface {
	// Do runs the action on an event.
	Do(event *grpc.Event) error
	// String returns a string representation of this action.
	String() string
}

Action performs an action on an event.

func Get

func Get(name string) (Action, error)

Get initializes and returns the registered action.

type InitFunc

type InitFunc func() (Action, error)

InitFunc initializes the action.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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