http

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CallbackBasePath callback path
	CallbackBasePath = "/report/{node}/{executionID}"
	// CallbackBaseResultSubPath result sub path
	CallbackBaseResultSubPath = "/result"
	// CallbackBaseFileSubPath file sub path
	CallbackBaseFileSubPath = "/file"

	// FileName query parameter name
	FileName = "name"
)

Variables

This section is empty.

Functions

func GenericAPIServer

func GenericAPIServer(port int, reportPath string, cache lifecycle.Cache) manager.Runnable

GenericAPIServer prepare the generic api server

func SetupProfiling

func SetupProfiling(r *mux.Router)

SetupProfiling setup profiling

func StaticFileServer

func StaticFileServer(port int, path string) manager.Runnable

StaticFileServer prepare the static file server

Types

type PostServer

type PostServer struct {
	Server
	Cache      lifecycle.Cache
	ReportPath string
}

PostServer post server

func (*PostServer) SaveFile

func (s *PostServer) SaveFile(executionID, name string, data []byte) (string, error)

SaveFile save a received file

type Server

type Server struct {
	Port    int
	Kind    string
	Handler http.Handler
}

Server default server

func (*Server) Start

func (s *Server) Start(stop <-chan struct{}) error

Start the server

Jump to

Keyboard shortcuts

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