client

package
v0.0.0-...-5fac4bd Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGRPCClient

func NewGRPCClient(proxyAddr, serviceAddr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

NewGRPCClient creates a new gRPC client connection. It establishes a connection to the specified service address using the provided proxy address and options. The proxy address should be in the format "host:port". The service address should be in the format "serviceName.nameSpace". Additional options can be passed as variadic arguments of type grpc.DialOption. The function returns a *grpc.ClientConn and an error.

func NewHTTPClient

func NewHTTPClient(proxyAddr string) (*http.Client, error)

NewHTTPClient creates a new HTTP client with the specified proxy address. The proxyAddr parameter should be in the format "host:port". It returns a pointer to an http.Client and an error if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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