Documentation ¶
Index ¶
- Variables
- func GetManager() *manager
- func NewCreateServerErr(err error) error
- func NewGrpcDialError(addr string, err error) error
- func NewGrpcServerNotExistError(name string) error
- func NewGrpcServerStartError(err error) error
- func NewNilServiceRegistryError() error
- type CreateServerErr
- type GrpcDialError
- type GrpcServerNotExistError
- type GrpcServerStartError
- type NilServiceRegistryError
- type ServerConfig
- type ServerWrapper
Constants ¶
This section is empty.
Variables ¶
var (
ServerMaintenanceType = types.NewLogType("PROTOBUF_SERVER_MAINTENANCE")
)
Functions ¶
func GetManager ¶
func GetManager() *manager
GetManager - This function returns singleton instance of gRPC Manager
func NewCreateServerErr ¶
NewCreateServerErr - return a new instance of CreateServerErr
func NewGrpcDialError ¶
NewGrpcDialError - return a new instance of GrpcDialError
func NewGrpcServerNotExistError ¶
NewGrpcServerNotExistError - return a new instance of GrpcServerNotExistError
func NewGrpcServerStartError ¶
NewGrpcServerStartError - return a new instance of GrpcServerStartError
func NewNilServiceRegistryError ¶
func NewNilServiceRegistryError() error
NewNilServiceRegistryError - return a new instance of NilServiceRegistryError
Types ¶
type CreateServerErr ¶
type CreateServerErr struct {
Err error
}
CreateServerErr Error
func (*CreateServerErr) Error ¶
func (err *CreateServerErr) Error() string
Error method - satisfying error interface
type GrpcDialError ¶
type GrpcDialError struct { Err error // contains filtered or unexported fields }
GrpcDialError struct
func (*GrpcDialError) Error ¶
func (err *GrpcDialError) Error() string
Error method - satisfying error interface
type GrpcServerNotExistError ¶
type GrpcServerNotExistError struct {
// contains filtered or unexported fields
}
GrpcServerNotExistError struct
func (*GrpcServerNotExistError) Error ¶
func (err *GrpcServerNotExistError) Error() string
Error method - satisfying error interface
type GrpcServerStartError ¶
type GrpcServerStartError struct {
Err error
}
GrpcServerStartError struct
func (*GrpcServerStartError) Error ¶
func (err *GrpcServerStartError) Error() string
Error method - satisfying error interface
type NilServiceRegistryError ¶
type NilServiceRegistryError struct { }
NilServiceRegistryError struct
func (*NilServiceRegistryError) Error ¶
func (err *NilServiceRegistryError) Error() string
Error method - satisfying error interface
type ServerConfig ¶
type ServerWrapper ¶
type ServerWrapper struct {
// contains filtered or unexported fields
}
ServerWrapper struct
func NewServer ¶
func NewServer(name string, config ServerConfig) (*ServerWrapper, error)
NewServer - create a new instance of Server and return it
func (*ServerWrapper) GetGrpcServer ¶
func (s *ServerWrapper) GetGrpcServer() *grpc.Server
func (*ServerWrapper) IsInitialized ¶
func (s *ServerWrapper) IsInitialized() bool
IsInitialized - return whether the server is started or not
func (*ServerWrapper) RegisterController ¶
func (s *ServerWrapper) RegisterController(desc *grpc.ServiceDesc, realClass interface{}) error
func (*ServerWrapper) Start ¶
func (s *ServerWrapper) Start(ch *chan error) error
Start - start the server with option of async capability