Documentation ¶
Overview ¶
Package basehertz contains a base transport which is used by hertz transports.
Index ¶
- func NewTransport(name string, logger log.Logger, scheme string, ...) (orb.TransportType, error)
- type Transport
- func (t *Transport) Call(ctx context.Context, req *client.Request[any, any], opts *client.CallOptions) (*client.RawResponse, error)
- func (t *Transport) CallNoCodec(_ context.Context, _ *client.Request[any, any], _ any, _ *client.CallOptions) error
- func (t *Transport) NeedsCodec() bool
- func (t *Transport) Start() error
- func (t *Transport) Stop(_ context.Context) error
- func (t *Transport) String() string
- type TransportClientCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransport ¶
func NewTransport(name string, logger log.Logger, scheme string, clientCreator TransportClientCreator, ) (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 ¶
NeedsCodec is always true for http based transports.
type TransportClientCreator ¶
TransportClientCreator is a factory for a client transport.
Click to show internal directories.
Click to hide internal directories.