server

package
v0.0.0-...-68ec166 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(config *config.Config, offline bool)

StartServer initialize workers and starts HTTP server

Types

type ReqHandler

type ReqHandler struct {
	OnlineWorkers  workerChan
	OfflineWorkers workerChan
	Config         *config.Config
	Offline        bool
}

ReqHandler struct to implement ServeHTTP method

func (*ReqHandler) DumpFeatures

func (r *ReqHandler) DumpFeatures(w http.ResponseWriter, req *http.Request)

DumpFeatures is http request handler.

func (*ReqHandler) SearchFeature

func (r *ReqHandler) SearchFeature(w http.ResponseWriter, req *http.Request)

SearchFeature is http request handler.

func (*ReqHandler) ServeConfig

func (r *ReqHandler) ServeConfig(w http.ResponseWriter, req *http.Request)

ServeConfig is http request handler.

func (*ReqHandler) ServeFeature

func (r *ReqHandler) ServeFeature(w http.ResponseWriter, req *http.Request)

ServeFeature is http request handler.

func (*ReqHandler) ServeFeatures

func (r *ReqHandler) ServeFeatures(w http.ResponseWriter, req *http.Request)

ServeFeatures is http request handler.

func (*ReqHandler) ServeMain

func (r *ReqHandler) ServeMain(w http.ResponseWriter, req *http.Request)

ServeMain is http request handler.

type Response

type Response interface {
	GetError() error
	GetBody() interface{}
	SetError(error)
	SetBody(interface{})
}

Response interface for responses objects

type WorkerConnection

type WorkerConnection struct {
	Name string
	Host string
	Port int
	Conn *rpc.Client
}

WorkerConnection type to store worker connection and data

Jump to

Keyboard shortcuts

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