Merge pull request #1353 from briankane/feature/provider-headers
Feat: Update External Providers documentation to include custom headers
This commit is contained in:
commit
5ec62ecdd6
|
|
@ -40,6 +40,7 @@ Specifies where CueX should send function calls.
|
||||||
- `spec.provider.protocol`: Defines the communication method (currently only `"http"`).
|
- `spec.provider.protocol`: Defines the communication method (currently only `"http"`).
|
||||||
- `spec.provider.endpoint`: The root endpoint of the function provider (e.g. http://my-cuex-server:8443/api/v1)
|
- `spec.provider.endpoint`: The root endpoint of the function provider (e.g. http://my-cuex-server:8443/api/v1)
|
||||||
> e.g. If `#do: "api/example-fn-name"` is defined in a function, CueX will send `POST {provider_endpoint}/api/example-fn-name`.
|
> e.g. If `#do: "api/example-fn-name"` is defined in a function, CueX will send `POST {provider_endpoint}/api/example-fn-name`.
|
||||||
|
- `spec.provider.header`: Optional headers to send with the request in string map format.
|
||||||
|
|
||||||
#### spec.templates
|
#### spec.templates
|
||||||
- Defines CUE function templates that describe available functions.
|
- Defines CUE function templates that describe available functions.
|
||||||
|
|
@ -60,6 +61,8 @@ spec:
|
||||||
provider:
|
provider:
|
||||||
protocol: http # Currently, only `http` is supported
|
protocol: http # Currently, only `http` is supported
|
||||||
endpoint: http://my-cuex-server:8443 # Root endpoint of the provider service
|
endpoint: http://my-cuex-server:8443 # Root endpoint of the provider service
|
||||||
|
header:
|
||||||
|
User-Agent: CueX # Custom headers to send to the Provider service
|
||||||
templates:
|
templates:
|
||||||
utils.cue: | # The filename inside the package
|
utils.cue: | # The filename inside the package
|
||||||
package example // Recommended to match the final segment of the {spec.path} value
|
package example // Recommended to match the final segment of the {spec.path} value
|
||||||
|
|
@ -231,7 +234,7 @@ spec:
|
||||||
With the Package registered, the `utils.#Sum` function is now available for use with WorkflowStepDefinition templates by importing the `ext/utils` provider.
|
With the Package registered, the `utils.#Sum` function is now available for use with WorkflowStepDefinition templates by importing the `ext/utils` provider.
|
||||||
|
|
||||||
```cue
|
```cue
|
||||||
ˇimport (
|
import (
|
||||||
"ext/utils" // The external provider
|
"ext/utils" // The external provider
|
||||||
"vela/op"
|
"vela/op"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue