app

package
v0.0.0-...-8da0802 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcServer

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

GrpcServer used for implementing proto service

func NewGrpcServer

func NewGrpcServer(service YourProtoServiceServer, port string) (GrpcServer, error)

IMPLEMENT: replace YourProtoServiceServer

func (GrpcServer) Error

func (g GrpcServer) Error() chan error

Error returns the error in the channel instead of error.Error()

func (GrpcServer) Start

func (g GrpcServer) Start()

Start starts the grpc server and listens for error, if err we send the error via the channel

func (GrpcServer) Stop

func (g GrpcServer) Stop()

Stop gracefully stops the grpc server

type RestServer

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

func NewRestServer

func NewRestServer(service YourProtoServiceServer, port string) RestServer

NewRestServer maps routes and returns a rest server

func (RestServer) Error

func (rs RestServer) Error() chan error

Error returns the err in our channel

func (RestServer) Start

func (rs RestServer) Start()

Start starts our rest server reports error through channel

func (RestServer) Stop

func (rs RestServer) Stop() error

Stop stops our rest server

type YourProtoServiceServer

type YourProtoServiceServer interface{}

Jump to

Keyboard shortcuts

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