server

package module
v0.0.0-...-845d9a5 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetReady

func SetReady(readiness bool)

Types

type ArticleServerAPI

type ArticleServerAPI struct {
	ServerHTTP *http.Server
	ServerGRPC *grpc.Server
	// contains filtered or unexported fields
}

ArticleServerAPI mainly servers as a configuration holder. It contains two servers: http.Server and grpc.Server, both servers can be automatically initialized using the NewArticleServerAPI package's method.

func NewArticleServerAPI

func NewArticleServerAPI() (artsrv ArticleServerAPI, err error)

NewArticleServerAPI will create a new ArticleServerAPI struct and initiate both HTTP and GRPC servers. Once returned, the ArticleServerAPI is ready to be used, both gRPC and HTTP endpoint can be started using namely: artsrv.RunServerGRPC() and artsrv.RunServerHTTP()

func (*ArticleServerAPI) RunServerGRPC

func (artsrv *ArticleServerAPI) RunServerGRPC() (err error)

RunServerGRPC starts the grpc service.

func (*ArticleServerAPI) RunServerHTTP

func (artsrv *ArticleServerAPI) RunServerHTTP() (err error)

RunServerHTTP starts the http service.

Jump to

Keyboard shortcuts

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