- Basic Information TODO: first done
- Project Structure TODO: first run
- How To Use TODO:
- Prerequisites TODO:
- Build a Function TODO:
- Host Builder TODO: describe host builder
- Other Builders TODO: mention few builders, custom
- Deploy a Function TODO:
- Configuration TODO: Is this necessary?
- Tips & Tricks TODO: instanced/static methods?
- Q&A TODO: Probably get rid of this or tips section
- License TODO:
- Contact TODO:
This repository showcases some use-cases for your Knative Functions! It is a collection of function templates. The built-in templates are either http or cloudevents and these are custom template overrides.
Templates in this repository include:
- The easiest Hello World (
hello
) - Simple splash screen with referenced .css file and .funcignore (
splash
) - Web blog with serverside rendering and import statements (
blog
) - A "Contact Us" function with a secret password (
contact-us
)
See project structure to learn about repository and see how to deploy your function.
Directory structure is as follows: root/[language]/[template] where root is
the github repository itself, language is the programming language used and
template is the name of the template. Function is created using templates via
--repository
flag when using func create
command. More in How-To-Use section.
github.com/gauron99/func-templates <--[root]
├── go <------------------------------[language]
│ └── hello <-----------------------[template]
│ └── function source files
│ └── splash-screen
│ └── ...
├── node
│ └── hello
│ └── splash-screen
├── ...
You use these templates by creating your function via --repository
flag which
means "create my function with this template".
- Create a function with hello template in golang within the current directory
func create --repository=https://github.com/gauron99/func-templates -t=hello -l go
- TODO add more examples / explanations
- Download func
- Download docker
- Download local cluster runner (kind)
- Download cli commands for k8s (kubectl)
This is the prefered way
This is the old way (pack/s2i)
- dont edit func.yaml ?
Divide dirs for each language
go/
|
├ basic/
| ├ template/
| | └ <template to easily fetch>
| └ README.md
| └ describes how to use, steps to manually (init, deploy -- easy)
└ advanced/
├ template/
| └ <template to easily fetch>
└ README.md
└ describes advanced deploy (using build, --image, remote deploy w/ tekton)
- python
- same as go
- node
- same as go
- ...
something something super license. its free yay
contact us at super website here or there
Error: function may not implement both the static and instanced method signatures simultaneously
-> this happens when `func (f *F) Somename(){}` is defined as well as `func Handle(){}`