gateway

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gateway provides implementations to send data through the transport (e.g. headers).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopTransport

type NoopTransport struct {
}

NoopTransport defines a no-op transport.

func NewNoopTransport

func NewNoopTransport() *NoopTransport

func (*NoopTransport) SetHeader

func (n *NoopTransport) SetHeader(_ context.Context, key, value string)

type RPCTransport

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

RPCTransport defines a transport for gRPC.

func NewRPCTransport

func NewRPCTransport(l logger.Logger) *RPCTransport

NewRPCTransport returns a transport for gRPC.

func (*RPCTransport) SetHeader

func (g *RPCTransport) SetHeader(ctx context.Context, key, value string)

SetHeader tries to set a header. If an error occurred, it logs an error.

type Transport

type Transport interface {
	// SetHeader sets a response header with a key and a value.
	// It should not be called after a response has been sent.
	SetHeader(ctx context.Context, key, value string)
}

Transport is the interface to work with the transport layer.

Jump to

Keyboard shortcuts

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