Documentation
¶
Index ¶
Constants ¶
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}
const HTTPTrigger = executePrefix
HTTPTrigger is the pattern to pass to http.Handle or http.HandleFunc to handle HTTP requests.
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 ¶
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 ¶
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.