dialer

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dialer provides a grpc dialer that can be used to create grpc client connections with different levels of ATLS encryption / verification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer struct {
	// contains filtered or unexported fields
}

Dialer can open grpc client connections with different levels of ATLS encryption / verification.

func New

func New(issuer atls.Issuer, validator atls.Validator, netDialer NetDialer) *Dialer

New creates a new Dialer.

func (*Dialer) Dial

func (d *Dialer) Dial(ctx context.Context, target string) (*grpc.ClientConn, error)

Dial creates a new grpc client connection to the given target using the atls validator.

func (*Dialer) DialInsecure

func (d *Dialer) DialInsecure(ctx context.Context, target string) (*grpc.ClientConn, error)

DialInsecure creates a new grpc client connection to the given target without using encryption or verification. Only use this method when using another kind of encryption / verification (VPN, etc).

func (*Dialer) DialNoVerify

func (d *Dialer) DialNoVerify(ctx context.Context, target string) (*grpc.ClientConn, error)

DialNoVerify creates a new grpc client connection to the given target without verifying the server's attestation.

type NetDialer

type NetDialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

NetDialer implements the net Dialer interface.

Jump to

Keyboard shortcuts

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