rpc

package
v1.9.24 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: MPL-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCClientOptions

func GRPCClientOptions(tlsCertificateAuthorityPath, tlsCertificatePath, tlsPrivateKey string, insecureSkipVerify bool) []grpc.DialOption

func GRPCServerOptions

func GRPCServerOptions(mTLS bool, tlsCertificateAuthorityPath, tlsCertificatePath, tlsPrivateKey string) []grpc.ServerOption

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(cn string, san []string, ipAddresses []net.IP) (*tls.Certificate, error)

func ListLocalIP

func ListLocalIP() []net.IP

func Server

func Server(config ServerConfig) *grpc.Server

Types

type ClientConfig

type ClientConfig struct {
	TLSCertificateAuthorityPath string
	TLSCertificatePath          string
	TLSPrivateKeyPath           string
	InsecureSkipVerify          bool
}

type Dialer

type Dialer func(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error)

func GRPCDialer

func GRPCDialer(config ClientConfig) Dialer

type ServerConfig

type ServerConfig struct {
	TLSCertificateAuthorityPath string
	TLSCertificatePath          string
	TLSPrivateKeyPath           string
	VerifyClientCert            bool
}

Jump to

Keyboard shortcuts

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