ogdl: github.com/rveen/ogdl/ogdlrf Index | Files

package ogdlrf

import "github.com/rveen/ogdl/ogdlrf"

Index

Package Files

client.go function.go server.go

func Serve Uses

func Serve(host string, handler Function, timeout int) error

Serve starts a remote function server. Incomming requests should be handled by the given Function. This version of Serve doesn't work with AddRoute.

func Serve1 Uses

func Serve1(host string, handler Function, timeout int) error

Serve1 starts a remote function server. Incomming requests should be handled by the given Function. This version of Serve doesn't work with AddRoute.

type Client Uses

type Client struct {
    Host string

    Timeout  int
    Protocol int
    // contains filtered or unexported fields
}

Client represents a the client side of a remote function (also known as a remote procedure call).

func (*Client) Call Uses

func (rf *Client) Call(g *ogdl.Graph) (*ogdl.Graph, error)

func (*Client) Close Uses

func (rf *Client) Close()

Close closes the underlying connection, if open.

func (*Client) Dial Uses

func (rf *Client) Dial() error

type Function Uses

type Function func(net.Conn, *ogdl.Graph) *ogdl.Graph

Function is the prototype of functions to be server by ogdlrf.Serve

type Server Uses

type Server struct {
    Host    string
    Timeout int
    // contains filtered or unexported fields
}

Server hold the state of the server side of a remote function.

func (*Server) AddRoute Uses

func (s *Server) AddRoute(path string, f Function)

AddRoute associates a handler function with the given path. A path in this context is the first child of the incomming request.

func (*Server) Serve Uses

func (s *Server) Serve() error

Serve starts a remote function server. Handler functions should be set up with AddRoute.

Package ogdlrf imports 6 packages (graph). Updated 2017-10-23. Refresh now. Tools for package owners.