gateway

package
v2.20.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package gateway is an example of gRPC-Gateway server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run starts a HTTP server and blocks while running if successful. The server will be shutdown when "ctx" is canceled.

Types

type Endpoint

type Endpoint struct {
	Network, Addr string
}

Endpoint describes a gRPC endpoint

type Options

type Options struct {
	// Addr is the address to listen
	Addr string

	// GRPCServer defines an endpoint of a gRPC service
	GRPCServer Endpoint

	// OpenAPIDir is a path to a directory from which the server
	// serves OpenAPI specs.
	OpenAPIDir string

	// Mux is a list of options to be passed to the gRPC-Gateway multiplexer
	Mux []gwruntime.ServeMuxOption
}

Options is a set of options to be passed to Run

Jump to

Keyboard shortcuts

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