Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrpcClient ¶
func GrpcClient(conn *grpc.ClientConn) interface{}
GrpcClient returns a grpc client
Types ¶
type ServiceInitializer ¶
type ServiceInitializer struct { }
func (*ServiceInitializer) InitService ¶
func (i *ServiceInitializer) InitService(s turbo.Servable) error
InitService is run before the service is started, do initializing staffs for your service here. For example, init turbo components, such as interceptors, pre/postprocessors, errorHandlers, etc.
func (*ServiceInitializer) StopService ¶
func (i *ServiceInitializer) StopService(s turbo.Servable)
StopService is run after both grpc server and http server are stopped, do your cleaning up work here.
Click to show internal directories.
Click to hide internal directories.