Documentation
¶
Index ¶
- func NewClientConnGrpc(ctx context.Context, addr string, certs ClientCertFiles) (*grpc.ClientConn, error)
- func NewGrpcClient[T any](ctx context.Context, addr string, certs ClientCertFiles, ...) (T, error)
- func NewServerGRPC(certs ServerCertFiles, reg func(srv *grpc.Server), opt ...grpc.ServerOption) (*grpc.Server, error)
- type CertFiles
- type ClientCertFiles
- type ServerCertFiles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConnGrpc ¶
func NewClientConnGrpc(ctx context.Context, addr string, certs ClientCertFiles) (*grpc.ClientConn, error)
func NewGrpcClient ¶
func NewGrpcClient[T any](ctx context.Context, addr string, certs ClientCertFiles, constructor func(cc grpc.ClientConnInterface) T, ) (T, error)
func NewServerGRPC ¶
func NewServerGRPC(certs ServerCertFiles, reg func(srv *grpc.Server), opt ...grpc.ServerOption) (*grpc.Server, error)
Types ¶
type CertFiles ¶
type CertFiles struct { ServerCertPemFilePath, ServerKeyPemFilePath, CAFilePath, ClientCertPemFilePath, ClientKeyPemFilePath string }
func (*CertFiles) ClientCertFiles ¶
func (cf *CertFiles) ClientCertFiles() ClientCertFiles
func (*CertFiles) ServerCertFiles ¶
func (cf *CertFiles) ServerCertFiles() ServerCertFiles
type ClientCertFiles ¶
type ClientCertFiles struct { CAFilePath, ClientCertPemFilePath, ClientKeyPemFilePath string }
type ServerCertFiles ¶
type ServerCertFiles struct { ServerCertPemFilePath, ServerKeyPemFilePath, CAFilePath string }
Click to show internal directories.
Click to hide internal directories.