api

package
v0.0.0-...-f1ab898 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

Package api is to start the api to be listening on different endpoints. The API will listen on the port specified in the PulseConfig.toml. There are 2 endpoints: POST /log/file this will read the file line by line passing in each line to the algorithm POST /log/message (in development) this will take a string and pass it directly to the algorithm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HelloWorld

func HelloWorld(w http.ResponseWriter, r *http.Request)

HelloWorld ... testdummy handler for ec2 instance

func SendFile

func SendFile(w http.ResponseWriter, r *http.Request)

SendFile listens for a POST that has a form field named file and email in the body. Using the file field we will download the specified file to the server. The email field is used to email the user the results once algorithm is done.

func Start

func Start()

Start will run the REST API.

func StreamLog

func StreamLog(w http.ResponseWriter, r *http.Request)

StreamLog listens for post request for a string value. This string is then passed to the algorithm for analyzing.

Types

type Result

type Result struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

Result is used for ResponseWriter in handlers

Jump to

Keyboard shortcuts

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