pilotutil

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialPilotService

func DialPilotService(ctx context.Context, host string, port int) (
	client pbpilot.PilotServiceClient,
	conn *grpc.ClientConn,
	err error,
)

func DialPilotServiceForFrontgate_TLS added in v0.2.0

func DialPilotServiceForFrontgate_TLS(
	ctx context.Context, host string, port int,
	tlsConfig *tls.Config,
) (
	client pbpilot.PilotServiceForFrontgateClient,
	conn *grpc.ClientConn,
	err error,
)

func LoadPilotClientTLSConfig added in v0.2.0

func LoadPilotClientTLSConfig(
	certFile, keyFile, caCertFile, tlsServerName string,
) (p *pbtypes.PilotClientTLSConfig, err error)

func LoadPilotConfig

func LoadPilotConfig(path string) (*pbtypes.PilotConfig, error)

func LoadPilotTLSConfig added in v0.2.0

func LoadPilotTLSConfig(
	serverCertFile, serverKeyFile string,
	clientCertFile, clientKeyFile string,
	caCertFile string,
	tlsServerName string,
) (p *pbtypes.PilotTLSConfig, err error)

func MustLoadPilotConfig

func MustLoadPilotConfig(path string) *pbtypes.PilotConfig

func NewClientTLSConfigFromPbConfig added in v0.2.0

func NewClientTLSConfigFromPbConfig(pbcfg *pbtypes.PilotClientTLSConfig) (*tls.Config, error)

func NewServerTLSConfigFromPbConfig added in v0.2.0

func NewServerTLSConfigFromPbConfig(pbcfg *pbtypes.PilotTLSConfig) (*tls.Config, error)

Types

type FrameChannel

type FrameChannel struct {
	RecvMsgFunc func() ([]byte, error)
	SendMsgFunc func(data []byte) error
	CloseFunc   func() error
	// contains filtered or unexported fields
}

func DialPilotChannelTLS added in v0.4.0

func DialPilotChannelTLS(
	ctx context.Context,
	target string,
	tlsConfig *tls.Config,
	opts ...grpc.DialOption,
) (*FrameChannel, *grpc.ClientConn, error)

func (*FrameChannel) Close

func (p *FrameChannel) Close() error

func (*FrameChannel) Read

func (p *FrameChannel) Read(data []byte) (n int, err error)

func (*FrameChannel) Write

func (p *FrameChannel) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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