transport

package
v1.134.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Unlicense Imports: 6 Imported by: 8

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" json:"grpc" toml:"grpc"`
	HTTP http.Config `yaml:"http" json:"http" toml:"http"`
}

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() error
	Stop(ctx context.Context) error
}

Server for transport.

func NewServers added in v1.125.0

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

NewServers for transport.

Jump to

Keyboard shortcuts

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