gun

package
v0.0.0-...-a0757f8 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLength = errors.New("invalid length")
	ErrSmallBuffer   = errors.New("buffer too small")
)

Functions

func NewHTTP2Client

func NewHTTP2Client(dialFn DialFn, tlsConfig *tls.Config) *http2.Transport

func StreamGunWithConn

func StreamGunWithConn(conn net.Conn, tlsConfig *tls.Config, cfg *Config) (net.Conn, error)

func StreamGunWithTransport

func StreamGunWithTransport(transport *http2.Transport, cfg *Config) (net.Conn, error)

Types

type Config

type Config struct {
	ServiceName string
	Host        string
}

type Conn

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

func (*Conn) Close

func (g *Conn) Close() error

func (*Conn) LocalAddr

func (g *Conn) LocalAddr() net.Addr

func (*Conn) Read

func (g *Conn) Read(b []byte) (n int, err error)

func (*Conn) RemoteAddr

func (g *Conn) RemoteAddr() net.Addr

func (*Conn) SetDeadline

func (g *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (g *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (g *Conn) SetWriteDeadline(t time.Time) error

func (*Conn) Write

func (g *Conn) Write(b []byte) (n int, err error)

type DialFn

type DialFn = func(network, addr string) (net.Conn, error)

Jump to

Keyboard shortcuts

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