Commit Graph
22 Commits
Author SHA1 Message Date
Soam Vasani 2c872642f3 Put it all together 2016-09-01 14:38:47 -07:00
Soam Vasani 865a60110f Rename mutablemux updateRouter method 2016-09-01 14:37:33 -07:00
Soam Vasani 322ca405f6 Verify request success while testing http requests 2016-09-01 14:34:56 -07:00
Soam Vasani 9bd586ce61 Include PoolManager URL in function handler state and initializer 2016-09-01 14:34:33 -07:00
Soam Vasani 53eeff3c44 Build test utils only in 'go test' 2016-08-31 11:00:42 -07:00
Soam Vasani 2b0b2e28ae HTTP Handler for functions
The function handler will be the handler for each http trigger.  It
will look up the function service map to find a service for the
function (and call the pool manager to create a new service if one
doesn't already exist, though this isn't implemented yet).  It'll then
proxy the request to the service.
2016-08-30 16:41:16 -07:00
Soam Vasani a33f4e48e9 Simplify test a bit 2016-08-30 16:40:20 -07:00
Soam Vasani b9b7f9bbfc Function service map: cache parsed URLs instead of strings 2016-08-30 16:39:39 -07:00
Soam Vasani d990a0b9af Function (name, uid) -> service URL map
Concurrency-safe mapping from a function's (name, uid) identifier to a
URL.  This will be used to look up the service URL associated with a
given function.
2016-08-29 15:31:53 -07:00
Soam Vasani 828fa5f88c Fix test shutdown
Mutable mux test occasionally panics because the server is shut down
before the client goroutine.  Fix this by shutting down the client
goroutines before shutting down the server.
2016-08-29 15:30:04 -07:00
Soam Vasani ad961d4f4d Wrapper around mux to allow runtime route changes
We want to be able to update routes without restarting the http
server.  mutableRouter is a very thin wrapper around
github.com/gorilla/mux that enables safely switching to a new mux
router without pausing requests.
2016-08-26 13:50:51 -07:00
Soam VasaniandGitHub a45ec1448c Merge pull request #2 from platform9/nodejs-function-run-container
NodeJS Function Run Container
2016-08-24 13:52:07 -07:00
Soam Vasani 12f6a93352 Test other http verbs: get, put, post, delete, options, trace, head. 2016-08-24 13:49:45 -07:00
Soam Vasani 0ea5e2b05e Remove unused dependency
And we aren't using the 'start' command either.
2016-08-24 13:18:43 -07:00
Soam Vasani 7a316b14e6 Use require instead of eval to load user code 2016-08-24 13:10:35 -07:00
Soam Vasani 337843f5bc Test script bugfix 2016-08-24 13:10:17 -07:00
Soam Vasani 076b57c50a A very rudimentary test script
We should have real tests with mocha/chai etc. Until then, use this
little bash script.
2016-08-24 11:56:49 -07:00
Soam Vasani ef04ff83cb Use const where appropriate.
And log errors to stderr instead of stdout.
2016-08-24 11:55:40 -07:00
Soam Vasani 67be5a7b10 NodeJS Function Run Container
First cut of a function run container for NodeJS. So far, just the
simplest stuff: loads a user function and routes requests to it. The
user function is assumed to be in a file at a provided location. The
fission runtime is expected to place the file there securely (exactly
how we'll do that is TBD).

Doesn't handle path template params, query strings, etc. Will also
need to be extended later with some sort of hook for graceful
shutdown.
2016-08-23 17:23:20 -07:00
Bich C. LeandGitHub be0556f5e0 Merge pull request #1 from platform9/initial-documentation
Initial docs commit
2016-08-22 09:02:49 -07:00
Soam Vasani 206a8c262e Initial docs commit 2016-08-18 21:37:52 -07:00
Soam Vasani 90c14cfa08 Create master branch 2016-08-18 21:35:42 -07:00