example

package module
v0.0.0-...-009975c Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

README

Example

How to run with Cloud Functions/Cloud Scheduler

$ gcloud pubsub topics create bqnotify

$ gcloud functions deploy BqNotify \
    --project mizzy-270104 \
    --region asia-northeast1 \
    --runtime go113 \
    --trigger-topic bqnotify \
    --set-env-vars SLACK_WEBHOOK_URL=$SLACK_WEBHOOK_URL \
    --set-env-vars BQNOTIFY_PROJECT=mizzy-270104

$ gcloud scheduler jobs create pubsub bqnotify \
  --project mizzy-270104 \
  --message-body {} \
  --topic bqnotify \
  --schedule '0 0 * * *'

Notification result example

bqnotify.jpg

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BqNotify

func BqNotify(ctx context.Context, m PubSubMessage) error

BqNotify is a main function to run bqnotify on Cloud Functions

Types

type PubSubMessage

type PubSubMessage struct {
	Data []byte `json:"data"`
}

PubSubMessage is needed to run on Cloud Functions

Jump to

Keyboard shortcuts

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