rpc

package
v0.0.0-...-40912f0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[R any, PR ptr[R]](ctx context.Context, w proto.Message, path string, r *R, opts ...Option) (int, error)

func Format

func Format(path string) string

Format takes a path and returns its URL. For example, given "/api/GetSelf", Format will return "https://subtrace.dev/api/GetSelf" as the URL.

The SUBTRACE_ENDPOINT environment variable can be used to override the domain name used.

func GetHeader

func GetHeader(opts ...Option) http.Header

Types

type Option

type Option func(*http.Request)

func WithTag

func WithTag(key string, val string) Option

func WithToken

func WithToken() Option

func WithoutToken

func WithoutToken() Option

Jump to

Keyboard shortcuts

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