kubernetes/vendor/github.com/containerd/ttrpc/client.go

type Client

type ClientOpts

// WithOnClose sets the close func whenever the client's Close() method is called
func WithOnClose(onClose func()) ClientOpts {}

// WithUnaryClientInterceptor sets the provided client interceptor
func WithUnaryClientInterceptor(i UnaryClientInterceptor) ClientOpts {}

// WithChainUnaryClientInterceptor sets the provided chain of client interceptors
func WithChainUnaryClientInterceptor(interceptors ...UnaryClientInterceptor) ClientOpts {}

func chainUnaryInterceptors(interceptors []UnaryClientInterceptor, final Invoker, info *UnaryClientInfo) Invoker {}

// NewClient creates a new ttrpc client using the given connection
func NewClient(conn net.Conn, opts ...ClientOpts) *Client {}

func (c *Client) send(sid uint32, mt messageType, flags uint8, b []byte) error {}

// Call makes a unary request and returns with response
func (c *Client) Call(ctx context.Context, service, method string, req, resp interface{}

type StreamDesc

type ClientStream

type clientStream

func (cs *clientStream) CloseSend() error {}

func (cs *clientStream) SendMsg(m interface{}

func (cs *clientStream) RecvMsg(m interface{}

// Close closes the ttrpc connection and underlying connection
func (c *Client) Close() error {}

// UserOnCloseWait is used to block until the user's on-close callback
// finishes.
func (c *Client) UserOnCloseWait(ctx context.Context) error {}

func (c *Client) run() {}

func (c *Client) receiveLoop() error {}

// createStream creates a new stream and registers it with the client
// Introduce stream types for multiple or single response
func (c *Client) createStream(flags uint8, b []byte) (*stream, error) {}

func (c *Client) deleteStream(s *stream) {}

func (c *Client) getStream(sid streamID) *stream {}

func (c *Client) cleanupStreams(err error) {}

// filterCloseErr rewrites EOF and EPIPE errors to ErrClosed. Use when
// returning from call or handling errors from main read loop.
//
// This purposely ignores errors with a wrapped cause.
func filterCloseErr(err error) error {}

// NewStream creates a new stream with the given stream descriptor to the
// specified service and method. If not a streaming client, the request object
// may be provided.
func (c *Client) NewStream(ctx context.Context, desc *StreamDesc, service, method string, req interface{}

func (c *Client) dispatch(ctx context.Context, req *Request, resp *Response) error {}