gateway

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package gateway implements an HTTP server that forwards JSON requests to an upstream SpiceDB gRPC server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OtelAnnotator

func OtelAnnotator(ctx context.Context, r *http.Request) metadata.MD

OtelAnnotator propagates the OpenTelemetry tracing context to the outgoing gRPC metadata.

Types

type CloserHandler added in v1.16.0

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

CloserHandler is a http.Handler and a io.Closer. Meant to keep track of resources to closer for a handler.

func NewHandler added in v1.2.0

func NewHandler(ctx context.Context, upstreamAddr, upstreamTLSCertPath string) (*CloserHandler, error)

NewHandler creates an REST gateway HTTP CloserHandler with the provided upstream configuration.

func (CloserHandler) Close added in v1.16.0

func (cdh CloserHandler) Close() error

func (CloserHandler) ServeHTTP added in v1.16.0

func (cdh CloserHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type HandlerRegisterer added in v1.16.0

type HandlerRegisterer func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

HandlerRegisterer is a function that registers a Gateway Handler in a ServeMux

Jump to

Keyboard shortcuts

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