connectrpc_client

package module
v0.0.0-...-c226a84 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any](
	config Config,
	logger logger,
	fn func(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) T,
	opts ...Option,
) (T, error)

Types

type Config

type Config struct {
	Name string `validate:"required" default:"connectrpc-client" example:"backend-connectrpc-client"`
	Addr string `usage:"connectrpc server address" example:"localhost:9000"`
	// contains filtered or unexported fields
}

Config provides configuration for grpc cleint.

type Option

type Option func(s *Config)

func WithConnectrpcOpts

func WithConnectrpcOpts(opts ...connect.ClientOption) Option

func WithContext

func WithContext(v context.Context) Option

func WithHttpClient

func WithHttpClient(c connect.HTTPClient) Option

func WithName

func WithName(v string) Option

Jump to

Keyboard shortcuts

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