Commit Graph

213 Commits

Author SHA1 Message Date
Oleg Zhurakousky
d20171d196 GH-265 Added support for injecting execution context
- Added support for injecting target execution context into the ApplicationContext in AbstractSpringFunctionAdapterInitializer, effectively making it available to all adapters (if one is provided)
- Added test, docs

Resolves #265
2019-03-01 17:07:03 +01:00
Oleg Zhurakousky
656741958b Additional simplifications in AbstractComposableFunctionRegistry 2019-03-01 05:43:20 +01:00
Oleg Zhurakousky
5b18fd7b3c Simplified support for implicit functions in composition
added test for namless Supplier | Function
2019-02-28 22:23:02 +01:00
Dave Syer
8d834a7483 Support for implicit functions in composition
If there is only one function then empty String can be used as a
name to look it up.
2019-02-28 10:05:13 -05:00
Oleg Zhurakousky
b48c7b5dc0 Added initial implementation of check for supported function signatures 2019-02-28 15:41:04 +01:00
Oleg Zhurakousky
cdca44f714 Polished adapter initializers consolidation effort
- Added ability to retrieve input type from FunctionRegistration (if available) in AbstractSpringFunctionAdapterInitializer
- Removed azure/AzureSpringFunctionInitializer and aws/SpringFunctionInitializer
- Added additional tests in AWS and Azure modules
- See 0189c578ef for additional info
2019-02-25 19:37:34 +01:00
Dave Syer
41f66e9b48 Fix checkstyle and compiler errors 2019-02-25 15:15:35 +00:00
Dave Syer
ab9c82753f Add null check for function registration in composite 2019-02-25 14:35:14 +00:00
Dave Syer
32987230c1 Add support for composing function of Message with plain function
Fixes gh-267 at least for the most common cases.
2019-02-25 13:53:29 +00:00
Dave Syer
616bb1f685 Convert function composer to work with registrations 2019-02-25 13:51:17 +00:00
Oleg Zhurakousky
0189c578ef GH-266 Consolidated Adapter infrastructure
- Moved common logic into a new AbstractSpringFunctionAdapterInitializer
- Modified Azure and AWS request handlers to extend from it
- Deprecated both AzureSpringFunctionInitializer and SpringFunctionInitializer(AWS)

Resolves #266
2019-02-25 13:25:08 +01:00
Dave Syer
155d76b1a5 Ensure function types and names are registered in memory 2019-02-21 17:39:24 +00:00
Dave Syer
aaf268ea40 Ensure FunctionTypes get registered for composite functions
Without this change the type of a composed function in the
InMemoryFunctionCatalog is always null. The key is to register
the type at the same time as the function is registered.

Also some format and javadoc fixes (cosmetic)
2019-02-21 09:53:15 +00:00
Dave Syer
6865d53c91 Update to 2.1.0 snapshots in all the other places 2019-02-20 13:19:03 +00:00
Oleg Zhurakousky
e86479e839 Polishing, javadoc. . . 2019-02-19 14:12:00 +01:00
Dave Syer
a622d86d3b Add support for MonoSupplier 2019-02-19 10:28:41 +00:00
Oleg Zhurakousky
a945f34ebd GH-261 additional cleanup in function catalog consolidation 2019-02-18 23:15:21 +01:00
Oleg Zhurakousky
0d7e0cc57c GH-261 Added support for function composition InMemoryFunctionCatalog
- Refactored InMemoryFunctionCatalog and BeanFactoryFunctionCatalog into common catalog implementation
- Added initial test

Resolves #261
2019-02-18 22:05:19 +01:00
Oleg Zhurakousky
94106dba48 GH-258 Polishing around duplicqte registration
Removwd formatter plugin
Added additional test

Resolves #258
Resolves #259
2019-02-15 10:15:13 +01:00
Semyon Fishman
95a462467e GH-258, Avoid duplicate registration of functional bean
Added logic in FunctionalSpringApplication to avoid registering the functional bean twice.  This issue occured when executing in "hybrid" mode, and using the same bean as both the application context source and functional bean.
2019-02-13 11:40:25 -05:00
Oleg Zhurakousky
c797e4fed4 Minor refactoring in ContextFunctionRegistry 2019-02-12 15:30:52 +01:00
Oleg Zhurakousky
b076f6349e Consolidated all function wrappers around WrappedFunction 2019-02-11 19:08:52 +01:00
Oleg Zhurakousky
f8e966f79f GH-243 Added wrapper for fluxed Function 2019-02-11 17:08:09 +01:00
Oleg Zhurakousky
805b85b102 GH-243, GH-257 Added reactive consumer wrapper
- Added wrapper for an already reactive consumer to ensure that consumers can be consistently represented as Function<Flux, Mono>
- Fixed the big that deal with inconsistent result in web environments due to inconsistent representation of the Consumers
- Polished tests

