handler

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2022 License: Apache-2.0 Imports: 30 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDFormat   = regexp.MustCompilePOSIX("^[a-z0-9-]+$")
	NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")

	FunctionKey    = "function/func/"
	OwnerKey       = "function/owner/"
	ReservationKey = "function/reservation/"
	BuildLogsKey   = "function/buildlogs/"
)
View Source
var (
	GoogleRuntimes = []string{
		"nodejs16",
		"python39",
		"go116",
		"java11",
		"dotnet3",
		"ruby27",
		"php74",
	}

	// hardcoded list of supported regions
	GoogleRegions = []string{"europe-west1", "us-central1", "us-east1", "us-west1", "asia-east1"}

	SourceFile = map[string]string{
		"nodejs16": "index.js",
		"nodejs14": "index.js",
		"nodejs12": "index.js",
		"nodejs10": "index.js",
		"nodejs8":  "index.js",
		"nodejs6":  "index.js",
		"python39": "main.py",
		"python38": "main.py",
		"python37": "main.py",
		"go116":    "main.go",
		"go113":    "main.go",
		"go111":    "main.go",
		"java11":   "main.java",
		"dotnet3":  "main.cs",
		"ruby27":   "app.rb",
		"ruby26":   "app.rb",
		"php74":    "index.php",
	}

	GitIgnore = []string{
		".git",
		"dist",
		"node_modules",
		"vendor",
		"*.jar",
	}
)

Functions

This section is empty.

Types

type Function

type Function struct{}

func (*Function) Reserve added in v0.24.0

func (f *Function) Reserve(ctx context.Context, req *pb.ReserveRequest, rsp *pb.ReserveResponse) error

Call is a single request handler called via client.Call or the generated client code

type GoogleFunction added in v0.24.0

type GoogleFunction struct {
	*Function
	// contains filtered or unexported fields
}

func NewFunction

func NewFunction(svc *service.Service) *GoogleFunction

func (*GoogleFunction) Call added in v0.24.0

func (*GoogleFunction) Delete added in v0.24.0

func (*GoogleFunction) DeleteData added in v0.25.0

func (e *GoogleFunction) DeleteData(ctx context.Context, request *adminpb.DeleteDataRequest, response *adminpb.DeleteDataResponse) error

func (*GoogleFunction) Deploy added in v0.24.0

func (*GoogleFunction) Describe added in v0.24.0

func (*GoogleFunction) List added in v0.24.0

func (*GoogleFunction) Logs added in v0.26.0

func (*GoogleFunction) Proxy added in v0.24.0

func (*GoogleFunction) Regions added in v0.24.0

func (*GoogleFunction) Runtimes added in v0.26.0

func (*GoogleFunction) Update added in v0.24.0

func (*GoogleFunction) Usage added in v0.26.0

func (e *GoogleFunction) Usage(ctx context.Context, request *adminpb.UsageRequest, response *adminpb.UsageResponse) error

func (*GoogleFunction) WriteGcloudIgnore added in v0.26.0

func (e *GoogleFunction) WriteGcloudIgnore(dir string) error

type Reservation added in v0.24.0

type Reservation struct {
	// The function name
	Name string `json:"name"`
	// The owner e.g tenant id
	Owner string `json:"owner"`
	// Uniq associated token
	Token string `json:"token"`
	// Time of creation
	Created time.Time `json:"created"`
	// The expiry time
	Expires time.Time `json:"expires"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL