Help us shape the future of Go! Take the 2026 Go Developer Survey

clients

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCertPool

func GetCertPool() (certPool *x509.CertPool, err error)

GetCertPool reads the SSL certificate from the configured file and creates a certificate pool.

Returns:

  • certPool: Pointer to x509.CertPool containing the loaded certificate.
  • err: an error message if the setup fails.

func GetGrpcDialOptions

func GetGrpcDialOptions(scheme string) (options []grpc.DialOption, err error)

GetGrpcDialOptions creates gRPC dial options with custom dialing logic and transport credentials based on the scheme.

Parameters:

  • scheme: A string indicating the connection scheme ("http" or "https").

Returns:

  • options: A slice of grpc.DialOption configured for the connection.
  • err: an error message if the setup fails.

func GetHttpClient

func GetHttpClient() (httpClient *http.Client, err error)

GetHttpClientWithCert creates an HTTP client configured with TLS using a custom SSL certificate.

Returns:

  • httpClient: Pointer to http.Client configured with TLS.
  • err: an error message if the setup fails.

func GetTlsConfigWithCert

func GetTlsConfigWithCert() (tlsConfig *tls.Config, err error)

getTlsConfigWithCert sets up a TLS configuration using a custom SSL certificate.

Returns:

  • tlsConfig: Pointer to tls.Config configured with the custom certificate.
  • err: an error message if the setup fails.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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