Resolves #243
Resolves #257
2019-02-11 15:30:08 +01:00
Oleg Zhurakousky
b1fa949dd9 More polishing in ContextFunctionCatalog 2019-02-06 19:08:44 +01:00
Oleg Zhurakousky
5b98c01d2a Removed duplication of fluxification logic
- Removed duplication of fluxification logic in FunctionRegistration and ContextFunctionCatalog.
- Polished FunctionRegistration.wrap logic
- Added initial javadoc
2019-02-06 16:39:58 +01:00
Oleg Zhurakousky
632b2bf6ab interim 2019-02-06 15:31:31 +01:00
Oleg Zhurakousky
194858bf60 GH-253 Updated AZUR library 2019-02-06 07:59:51 +01:00
Oleg Zhurakousky
79cdf3c9b5 Additional cleanup and refactoring in ContextFunctionCatalog 2019-02-06 00:02:50 +01:00
Oleg Zhurakousky
6a2717a580 Tidy up ContextFunctionCatalog 2019-02-05 23:03:46 +01:00
Marcin Grzejszczak
c6ddfe1af4 Added checkstyle for tests 2019-02-03 15:34:10 +01:00
Marcin Grzejszczak
e4b08a083c Turned on checkstyle 2019-02-01 15:48:32 +01:00
buildmaster
94e9b8f2f8 Bumping versions to 2.0.2.BUILD-SNAPSHOT after release 2019-01-31 14:48:58 +00:00
buildmaster
036e0c4090 Going back to snapshots 2019-01-31 14:48:57 +00:00
buildmaster
eaf519b82a Update SNAPSHOT to 2.0.1.RELEASE 2019-01-31 14:34:17 +00:00
Oleg Zhurakousky
589e451d14 GH-247 Added spring.cloud.function.definition property
Added spring.cloud.function.definition property which is used by FunctionRegistry as a supplement instruction to resolve nameless lookups.
It is used by web module to map single or multiple (composed) functions to the root path (/)

Resolves #247
2019-01-28 18:47:18 +01:00
Dave Syer
cca2833f94 Tighten up contract for SingleEntryFunctionRegistry
And add some tests. Fixes gh-250.
2019-01-17 17:54:12 +00:00
buildmaster
9cf4b72ef3 Bumping versions to 2.0.1.BUILD-SNAPSHOT after release 2019-01-08 11:32:36 +00:00
buildmaster
5b2345c7d4 Going back to snapshots 2019-01-08 11:32:36 +00:00
buildmaster
612d37616d Update SNAPSHOT to 2.0.0.RELEASE 2019-01-08 10:44:55 +00:00
buildmaster
43a886b7b7 Going back to snapshots 2018-12-20 19:14:43 +00:00
buildmaster
291aafd94a Update SNAPSHOT to 2.0.0.RC3 2018-12-20 19:10:34 +00:00
Dave Syer
62b11a4a26 Add global escape hatch for switching off functional beans
This is useful for example if the user is taking care of the
functional bean registration in some other way, and still wants to
use spring.functional.enabled=false to control that.
2018-12-13 09:33:19 +00:00
Oleg Zhurakousky
d89835bd80 GH-232 Removed FunctionScan annotation
Reoved FunctionScan annotation since it provides no additional value to the end user
Preserved auto component scanning for Functions in  package
Updated filter to additionally scan for Supplier and Consumer

Resolves #232
2018-12-03 17:29:16 +01:00
Oleg Zhurakousky
564f238448 GH-236 Added initial spring-configuration-metadata.json
Resolves #236
2018-12-03 15:08:24 +01:00
Oleg Zhurakousky
6a16a44aa0 GH-235 Moved Kotlin support to a separate module
Resolves #235
2018-11-30 18:48:32 +01:00
buildmaster
f0f957b96a Going back to snapshots 2018-11-19 11:23:25 +00:00
buildmaster
241652d9b8 Update SNAPSHOT to 2.0.0.RC2 2018-11-19 11:19:40 +00:00
Dave Syer
8cce006b4c Remove dependency on Kotlin for tests
The Eclipse tooling keeps flaking out and refuses to work at all
since 0.8.7. Maybe revisit this when it is stable.
2018-11-16 17:19:19 +00:00
Oleg Zhurakousky
d1b9a9b3fb Cleaned up FunctionContextUtils
cleaned up FunctionContextUtils to be more generic and return Type instead of FunctionType
2018-11-08 11:17:16 +01:00