grpc

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"grpc",
	fx.Provide(
		New,
	),
	fx.Invoke(
		func(
			impl *DefaultModelServiceImpl,
			logger *zap.Logger,
			grpcCfg config.GRPC,
		) {
			srv := grpc.NewServer()
			RegisterDefaultModelServiceServer(srv, impl)
			listener, err := net.Listen("tcp", grpcCfg.HTTP.Addr+":"+grpcCfg.HTTP.Port)
			if err != nil {
				logger.Fatal("failed to listen", zap.Error(err))
			}
			err = srv.Serve(listener)
		},
	),
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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