Module

package
v0.0.0-...-a93fc24 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-2.0 Imports: 16 Imported by: 8

Documentation

Index

Constants

View Source
const TimeParseLayout = "2015-10-14T08:26:26+02:00"

TimeParseLayout is the format in which the timestamps, within the JSON, are expected RFC3339

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalModule

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

ExternalModule caches all the files within the search path

func NewExternalModule

func NewExternalModule() *ExternalModule

NewExternalModule constructs a new ExternalModule, this is a singleton

func (ExternalModule) Call

func (external ExternalModule) Call(moduleName, args, event string) (*Result, error)

Call tries to execute the given Module with the given Event and returns the whole output as Result

type Message

type Message struct {
	Timestamp string
	Severity  string
	Message   string
	Source    string
}

Message represents a message which will be send to the logserver

type Result

type Result struct {
	Event            interface{}
	ReturnCode       int
	RemoteReturnCode int
	Messages         []Message
}

Result represents the output which is expected from a called module

func (Result) DecodeLogMessages

func (moduleResult Result) DecodeLogMessages() *[]*LogServer.LogMessage

DecodeLogMessages converts the LogMessages from the JSON object to LogServer.LogMessages

Directories

Path Synopsis
External
RPC

Jump to

Keyboard shortcuts

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