Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCServer ¶
type GRPCServer struct { Name string Description string DefaultService config.ServiceAddress RegisterService func(*grpc.Server, *handler.H) error UseDB bool UseSessions bool }
GRPCServer is the server to run
func (*GRPCServer) Make ¶
func (s *GRPCServer) Make(commands []*cli.Command) []*cli.Command
Make makes a command-line server out of the provided parameters
func (*GRPCServer) MakeHandlerFunc ¶ added in v0.3.0
func (s *GRPCServer) MakeHandlerFunc(configFile string) (HandlerFunc, error)
MakeHandlerFunc returns a function with a channel to close to stop it, or any error it received while trying to create the server. It accepts a string to get the configuration filename.
type HandlerFunc ¶ added in v0.3.0
type HandlerFunc func() (*ServerStatus, error)
HandlerFunc is a function that launches a service
type ServerStatus ¶ added in v0.3.0
type ServerStatus struct { // Alive is for closing when you want the server to stop. Alive chan struct{} // Finished is closed when the server has gracefully stopped. Finished chan struct{} // TracingCloser is the io.Closer that controls tracing. TracingCloser io.Closer }
ServerStatus represents multiple states within the server
Click to show internal directories.
Click to hide internal directories.