server

package
v0.0.0-...-696a884 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package server contains the core server functionality for Sleepy, including the RPC service, the embedded HTTP server for files uploaded via Sleepy, and an FTP server, containing a subset of functionality required for uploading files to Sleepy in an efficient manner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler

func HTTPHandler(root string) http.Handler

func Register

func Register(rcvr interface{}) error

func ServeFTP

func ServeFTP(addr string) error

func Setup

func Setup(conf *config.Config) error

Types

type Request

type Request struct {
	Module  string      // Module is the name of the module that is to be called.
	Method  string      // Method is the method name to be called.
	Authkey string      // Authkey is the authkey for the connecting user.
	Params  interface{} // Parameters are the RPC method call parameters.
}

Request represents the parameters of an RPC call to Sleepy.

type Server

type Server struct{}

Server is a receiver value for RPC calls from the outside world.

func (*Server) Call

func (s *Server) Call(req *Request, reply *interface{}) error

Call calls into module methods and is used as an intermediary between server and modules.

func (*Server) CallMany

func (s *Server) CallMany(req []*Request, reply *interface{}) error

Jump to

Keyboard shortcuts

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