forward

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProtocolVersion .
	ProtocolVersion = 1
	// HandshakeTimeout .
	HandshakeTimeout = 60 * time.Second
)

Variables

This section is empty.

Functions

func EncodeRequestHeader

func EncodeRequestHeader(w io.Writer, h *RequestHeader) error

EncodeRequestHeader .

func EncodeResponseHeader

func EncodeResponseHeader(w io.Writer, h *ResponseHeader) error

EncodeResponseHeader .

func Pipe

func Pipe(log logs.Logger, c1, c2 io.ReadWriter)

Pipe .

Types

type RequestHeader

type RequestHeader struct {
	Version    uint32
	Name       string
	Token      string
	ShadowAddr string
}

RequestHeader .

func DecodeRequestHeader

func DecodeRequestHeader(r io.Reader) (*RequestHeader, error)

DecodeRequestHeader .

type ResponseHeader

type ResponseHeader struct {
	ShadowAddr string
	Error      string
	Values     map[string]interface{}
}

ResponseHeader .

func DecodeResponseHeader

func DecodeResponseHeader(r io.Reader) (*ResponseHeader, error)

DecodeResponseHeader .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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