cloudflare

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package cloudflare provides a CloudFlare Workers adapter for go-trpc.

CloudFlare Workers with Go uses the syumai/workers library which provides a standard net/http compatible runtime via WASM.

Usage:

r := router.NewRouter()
cloudflare.Serve(r)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(r *router.Router) http.Handler

Handler returns an http.Handler that serves the go-trpc router. Use this if you need to compose the handler with other middleware before passing to workers.Serve.

func Serve

func Serve(r *router.Router)

Serve starts the CloudFlare Workers runtime with the given router. This function blocks and should be the last call in main().

Types

This section is empty.

Jump to

Keyboard shortcuts

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