Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserServerAPI ¶
type UserServerAPI struct { ServerHTTP *http.Server ServerGRPC *grpc.Server // contains filtered or unexported fields }
UserServerAPI contains the HTTP and GRPC servers which will run the whole user api server. This structure is mainly used as a configuration component that uses a http.Server and grpc.Server objects, themself containing a router/handler for their requests.
func NewUserServerAPI ¶
func NewUserServerAPI() (usersrv UserServerAPI, err error)
NewUserServerAPI will create a new UserServerAPI object. It will initiate the HTTP and GRPC servers by calling the setServerHTTP and serServerGRPC package functions. The function returns an UserServerAPI which will be ready to use, if no error is returned, by calling either usersrv.RunServerHTTP() or usersrv.RunServerGRPC().
TODO: give parameters to the function in order to tune the servers.
func (*UserServerAPI) RunServerGRPC ¶
func (usersrv *UserServerAPI) RunServerGRPC() (err error)
RunServerGRPC starts the grpc service.
func (*UserServerAPI) RunServerHTTP ¶
func (usersrv *UserServerAPI) RunServerHTTP() (err error)
RunServerHTTP starts the http service.