Soam Vasani and GitHub
9f34fc3dd9
Merge pull request #13 from platform9/cache
...
Cache -- simple threadsafe map
2016-11-01 01:28:27 -07:00
Soam Vasani
1c32ce19fe
Cache -- simple threadsafe map
2016-11-01 01:26:12 -07:00
Soam Vasani and GitHub
ac440ac99f
Merge pull request #12 from platform9/packaging-etc
...
Change controller and router exports to make them usable as libraries
2016-10-29 23:48:38 -07:00
Soam Vasani
fbd76149f5
Add exports to make router usable as a library
2016-10-29 20:40:41 -07:00
Soam Vasani
83c995e019
Don't crash on user function exceptions
2016-10-29 20:39:41 -07:00
Soam Vasani
a93c17548c
Add exports that make controller usable
2016-10-29 20:38:50 -07:00
Soam Vasani and GitHub
ff3efa3434
Merge pull request #11 from platform9/api-version-urls
...
Add API version to URLs
2016-09-29 22:33:27 -07:00
Soam Vasani
012a8de1ec
Add API version to URLs
2016-09-29 21:41:52 -07:00
Soam Vasani and GitHub
3177c035c6
Merge pull request #10 from platform9/nodejs-improvements
...
Nodejs improvements
2016-09-24 12:17:54 -07:00
Soam Vasani
5d76ee8894
Remove outdated comment
2016-09-24 12:17:08 -07:00
Soam Vasani
35e3b3b421
Add logging middleware to log requests
2016-09-24 12:14:27 -07:00
Soam Vasani
b42f4dee6a
Add bodyParser calls for urlencoded and json request content-types
2016-09-24 11:47:01 -07:00
Soam Vasani and GitHub
fedc3f76e3
Merge pull request #9 from platform9/function-raw-code-api
...
Base64 encode the code in json objects.
2016-09-22 01:11:44 -07:00
Soam Vasani
9a65c8a6fb
Undo changes to client function obj
2016-09-22 01:11:17 -07:00
Soam Vasani
79fb54820e
Base64 encode the code in json objects.
...
This will make the API easier for clients. Also add a ?raw=1 flag to
the function GET API, to get just the code of the function.
2016-09-22 01:07:34 -07:00
Soam Vasani and GitHub
d836be88da
Merge pull request #8 from platform9/controller-environment-api
...
API for environments
2016-09-21 23:47:35 -07:00
Soam Vasani
6b67bc0a61
API for environments
...
Environments for functions. For now this is just the image URL for the
function run container. In the future, Environments will also have
build container image URLs, and perhaps parameters to those
containers.
Create/read/update/delete/list. Versioning will be added later. For
now, only the latest update is stored.
2016-09-21 22:29:51 -07:00
Soam Vasani and GitHub
80e73f7f09
Merge pull request #7 from platform9/controller-httptriggerapi
...
Add HTTP trigger API and client
2016-09-21 17:10:12 -07:00
Soam Vasani
f7757bdcc1
Add HTTP trigger API and client
...
This implemenents create/read/update/delete/list for http triggers.
This isn't quite the final implementation: you can't look up old
versions by UUID since it only stores the latest update. I'll get to
that later.
2016-09-21 15:56:29 -07:00
Soam Vasani
fee2fb1d70
Helper func to connect to etcd
2016-09-20 21:58:53 -07:00
Soam Vasani
16a75c8887
Remove call to the validator function
...
(This will be better handled in a higher layer.)
2016-09-20 10:51:44 -07:00
Soam Vasani and GitHub
d88e9837a3
Merge pull request #5 from platform9/controller
...
Controller
2016-09-20 00:58:13 -07:00
Soam Vasani
641cae0206
Fission error type
2016-09-20 00:55:31 -07:00
Soam Vasani
39ef1da415
Key methods for Resource types
2016-09-20 00:55:13 -07:00
Soam Vasani
f02f58cd12
Controller API unit tests
2016-09-20 00:54:26 -07:00
Soam Vasani
72ff031624
Controller API client.
...
Just Functions so far.
2016-09-20 00:53:57 -07:00
Soam Vasani
14734f6435
HTTP API for Functions
...
So far, just Function create/read/update/delete/list. FunctionApi
glues HTTP request/response to functionStore.
2016-09-20 00:45:13 -07:00
Soam Vasani
be16c6a2aa
Minor stuff: debug logs, unit test update
2016-09-20 00:44:19 -07:00
Soam Vasani
a0cfadbd73
Fix deleteFile (missing deletes for etcd metadata)
...
Also move resource and serializer interfaces to types.go
2016-09-20 00:25:50 -07:00
Soam Vasani
66854ff286
Add fission.Error type; add JSON annotations
2016-09-20 00:16:15 -07:00
Soam Vasani
7963d7527c
Wrap resourceStore for Functions, HTTPTriggers and Environments
...
FunctionStore uses fileStore for function code and resourceStore for
the Function's metadata. Environment- and HTTPTrigger- Store are just
thin wrappers on resourceStore.
There is probably a better way to organize this code, maybe with
reflection.
2016-09-20 00:12:21 -07:00
Soam Vasani
94899a88a7
Some sort of generic etcd-backed store
...
- A generic Resource interface, which is serializable and has
a key() method to get an identifying key.
- A resourceStore, which has create, read, update, delete and list.
This wraps etcd key operations and serialization/deserialization in
a convenient service. Serialization is provided to the
resourceStore as a 'serialization' interface. This can be JSON or
anything else.
- The resourceStore also has file operations -- this has read, write
and delete operations. The general idea is to store metadata in
etcd and data on the fileStore (which could also be an object store,
we don't really use any file-specific properties). Files are also
versioned -- each writeFile writes to a new UUID and that UUID is
stored in an etcd in-order list. readFile can retrieve an arbitrary
version by UUID, or just get the latest contents.
2016-09-10 01:01:27 -07:00
Soam Vasani
5c336043db
Move /src/controller/ to /controller
2016-09-10 01:01:27 -07:00
Soam Vasani
60de12dfce
Add delete command to fileStore
2016-09-10 01:01:27 -07:00
Soam Vasani
6ea465c67c
Simple single-threaded file store service
...
Intended for storing function source code.
2016-09-10 01:01:27 -07:00
Soam Vasani
732634b53c
Define main resource types
...
Functions, HTTPTriggers, Metadata, Environment. Update the router to
use fission.Metadata, not fission.Function, to identify functions.
2016-09-10 00:59:39 -07:00
Soam Vasani and GitHub
405dd6fa0f
Merge pull request #6 from platform9/top-level-package
...
Move some fission structs to top level package
2016-09-09 15:10:09 -07:00
Soam Vasani
fb08d98037
Move Function and HTTPTrigger types to top level 'fission' package
2016-09-09 15:04:15 -07:00
Soam Vasani
796a9810a4
Capitalize type names to prepare for moving them to the top level package
2016-09-09 14:39:31 -07:00
Soam Vasani and GitHub
67ce88ebcc
Merge pull request #4 from platform9/move-to-root-dir
...
Move packages to root dir from src/
2016-09-07 14:08:56 -07:00
Soam Vasani
2aa4c58556
Move packages to root dir from src/
...
This is supposed to work slightly better with go import paths. I think.
2016-09-07 14:07:26 -07:00
Soam Vasani and GitHub
3cd3dc37e1
Merge pull request #3 from platform9/router
...
Router, initial merge.
This doesn't yet talk to the Controller or PoolManager APIs.
2016-09-07 14:01:46 -07:00
Soam Vasani
993130d36b
Router unit test
2016-09-07 14:00:18 -07:00
Soam Vasani
b03e7bad2d
HTTP trigger set
...
This is currently:
1. A list of http triggers
2. A method to generate a mux router from that list
This will be in the future:
1. A way to keep the set of triggers up to date, by watching the controller API
2. A way to update the router when the trigger set changes
2016-09-07 13:41:26 -07:00
Soam Vasani
8c56818e0a
apply gofmt
2016-09-01 16:32:32 -07:00
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