http

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Overview

Package http contains the http transport for the orb client,

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTP3Transport

func NewHTTP3Transport(logger log.Logger, cfg *orb.Config) (orb.TransportType, error)

NewHTTP3Transport creates a new https transport for the orb client. This transport is used for HTTP/3.

func NewHTTPSTransport

func NewHTTPSTransport(logger log.Logger, cfg *orb.Config) (orb.TransportType, error)

NewHTTPSTransport creates a new https transport for the orb client. This transport is used for HTTPS/1.1.

func NewHTTPTransport

func NewHTTPTransport(network string) func(logger log.Logger, cfg *orb.Config) (orb.TransportType, error)

NewHTTPTransport creates a new https transport for the orb client.

func NewTransport

func NewTransport(
	name string,
	logger log.Logger,
	scheme string,
	network string,
	cfg *orb.Config,
	hclient *http.Client,
) (orb.TransportType, error)

NewTransport creates a Transport with a custom http.Client.

Types

type Transport

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

Transport is a go-orb/plugins/client/orb compatible transport.

func (*Transport) Name

func (t *Transport) Name() string

Name returns the name of this transport.

func (*Transport) Request

func (t *Transport) Request(ctx context.Context, infos client.RequestInfos, req any, result any, opts *client.CallOptions) error

Request does the actual rpc call to the server.

func (*Transport) Start

func (t *Transport) Start() error

Start starts the transport.

func (*Transport) Stop

func (t *Transport) Stop(_ context.Context) error

Stop stop the transport.

func (*Transport) Stream

Stream creates a bidirectional stream to the service endpoint. HTTP transport does not support streaming operations by default.

Jump to

Keyboard shortcuts

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