exprcel.dev/expr/tools/celrpc Index | Files

package celrpc

import "cel.dev/expr/tools/celrpc"

Package celrpc defines CEL conformance service RPC helpers.

Index

Functions

func ExampleNewClientFromPath

func ExampleNewClientFromPath()

ExampleNewClientFromPath creates a new CEL RPC client using a path to a server binary. TODO Run from celrpc_test.go.

func RunServer

func RunServer(service exprpb.ConformanceServiceServer)

RunServer listens on a dynamically-allocated port on the loopback network device, prints its address and port to stdout, then starts a gRPC server on the socket with the given service callbacks. Note that this call doesn't return until ther server exits.

Types

type ConfClient

type ConfClient struct {
	exprpb.ConformanceServiceClient
	// contains filtered or unexported fields
}

ConfClient manages calls to conformance test services.

func NewClientFromPath

func NewClientFromPath(serverPath string) (*ConfClient, error)

NewClientFromPath creates a new ConformanceService gRPC client, connecting to a server which is launched by the binary at the given serverPath. The spawned server shares the current process's stderr, so its log messages will be visible. The caller must call Shutdown() on the retured ConfClient, even if NewClientFromPath() returns a non-nil error.

func (*ConfClient) Shutdown

func (c *ConfClient) Shutdown()

Shutdown deallocates all resources associated with the client. No further calls should be made on the client after shutdown. Shutdown should be called even on an error return from NewClientFromPath().

Source Files

celrpc.go

Version
v0.3.0
Published
Aug 20, 2019
Platform
linux/amd64
Imports
9 packages
Last checked
now

Tools for package owners.