nodego

package
v0.0.0-...-88e5de2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const BucketTrigger = "/"

BucketTrigger is the pattern to pass to http.Handle or http.HandleFunc to handle Cloud Storage bucket events.

Currently, storage bucket trigger request paths are of the form: /execute/_ah/push-handlers/pubsub/projects/{ARBITRARY_VALUE}/topics/{ARBITRARY_VALUE}

View Source
const HTTPTrigger = executePrefix

HTTPTrigger is the pattern to pass to http.Handle or http.HandleFunc to handle HTTP requests.

View Source
const PubSubTrigger = "/"

PubSubTrigger is the pattern to pass to http.Handle or http.HandleFunc to handle Cloud Pub/Sub messages.

Currently, pub sub trigger request paths are of the form: /execute/_ah/push-handlers/pubsub/projects/{PROJECT}/topics/{TOPIC}

Variables

View Source
var (

	// InfoLogger is a logger that batches sends logs to the supervisor with a
	// severity level of INFO.
	InfoLogger = log.New(infoLogWriter, "", 0)
	// InfoLogger is a logger that batches sends logs to the supervisor with a
	// severity level of ERROR.
	ErrorLogger = log.New(errorLogWriter, "", 0)
)

Functions

func OverrideLogger

func OverrideLogger()

OverrideLogger sets the default logger output to the supervisor logger with a severity level of INFO.

func TakeOver

func TakeOver()

TakeOver listens and servers http.DefaultServeMux on the address passed by a command line flag.

func WithLogger

func WithLogger(handler http.Handler) http.Handler

WithLogger returns an http.Handler that reads the function execution ID, attaches it to log messages sent to the supervisor.

func WithLoggerFunc

func WithLoggerFunc(handler http.HandlerFunc) http.HandlerFunc

WithLoggerFunc is the same as WithLogger but accepts a handler function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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