demo

package
v0.0.0-...-0821f6f Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: MIT Imports: 3 Imported by: 0

README

LRPC demo

A Lambda function configured with the Go runtime must exist (it may be created via the AWS web interface or by other means). With lrpc package in your GOPATH and sufficient AWS credentials in your home directory the server may be deployed with: lago deploy -func fname -target github.com/cloudinterfaces/lrpc/demo/server substituting fname above with whatever the function name you wish to deploy to is and assuming it exists in the region us-east-1.

To test it demo/client will make several calls: go run $GOPATH/src/github.com/cloudinterfaces/lrpc/demo/client/clientdemo.go fname Again subsituting fname with whatever the function name is.

The JSON-RPC functionality can also be tested with a test event configured in the AWS Lambda user interface. For example: {"method":"Arith.Divide","params":{"A":5,"B":2},"id":"one"}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	A, B int
}

Args is arguments.

type Arith

type Arith int

Arith is a net/rpc server.

func (*Arith) BadIdea

func (t *Arith) BadIdea(args *struct{}, reply *string) error

func (*Arith) Divide

func (t *Arith) Divide(args *Args, quo *Quotient) error

Divide is the division rpc method.

func (*Arith) Error

func (t *Arith) Error(args *string, reply *string) error

func (*Arith) Multiply

func (t *Arith) Multiply(args *Args, reply *int) error

Multiply is the multiplication rpc method.

func (*Arith) Panic

func (t *Arith) Panic(args *string, reply *string) error

type Quotient

type Quotient struct {
	Quo, Rem int
}

Quotient is quotient.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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