Versions in this module Expand all Collapse all v0 v0.2.711 Oct 17, 2026 v0.2.710 Oct 3, 2026 Changes in this version + const MaxAssetFiles + const MaxAssetSize + const MaxWSMessage + const TailProtocol + var ConfigNames = []string + var ErrWSClosed = errors.New("websocket closed") + func BuildUpload(metadata map[string]any, mods []Module) ([]byte, string, error) + func Bundle(ctx context.Context, entry, outDir string, minify, nodeCompat, sourcemap bool) (string, error) + func ContentTypeFor(name string, esm bool) string + func FindConfig(dir string) string + func FormatTailPretty(raw []byte, loc *time.Location) string + func HashAsset(data []byte, ext string) string + func IsModuleSyntax(src []byte) bool + func RelativeImports(src []byte) []string + func StripJSONC(in []byte) []byte + type AssetEntry struct + Hash string + Size int64 + type Assets struct + Dir string + Headers string + Manifest map[string]AssetEntry + Redirects string + func ScanAssets(dir string) (*Assets, error) + func (a *Assets) Count() int + func (a *Assets) FileFor(hash string) (string, string, bool) + func (a *Assets) Paths() []string + func (a *Assets) Payload() map[string]AssetEntry + type AssetsConfig struct + Binding string + Directory string + HTMLHandling string + NotFoundHandling string + RunWorkerFirst any + type Binding = map[string]any + func MergeBindings(base, extra []Binding) []Binding + func ParseBindingFlag(kind, val string) (Binding, error) + func VarBinding(name string, v any) Binding + type Config struct + Assets *AssetsConfig + CompatibilityDate string + CompatibilityFlags []string + Dir string + Env string + KeepVars bool + Limits map[string]any + Logpush *bool + Main string + Migrations []Migration + Name string + Observability map[string]any + Path string + Placement map[string]any + PreviewURLs *bool + Raw map[string]any + Routes []Route + TailConsumers []map[string]any + Triggers struct{ ... } + UsageModel string + Vars map[string]any + WorkersDev *bool + func LoadConfig(path, env string) (*Config, error) + func (c *Config) AssetsDir() string + func (c *Config) Bindings() ([]Binding, error) + func (c *Config) MainPath() string + type Migration struct + DeletedClasses []string + NewClasses []string + NewSqliteClasses []string + RenamedClasses []map[string]any + Tag string + TransferredClass []map[string]any + type Module struct + ContentType string + Data []byte + Name string + func LoadModules(main string, extra []string, esm *bool, sourceMaps bool) (mods []Module, isESM bool, err error) + type Route struct + CustomDomain bool + Pattern string + ZoneID string + ZoneName string + type TailEvent struct + Event map[string]any + EventTimestamp int64 + Exceptions []struct{ ... } + Logs []struct{ ... } + Outcome string + ScriptName string + type TailFilterOptions struct + ClientIP []string + Headers []string + Methods []string + Sampling float64 + Search string + Status []string + func (o TailFilterOptions) Filters() ([]map[string]any, error) + type WSConn struct + Protocol string + func DialWS(ctx context.Context, rawURL, protocol string, header http.Header, ...) (*WSConn, error) + func (c *WSConn) Close() error + func (c *WSConn) Ping() error + func (c *WSConn) ReadMessage() ([]byte, error) + func (c *WSConn) WriteText(b []byte) error