service

package
v0.0.0-...-6bb929a Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet

Functions

func RegisterService

func RegisterService(ctx context.Context, sev *Service) ginny.RegistrarFunc

RegisterService

func RegisterTask

func RegisterTask(ctx context.Context, sev *Service) error

RegisterTask 注册消息队列监听

Types

type Service

type Service struct {
	pb.UnimplementedSayServer
	// contains filtered or unexported fields
}

Service the instance for grpc proto.

func NewService

func NewService(
	ctx context.Context,
	config *config.Config,
	cache cache.IRedisCache,

	userRepository repo.IUserRepo,
) (*Service, error)

NewService new service that implement hello

func (*Service) Hello

func (s *Service) Hello(ctx context.Context, req *pb.HelloReq) (*pb.HelloRes, error)

Hello implements grpc proto Hello Method interface.

func (*Service) RpcCli

func (s *Service) RpcCli(ctx context.Context, req *pb.RpcCliReq) (*pb.RpcCliRes, error)

RpcCli implements grpc proto RpcCli Method interface.

func (*Service) Topic

func (s *Service) Topic(ctx context.Context, req *pb.TopicReq) (*pb.TopicRes, error)

Topic implements grpc proto Topic Method interface.

Jump to

Keyboard shortcuts

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