grpcutil

package module
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProviderSet = wire.NewSet(
		NewServer,
		NewServerOption,
	)
)

Functions

This section is empty.

Types

type Address

type Address string

func (Address) Address

func (a Address) Address() string

type Server

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

func NewServer

func NewServer(opt *ServerOption) *Server

func (*Server) Listen

func (s *Server) Listen(ctx context.Context)

func (*Server) Register

func (s *Server) Register(fn func(*grpc.Server)) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context)

type ServerOption

type ServerOption struct {
	Listener net.Listener
	Logger   *slog.Logger
	Server   *grpc.Server
	// contains filtered or unexported fields
}

func NewServerOption

func NewServerOption(addr Address, logger *slog.Logger, opts ...grpc.ServerOption) (
	*ServerOption, func(), error,
)

Jump to

Keyboard shortcuts

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