xiaohongshu
xiaohongshu
gcp-functions
GCP Cloud Functions 배포/관리
Full skill instructions
Cloud Functions를 배포하고 관리합니다.
/gcp-functions # 함수 목록 조회
/gcp-functions deploy my-func # 함수 배포
/gcp-functions logs my-func # 로그 조회
/gcp-functions delete my-func # 함수 삭제
gcloud services enable cloudfunctions.googleapis.com --project=$PROJECT_ID
gcloud services enable cloudbuild.googleapis.com --project=$PROJECT_ID
PROJECT_ID=$(gcloud config get-value project)
REGION=asia-northeast3
# Gen 2 (권장)
gcloud functions list --project=$PROJECT_ID --gen2 \
--format="table(name.basename(),state,runtime,updateTime.date())"
# Gen 1
gcloud functions list --project=$PROJECT_ID \
--format="table(name,status,runtime,updateTime.date())"
# 현재 디렉토리에서 배포
gcloud functions deploy FUNCTION_NAME \
--gen2 \
--runtime=python311 \
--region=$REGION \
--source=. \
--entry-point=main \
--trigger-http \
--allow-unauthenticated
# 환경변수 설정
gcloud functions deploy FUNCTION_NAME \
--gen2 \
--runtime=nodejs20 \
--region=$REGION \
--source=. \
--entry-point=handler \
--trigger-http \
--set-env-vars="API_KEY=xxx,DEBUG=true"
# Pub/Sub 트리거
gcloud functions deploy FUNCTION_NAME \
--gen2 \
--runtime=python311 \
--region=$REGION \
--source=. \
--entry-point=process_message \
--trigger-topic=TOPIC_NAME
# Cloud Storage 트리거
gcloud functions deploy FUNCTION_NAME \
--gen2 \
--runtime=python311 \
--region=$REGION \
--source=. \
--entry-point=process_file \
--trigger-event-filters="type=google.cloud.storage.object.v1.finalized" \
--trigger-event-filters="bucket=BUCKET_NAME"
gcloud functions deploy FUNCTION_NAME \
--gen2 \
--region=$REGION \
--memory=256MB \
--timeout=60s \
--min-instances=0 \
--max-instances=100
gcloud functions logs read FUNCTION_NAME \
--region=$REGION \
--gen2 \
--limit=50
# HTTP 함수
curl $(gcloud functions describe FUNCTION_NAME --gen2 --region=$REGION --format='value(url)')
# 데이터와 함께
curl -X POST \
-H "Content-Type: application/json" \
-d '{"name": "test"}' \
$(gcloud functions describe FUNCTION_NAME --gen2 --region=$REGION --format='value(url)')
gcloud functions delete FUNCTION_NAME --region=$REGION --gen2
| 런타임 | 버전 |
|---|---|
| Python | python311, python312 |
| Node.js | nodejs18, nodejs20 |
| Go | go121, go122 |
| Java | java17, java21 |
| Ruby | ruby32 |
## Cloud Functions 목록
| 함수 이름 | 상태 | 런타임 | 트리거 | 업데이트 |
|-----------|------|--------|--------|----------|
| process-order | ACTIVE | python311 | HTTP | 2024-01-15 |
| send-email | ACTIVE | nodejs20 | Pub/Sub | 2024-02-01 |
---
### process-order 상세
| 항목 | 값 |
|------|-----|
| URL | https://xxx.cloudfunctions.net/process-order |
| 리전 | asia-northeast3 |
| 메모리 | 256MB |
| 타임아웃 | 60s |
| 최대 인스턴스 | 100 |
import functions_framework
@functions_framework.http
def main(request):
name = request.args.get('name', 'World')
return f'Hello, {name}!'
exports.handler = (req, res) => {
const name = req.query.name || 'World';
res.send(`Hello, ${name}!`);
};
| 기능 | Gen 1 | Gen 2 |
|---|---|---|
| 기반 | Cloud Functions | Cloud Run |
| 최대 타임아웃 | 9분 | 60분 |
| 최대 메모리 | 8GB | 32GB |
| 동시성 | 1 | 1000 |
| 가격 | 조금 저렴 | 유연 |
| 리소스 | 무료 티어 | 초과 시 |
|---|---|---|
| 호출 | 200만/월 | $0.40/100만 |
| 컴퓨팅 | 400,000 GB-초/월 | $0.0000025/100ms |
| 네트워크 | 5GB/월 | $0.12/GB |
functions-framework 사용xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience