Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Instanced functions #2621

Open
matzew opened this issue Dec 18, 2024 · 1 comment
Open

Go Instanced functions #2621

matzew opened this issue Dec 18, 2024 · 1 comment

Comments

@matzew
Copy link
Member

matzew commented Dec 18, 2024

Currently we have zero documentation how to create an instanced Go-lang function, on our developer guide:

Perhaps it would also make sense to change the default to be instanced, and than just document how to get the static handler, in case folks want that.

@matzew
Copy link
Member Author

matzew commented Jan 13, 2025

Building the func (e.g. via main) branch, I see this:

./func create --help                                         

NAME
	func create - Create a function

SYNOPSIS
	func create [-l|--language] [-t|--template] [-r|--repository]
	            [-c|--confirm]  [-v|--verbose]  [path]

DESCRIPTION
	Creates a new function project.

	  $ func create -l node

	Creates a function in the current directory '.' which is written in the
	language/runtime 'node' and handles HTTP events.

	If [path] is provided, the function is initialized at that path, creating
	the path if necessary.

	To complete this command interactively, use --confirm (-c):
	  $ func create -c

	Available Language Runtimes and Templates:
	  Language     Template
	  --------     --------
	  go           cloudevents
	  go           http
	  node         cloudevents
	  node         http
	  ...
	  some more
	  ...
	  typescript   cloudevents
	  typescript   http
	  

	To install more language runtimes and their templates see 'func repository'.


EXAMPLES
	o Create a Node.js function in the current directory (the default path) which
	  handles http events (the default template).
	  $ func create -l node

	o Create a Node.js function in the directory 'myfunc'.
	  $ func create -l node myfunc

	o Create a Go function which handles CloudEvents in ./myfunc.
	  $ func create -l go -t cloudevents myfunc
		

Usage:
  func create [flags]

Aliases:
  create, init

Flags:
  -c, --confirm             Prompt to confirm options interactively ($FUNC_CONFIRM)
  -l, --language string     Language Runtime (see help text for list) ($FUNC_LANGUAGE)
  -r, --repository string   URI to a Git repository containing the specified template ($FUNC_REPOSITORY)
  -t, --template string     Function template. (see help text for list) ($FUNC_TEMPLATE) (default "http")
  -v, --verbose             Print verbose logs ($FUNC_VERBOSE)

I do not see any statement on how to get the instanced func. Or is that not possible yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant