Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertPool ¶
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 ¶
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 ¶
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.
Click to show internal directories.
Click to hide internal directories.