webservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Synthesis bool // CFSMs synthesis.
	Gong      bool // Gong verifier.
	Godel     bool // Godel checker.

	ExamplesDir string // Demo example dir.
	StaticDir   string // Static files dir.
	TemplateDir string // HTML Template dir.

	Handlers []Handler
}

func (*Config) LoadHandlers

func (cfg *Config) LoadHandlers()

type ErrInternal

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

func NewErrInternal

func NewErrInternal(cause error, message string) *ErrInternal

func (*ErrInternal) Error

func (e *ErrInternal) Error() string

func (*ErrInternal) Report

func (e *ErrInternal) Report(w http.ResponseWriter)

Report sends internal server error to web client also logs to console.

type Handler

type Handler struct {
	Name     string
	InitFunc func()
}

Handler is a convenient type to keep all handler initialision in one place.

type Server

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

Server encapsulates all parameters required to run the webservice.

func NewServer

func NewServer(iface, port string, cfg Config) *Server

NewServer creates a new instance of server.

func (*Server) Close

func (s *Server) Close()

func (*Server) Listener

func (s *Server) Listener() net.Listener

Listener creates or returns the existing listener associated to this server.

func (*Server) Start

func (s *Server) Start()

Start runs the server and starts listening for incoming connection.

func (*Server) URL

func (s *Server) URL() string

type WebEditor

type WebEditor struct {
	Config
}

Jump to

Keyboard shortcuts

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