server

package
v0.0.0-...-b41ccf1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapNamespacesRoutes

func MapNamespacesRoutes(route martini.Router)

MapNamespacesRoutes maps routes for all namespaces

func MapRouteBySchema

func MapRouteBySchema(server *Server, dataStore db.DB, s *schema.Schema)

MapRouteBySchema setup api route by schema

func MapRouteBySchemas

func MapRouteBySchemas(server *Server, dataStore db.DB)

MapRouteBySchemas setup route for all loaded schema

func MonitoringUpdate

func MonitoringUpdate(response *gohan_sync.Event, server *Server) error

MonitoringUpdate updates the state in the db based on the sync event

func RunServer

func RunServer(configFile string)

RunServer runs gohan api server

func StateUpdate

func StateUpdate(response *gohan_sync.Event, server *Server) error

StateUpdate updates the state in the db based on the sync event

Types

type DbSyncWrapper

type DbSyncWrapper struct {
	db.DB
}

DbSyncWrapper wraps db.DB so it logs events in database on every transaction.

func (*DbSyncWrapper) Begin

func (sw *DbSyncWrapper) Begin() (transaction.Transaction, error)

Begin wraps transaction object with sync

type Server

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

Server is a struct for GohanAPIServer

func NewServer

func NewServer(configFile string) (*Server, error)

NewServer returns new GohanAPIServer

func (*Server) Start

func (server *Server) Start() (err error)

Start starts GohanAPIServer

func (*Server) Stop

func (server *Server) Stop()

Stop stops GohanAPIServer

func (*Server) Sync

func (server *Server) Sync() error

Sync to sync backend database table

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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