transport

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package transport provided internal helpers for the two transport packages (grpctransport and httptransport).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneDetectOptions

func CloneDetectOptions(oldDo *detect.Options) *detect.Options

CloneDetectOptions clones a user set detect option into some new memory that we can internally manipulate before sending onto the detect package.

func GetGRPCTransportCredsAndEndpoint

func GetGRPCTransportCredsAndEndpoint(opts *Options) (credentials.TransportCredentials, string, error)

GetGRPCTransportCredsAndEndpoint returns an instance of google.golang.org/grpc/credentials.TransportCredentials, and the corresponding endpoint to use for GRPC client.

func GetHTTPTransportConfig

func GetHTTPTransportConfig(opts *Options) (cert.Provider, func(context.Context, string, string) (net.Conn, error), error)

GetHTTPTransportConfig returns a client certificate source and a function for dialing MTLS with S2A.

func GetS2AAddress

func GetS2AAddress() string

GetS2AAddress returns the S2A address to be reached via plaintext connection. Returns empty string if not set or invalid.

Types

type Options

type Options struct {
	Endpoint            string
	DefaultEndpoint     string
	DefaultMTLSEndpoint string
	ClientCertProvider  cert.Provider
	Client              *http.Client
}

Options is a struct that is duplicated information from the individual transport packages in order to avoid cyclic deps. It correlates 1:1 with fields on httptransport.Options and grpctransport.Options.

Directories

Path Synopsis
cmd
test_signer.go is a net/rpc server that listens on stdin/stdout, exposing mock methods for testing enterprise certificate proxy flow.
test_signer.go is a net/rpc server that listens on stdin/stdout, exposing mock methods for testing enterprise certificate proxy flow.

Jump to

Keyboard shortcuts

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