Documentation ¶
Index ¶
- func GetPageSize(defaultPageSize int32, maxPageSize int32, req PageSizeRequest) (pageSize int32, err error)
- func InitPrometheusMetrics(server *grpc.Server)
- func LoggingUnaryServerInterceptor(log *zap.Logger) grpc.UnaryServerInterceptor
- func NewClientConnection(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
- func NewServer(log *zap.Logger) *grpc.Server
- type PageSizeRequest
- type ServerController
- type ServerControllerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPageSize ¶
func GetPageSize( defaultPageSize int32, maxPageSize int32, req PageSizeRequest, ) (pageSize int32, err error)
func InitPrometheusMetrics ¶
func LoggingUnaryServerInterceptor ¶
func LoggingUnaryServerInterceptor(log *zap.Logger) grpc.UnaryServerInterceptor
func NewClientConnection ¶
func NewClientConnection(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error)
NewClientConnection establishes new gRPC client connection and returns it.
Types ¶
type PageSizeRequest ¶
type PageSizeRequest interface {
GetPageSize() int32
}
PageSizeRequest describes a request with page size parameter.
type ServerController ¶
type ServerController struct {
// contains filtered or unexported fields
}
func NewServerController ¶
func NewServerController( addr string, server *grpc.Server, log *zap.Logger, opts ...ServerControllerOption, ) *ServerController
func (*ServerController) Wait ¶
func (sm *ServerController) Wait() <-chan error
type ServerControllerOption ¶
type ServerControllerOption func(*ServerController)
func ServerControllerWithUnixSocket ¶
func ServerControllerWithUnixSocket(path string) ServerControllerOption
Click to show internal directories.
Click to hide internal directories.