Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ pkg/
buildpacks/ # Pack/Cloud Native Buildpacks builder (in container)
s2i/ # Source-to-Image builder (in container)
oci/ # Direct OCI image builder (on host)
builders/ # Builder coordination utilities
docker/ # Docker client, image pushing

knative/ # Knative Serving deployer
deployer/ # Deployment coordination
k8s/ # Kubernetes utilities
operator/ # Knative func-operator integration
keda/ # KEDA autoscaler support

config/ # User/global configuration
scaffolding/ # Project scaffolding logic
pipelines/tekton/ # Remote builds via Tekton
mcp/ # AI agent integration (MCP server)

Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ When a new Function is created, a few files are placed in the new Function's dir

The source of these templates is `./templates`; a directory subdivided by language and template name.
For example, the Go HTTP template is located in `./templates/go/http`.
Some languages (Go, Python) also have scaffolding templates under `./templates/<lang>/scaffolding/`
with `instanced-*` and `static-*` variants used for service-oriented project generation.
The client library and CLI are self-contained
by encoding this directory as a ZIP byte array in the `./generate/zz_filesystem_generated.go` file.
Therefore, any updates to templates require re-generating this file.
Expand All @@ -41,6 +43,7 @@ When changes are made to files in the `./templates` directory,
regenerate `./generate/zz_filesystem_generated.go` by running `make generate/zz_filesystem_generated.go`.
It is also important to run the unit tests of the template modified.
For example, to run the unit tests of the Go templates, use `make test-go`.
To lint scaffolding templates, use `make check-go` (or the equivalent for other languages).
For a list of available make targets, use `make help`.

## Integration Testing
Expand Down
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Functions can be written in the following languages using built-in templates:

* Go (Golang)
* Node.js (JavaScript)
* Quarkus (Java)
* SpringBoot (Java)
* Python
* Quarkus (Java)
* Rust
* SpringBoot (Java)
* TypeScript

Functions can be deployed on the following platforms:

Expand All @@ -23,6 +24,7 @@ Functions can be deployed on the following platforms:
[Function Quickstart](https://knative.dev/docs/getting-started/about-knative-functions/)
[Function Developer's Guide](https://knative.dev/docs/functions/)
[Function Integrator's Guide](integrators_guide.md).
[CLI Command Reference](reference/func.md)

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions docs/function-templates/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ and `/health/readiness`.

Due to the fact that each function runtime is implemented in a different language, the APIs for the lifecycle hooks are not
consistent across all runtimes. This document describes the intent of the lifecycle hooks and the expected behavior of the
function runtime, but does not address the implementation details for each language. Currently none of the function runtimes
expose this behavior. This document is forward-looking.
function runtime, but does not address the implementation details for each language. Python templates currently implement
lifecycle hooks (`start`, `stop`, `alive`, `ready`). Other runtimes may add support in the future.

Function lifecycle hooks allow the function developer to provide custom code that is executed at specific points in the
function's lifecycle. The function developer can provide a function that is executed when the function is started, and when the
Expand Down
2 changes: 1 addition & 1 deletion docs/function-templates/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ generate an app capable of responding to
```

The handlers of each app differ slightly. See its generated
[README.md](../../templates/rust/events/README.md) for more details.
[README.md](../../templates/rust/cloudevents/README.md) for more details.

Have fun!
14,775 changes: 7,387 additions & 7,388 deletions generate/zz_filesystem_generated.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion templates/python/cloudevents/function/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ def ready(self):
""" ready is an optional method for performing a deep check on your
Function's readiness. If removed, the system will assume the function
is ready if the process is running. This is exposed by default at the
path /health/rediness.
path /health/readiness.
"""
return True, "Ready"
2 changes: 1 addition & 1 deletion templates/python/http/function/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ def ready(self):
""" ready is an optional method for performing a deep check on your
Function's readiness. If removed, the system will assume the function
is ready if the process is running. This is exposed by default at the
path /health/rediness.
path /health/readiness.
"""
return True, "Ready"
Loading