grpc

package
v0.2200.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Overview

Package grpc implements common gRPC command-line flags.

Index

Constants

View Source
const (
	// CfgServerPort configures the server port.
	CfgServerPort = "grpc.port"
	// CfgDebugPort configures the remote address.
	CfgAddress = "address"
	// CfgWait waits for the remote address to become available.
	CfgWait = "wait"
	// CfgDebugGrpcInternalSocketPath sets custom internal socket path.
	CfgDebugGrpcInternalSocketPath = "debug.grpc.internal.socket_path"

	// LocalSocketFilename is the filename of the unix socket in node datadir.
	LocalSocketFilename = "internal.sock"
)

Variables

View Source
var (
	// ServerTCPFlags has the flags used by the gRPC server.
	ServerTCPFlags = flag.NewFlagSet("", flag.ContinueOnError)
	// ServerLocalFlags has the flags used by the gRPC server.
	ServerLocalFlags = flag.NewFlagSet("", flag.ContinueOnError)
	// ClientFlags has the flags for a gRPC client.
	ClientFlags = flag.NewFlagSet("", flag.ContinueOnError)
)

Functions

func NewClient

func NewClient(cmd *cobra.Command) (*grpc.ClientConn, error)

func NewServerLocal

func NewServerLocal(installWrapper bool) (*cmnGrpc.Server, error)

NewServerLocal constructs a new gRPC server service listening on a specific AF_LOCAL socket using default arguments.

This internally takes a snapshot of the current global tracer, so make sure you initialize the global tracer before calling this.

func NewServerTCP

func NewServerTCP(cert *tls.Certificate, installWrapper bool) (*cmnGrpc.Server, error)

NewServerTCP constructs a new gRPC server service listening on a specific TCP port using default arguments.

This internally takes a snapshot of the current global tracer, so make sure you initialize the global tracer before calling this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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