transport

package
v1.148.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 7 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GRPCModule for fx.
	GRPCModule = fx.Options(
		fx.Provide(grpc.NewServer),
		fx.Provide(gtracer.NewTracer),
	)

	// HTTPModule for fx.
	HTTPModule = fx.Options(
		fx.Provide(http.NewServer),
		fx.Provide(htracer.NewTracer),
	)

	// Module for fx.
	Module = fx.Options(
		GRPCModule,
		HTTPModule,
		fx.Provide(NewServers),
		fx.Invoke(Register),
	)
)

Functions

func Register added in v1.70.0

func Register(params RegisterParams)

Register all the transports.

Types

type Config

type Config struct {
	GRPC *grpc.Config `yaml:"grpc,omitempty" json:"grpc,omitempty" toml:"grpc,omitempty"`
	HTTP *http.Config `yaml:"http,omitempty" json:"http,omitempty" toml:"http,omitempty"`
}

Config for transport.

type RegisterParams added in v1.70.0

type RegisterParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Servers   []Server
}

RegisterParams for transport.

type Server added in v1.70.1

type Server interface {
	Start()
	Stop(ctx context.Context)
}

Server for transport.

func NewServers added in v1.125.0

func NewServers(http *http.Server, grpc *grpc.Server, debug *debug.Server) []Server

NewServers for transport.

Jump to

Keyboard shortcuts

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