microservice

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package microservice provides ... TODO This microservice should ... TODO

Index

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) Serve

func (service *MicroService) Serve() error

Serve the microservice

func (*MicroService) Setup

func (service *MicroService) Setup(
	serverName string,
	serverInstance *grpcservice.GRPCServer,
	serverLogger *server.Logger,
	client *GrpcClientMicroService,
) error

Setup the microservice

func (*MicroService) Stop

func (service *MicroService) Stop() error

Stop the microservice

Directories

Path Synopsis
cmd
service
The command line interface to the microservice
The command line interface to the microservice
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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