client

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

internal/client/connect.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL added in v0.4.0

func BaseURL(endpoint string, insecure bool) string

BaseURL converts a gRPC-style endpoint to an HTTPS base URL. Port 443 is dropped (implied by https://). Non-standard ports are preserved. insecure=true produces an http:// scheme.

func New

func New(jwt string, insecure bool, verbose bool) *http.Client

New returns an *http.Client that injects Authorization: Bearer <jwt> on every request. Empty jwt skips the header (proxy-injected auth). insecure=true disables TLS verification. verbose=true wraps the transport with a debugTransport that logs requests/responses to stderr.

func Options added in v0.4.0

func Options(transport string) []connect.ClientOption

Options returns connect.ClientOptions for the given transport string. "http" → gRPC-Web over HTTP/1.1 (proxy-friendly). Anything else (including "") → gRPC over HTTP/2.

Types

This section is empty.

Jump to

Keyboard shortcuts

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