Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.