scrapeWatch

package module
v0.0.0-...-2eac793 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 12 Imported by: 0

README

ScrapeWatch

A simple cloud function that processes scrape scheme status messages. It uses Firebase for scheme status storage.

Logging

To see the logs just run:

gcloud functions logs read scrapeWatch

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindConfig

func BindConfig()

func NewFirebase

func NewFirebase(projectId string, credentialsFile string) (*firestore.Client, error)

func NewFirebaseFromEnv

func NewFirebaseFromEnv() (*firestore.Client, error)

func NonErrorStatusReceived

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

Types

type FirebaseConfig

type FirebaseConfig struct {
	Project     string
	Credentials string
}

func GetFirebaseConfig

func GetFirebaseConfig() (*FirebaseConfig, error)

type PubSubMessage

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

PubSubMessage is the payload of a Pub/Sub event.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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