transport

package
v0.0.0-...-aeec266 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelBindingMechanism

type ChannelBindingMechanism int

ChannelBindingMechanism represents a scram channel binding mechanism.

const (
	// TLSUnique represents 'tls-unique' channel binding mechanism.
	TLSUnique ChannelBindingMechanism = iota
)

type Transport

type Transport interface {
	io.ReadWriteCloser

	// Type returns transport type value.
	Type() Type

	// WriteString writes a raw string to the transport.
	WriteString(s string) (n int, err error)

	// Flush writes any buffered data to the underlying io.Writer.
	Flush() error

	// SetWriteDeadline sets the deadline for future write calls.
	SetWriteDeadline(d time.Time) error

	// StartTLS secures the transport using SSL/TLS.
	StartTLS(cfg *tls.Config, asClient bool)

	// EnableCompression activates a compression mechanism on the transport.
	EnableCompression(level compress.Level)

	// ChannelBindingBytes returns current transport channel binding bytes.
	ChannelBindingBytes(mechanism ChannelBindingMechanism) []byte

	// PeerCertificates returns the certificate chain presented by remote peer.
	PeerCertificates() []*x509.Certificate
}

Transport represents a stream transport mechanism.

func NewSocketTransport

func NewSocketTransport(conn net.Conn) Transport

NewSocketTransport creates a socket stream transport.

type Type

type Type int

Type represents a stream transport type (socket).

const (
	// Socket represents a socket transport type.
	Socket Type = iota + 1
)

func (Type) String

func (tt Type) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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