GithubHelp home page GithubHelp logo

ebi-yade / cloud-functions-samples Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 282 KB

Cloud Functions 活用のサンプルコードたち

License: Creative Commons Zero v1.0 Universal

Go 87.23% Shell 5.97% HCL 6.80%

cloud-functions-samples's Introduction

cloud-functions-samples

Cloud Functions 活用のサンプルコードたち(ツッコミ歓迎)

コードコメントに日本語と英語が混ざっているのは気分です。特に理由はありません。

依存ツール

動かすには下記の CLI ツールが必要です。適宜インストールしてください。

  • direnv 環境変数の設定(オプション)
  • gcloud Cloud Functions 関数のデプロイやテスト
  • terraform 依存リソースの管理

gen2 ディレクトリ

Cloud Functions 第2世代で汎用的に使えそうなコードを置いています。(他のところでも現時点では特に明示しない限り第2世代を利用しています)

作成する関数:

  • functions-samples-start (HTTP トリガー。 オンデマンドに CLI 経由等で呼び出す)
  • functions-samples-hook (Pub/Sub トリガー。 functions-samples-start から呼び出される)

デプロイ方法:

./gen2/deploy.sh start

テスト方法:

gcloud functions call functions-samples-start --region=asia-northeast1 --gen2

terraform ディレクトリ

Terraform は個別の関数ごとに分けずに、全ての依存リソースを一括で作成しています。

固定費が発生するリソースはありません。

cloud-functions-samples's People

Contributors

ebi-yade avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.