grpctest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0, MIT Imports: 8 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(addr string, opts ...grpc.DialOption) (*Client, error)

func (*Client) Buy

func (c *Client) Buy(ctx context.Context, hops int64) error

func (*Client) StreamCandyFrom

func (c *Client) StreamCandyFrom(ctx context.Context) ([]string, error)

func (*Client) StreamCandyTo

func (c *Client) StreamCandyTo(ctx context.Context, candy []string) error

type Server

type Server struct {
	pb.UnsafeCandyStoreServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(addr string) (*Server, error)

func (*Server) Buy

func (s *Server) Buy(ctx context.Context, req *pb.BuyRequest) (*pb.Candy, error)

func (*Server) SetErrFn

func (s *Server) SetErrFn(fn func() error)

func (*Server) StreamCandyFrom

func (s *Server) StreamCandyFrom(_ *emptypb.Empty, stream pb.CandyStore_StreamCandyFromServer) error

func (*Server) StreamCandyTo

func (s *Server) StreamCandyTo(stream pb.CandyStore_StreamCandyToServer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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