gresponsewriter

package
v1.7.13-rc.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLockedWriter added in v1.7.16

func NewLockedWriter(w http.ResponseWriter) http.ResponseWriter

Types

type Client

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

Client is an http.ResponseWriter that talks over RPC.

func NewClient

func NewClient(header http.Header, client responsewriterpb.WriterClient) *Client

NewClient returns a response writer connected to a remote response writer

func (*Client) Flush

func (c *Client) Flush()

func (*Client) Header

func (c *Client) Header() http.Header

func (*Client) Hijack

func (c *Client) Hijack() (net.Conn, *bufio.ReadWriter, error)

func (*Client) Write

func (c *Client) Write(payload []byte) (int, error)

func (*Client) WriteHeader

func (c *Client) WriteHeader(statusCode int)

type Server

type Server struct {
	responsewriterpb.UnsafeWriterServer
	// contains filtered or unexported fields
}

Server is an http.ResponseWriter that is managed over RPC.

func NewServer

func NewServer(writer http.ResponseWriter) *Server

NewServer returns an http.ResponseWriter instance managed remotely

func (*Server) Flush

func (s *Server) Flush(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error)

func (*Server) Hijack

func (*Server) WriteHeader

Jump to

Keyboard shortcuts

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