tcpclient

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ClientPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"
)

Variables

This section is empty.

Functions

func WriteDataFrame

func WriteDataFrame(w io.Writer, streamID uint32, flags Flags, body []byte) error

func WriteHeadersFrame

func WriteHeadersFrame(w io.Writer, streamID uint32, flags Flags, blockFragment []byte) error

func WritePingFrame

func WritePingFrame(w io.Writer, flags Flags, payload []byte) error

func WriteSettingsFrame

func WriteSettingsFrame(w io.Writer, flags Flags, payload []byte) error

Types

type Flags

type Flags uint8
const (

	// Data Frame
	FlagDataEndStream Flags = 0x1
	FlagDataPadded    Flags = 0x8

	// Headers Frame
	FlagHeadersEndStream  Flags = 0x1
	FlagHeadersEndHeaders Flags = 0x4
	FlagHeadersPadded     Flags = 0x8
	FlagHeadersPriority   Flags = 0x20

	// Settings Frame
	FlagSettingsAck Flags = 0x1

	// Ping Frame
	FlagPingAck Flags = 0x1

	// Continuation Frame
	FlagContinuationEndHeaders Flags = 0x4

	FlagPushPromiseEndHeaders Flags = 0x4
	FlagPushPromisePadded     Flags = 0x8
)

func (Flags) Has

func (f Flags) Has(v Flags) bool

Has reports whether f contains all (0 or more) flags in v.

type GRPCClient

type GRPCClient interface {
	Call(ctx context.Context, serviceMethod string, req, res proto.Message) error
	Close()
}

func NewGRPCClient

func NewGRPCClient(serverURL *url.URL) (GRPCClient, error)

Jump to

Keyboard shortcuts

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