Documentation ¶
Overview ¶
Package microservice provides ... TODO This microservice should ... TODO
Index ¶
- Constants
- type GrpcClientMicroService
- type MicroService
- func (service *MicroService) Hello(ctx context.Context, request *protobuf.Request) (*protobuf.Response, error)
- func (service *MicroService) Serve() error
- func (service *MicroService) Setup(serverName string, serverInstance *grpcservice.GRPCServer, ...) error
- func (service *MicroService) Stop() error
Constants ¶
View Source
const Version = "0.1.0"
Version of the Library
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcClientMicroService ¶
type GrpcClientMicroService struct { GrpcClient *grpcservice.GRPCClient AccessInfo *grpcservice.ConnectionInfo MicroServiceClient protobuf.MicroServiceClient }
GrpcClientMicroService extends a generalized gRPC Client by functions to specialize it as MicroService client
func (*GrpcClientMicroService) Close ¶
func (client *GrpcClientMicroService) Close() error
Close shuts down the MicroService Client by closing its gRPC Server connection
func (*GrpcClientMicroService) Connect ¶
func (client *GrpcClientMicroService) Connect(info *grpcservice.ConnectionInfo) error
Connect sets up a connection to a gRPC Server by given parameters and returns an instance of a registered gRPC Service Client
type MicroService ¶
type MicroService struct {
*grpcservice.GRPCService
}
MicroService structure as main entry point
func (*MicroService) Hello ¶
func (service *MicroService) Hello(ctx context.Context, request *protobuf.Request) (*protobuf.Response, error)
Hello returns a Response to the given Response
func (*MicroService) Setup ¶
func (service *MicroService) Setup( serverName string, serverInstance *grpcservice.GRPCServer, serverLogger *server.Logger, client *GrpcClientMicroService, ) error
Setup the microservice
Click to show internal directories.
Click to hide internal directories.