serverclient

package
v0.0.0-...-25be6c5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string) *Client

func (*Client) Close

func (cl *Client) Close() error

func (*Client) Hop

func (cl *Client) Hop(ctx context.Context, hops int64) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) GetURL

func (srv *Server) GetURL() string

func (*Server) Hop

func (srv *Server) Hop(ctx context.Context, req *examplepb.HopRequest) (
	*examplepb.Empty, error,
)

Hop bounces a request between this server and it's client for a number of hops, and then errors. This illustrates how errors are segmented by gRPC call in Jettison.

func (*Server) SetClient

func (srv *Server) SetClient(client *Client)

func (*Server) Stop

func (srv *Server) Stop()

Jump to

Keyboard shortcuts

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