basehttp

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Overview

Package basehttp contains the base http transport for the orb client, every http transport uses this as base.!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransport

func NewTransport(
	name string, logger log.Logger, scheme string, 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) Call

func (t *Transport) Call(ctx context.Context, req *client.Request[any, any], opts *client.CallOptions,
) (*client.RawResponse, error)

Call does the actual rpc call to the server.

func (*Transport) CallNoCodec

func (t *Transport) CallNoCodec(_ context.Context, _ *client.Request[any, any], _ any, _ *client.CallOptions) error

CallNoCodec is a noop for http based transports.

func (*Transport) NeedsCodec

func (t *Transport) NeedsCodec() bool

NeedsCodec is always true for http based transports.

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) String

func (t *Transport) String() string

Jump to

Keyboard shortcuts

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