xgress_common

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBufferSize = 10 * 1024
)
View Source
const JwtExpectedDelimCount = 2
View Source
const JwtTokenPrefix = "ey"
View Source
const (
	PayloadFlagsHeader uint8 = 0x10
)

Variables

This section is empty.

Functions

func CheckForFailureResult

func CheckForFailureResult(msg *channel.Message, err error, successType edge_ctrl_pb.ContentType) error

func GetFinHeaders

func GetFinHeaders() map[uint8][]byte

func GetResultOrFailure

func GetResultOrFailure(msg *channel.Message, err error, result protobufs.TypedMessage) error

func IsBearerToken added in v1.1.0

func IsBearerToken(s string) bool

IsBearerToken checks to see if a string has the basic structure required of a JWT.

Types

type XgressConn

type XgressConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewXgressConn

func NewXgressConn(conn net.Conn, halfClose bool, isTransport bool) *XgressConn

func (*XgressConn) Close

func (self *XgressConn) Close() error

func (*XgressConn) CloseWrite

func (self *XgressConn) CloseWrite() error

func (*XgressConn) HandleControlMsg

func (self *XgressConn) HandleControlMsg(controlType xgress.ControlType, headers channel.Headers, responder xgress.ControlReceiver) error

func (*XgressConn) IsClosed

func (self *XgressConn) IsClosed() bool

func (*XgressConn) IsWriteClosed

func (self *XgressConn) IsWriteClosed() bool

func (*XgressConn) LogContext

func (self *XgressConn) LogContext() string

func (*XgressConn) ReadPayload

func (self *XgressConn) ReadPayload() ([]byte, map[uint8][]byte, error)

func (*XgressConn) SetupClientCrypto

func (self *XgressConn) SetupClientCrypto(keyPair *kx.KeyPair, peerKey []byte) error

func (*XgressConn) SetupServerCrypto

func (self *XgressConn) SetupServerCrypto(peerKey []byte) ([]byte, error)

func (*XgressConn) WritePayload

func (self *XgressConn) WritePayload(p []byte, headers map[uint8][]byte) (int, error)

Jump to

Keyboard shortcuts

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