ipc

package
v0.0.0-...-3de72e3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ipc provides IPC functionality between rewrapper(client) and reproxy(server).

Index

Constants

View Source
const (
	// GrpcCxxSupportsUDS is true because the grpc cpp library supports uds on mac and linux.
	GrpcCxxSupportsUDS = true
)
View Source
const (
	// GrpcMaxMsgSize is the max value of gRPC response that can be received by the client (in bytes)
	GrpcMaxMsgSize = 1024 * 1024 * 32 // 32MB (default is 4MB)
)

Variables

This section is empty.

Functions

func DialContext

func DialContext(ctx context.Context, serverAddr string) (*grpc.ClientConn, error)

DialContext connects to the serverAddress for grpc. Returns immediately and will make the connection lazily when needed. This is the recommended approach to dialing from the grpc documentation (https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md)

func DialContextWithBlock

func DialContextWithBlock(ctx context.Context, serverAddr string) (*grpc.ClientConn, error)

DialContextWithBlock connects to the serverAddress for grpc, but waits until the connection is made (via WithBlock) until returning. This is NOT the recommended approach to dialing, but is needed for bootstrap which relies on WithBlock as a check that reproxy has started successfully. Also needed for reproxy connecting to the depsscannerservice. TODO(b/290804932): Remove the dependence on WithBlock as a startup check.

func GetAllReproxySockets

func GetAllReproxySockets(ctx context.Context) ([]string, error)

GetAllReproxySockets returns all unix sockets where an reproxy service is listening.

func Listen

func Listen(serverAddr string) (net.Listener, error)

Listen announces on the serverAddr to accept grpc connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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