Documentation ¶
Index ¶
- func CreateClient[T any](new func(grpc.ClientConnInterface) T, opts ClientOptions) (res T, err error)
- func InternalError(msg string, err error, args ...interface{}) error
- func InvalidArgument(msg string, args ...interface{}) error
- func NotFound(msg string, args ...interface{}) error
- type ClientOptions
- type EnvServerConfig
- type GrpcServer
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
func CreateClient[T any](new func(grpc.ClientConnInterface) T, opts ClientOptions) (res T, err error)
func InternalError ¶
func InvalidArgument ¶
Types ¶
type ClientOptions ¶
type EnvServerConfig ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
func NewGrpcServer ¶
func NewGrpcServer(opts ServerOptions) (*GrpcServer, error)
func (*GrpcServer) Start ¶
func (gs *GrpcServer) Start() error
func (*GrpcServer) Stop ¶
func (gs *GrpcServer) Stop()
type ServerOptions ¶
type ServerOptions struct { Port int `validate:"required,number"` ServiceDesc *grpc.ServiceDesc `validate:"required"` Handler interface{} `validate:"required"` Logger *slog.Logger TLSConfig *certlib.ServerTLSConfigFiles `validate:"omitempty"` }
func ServerOptionsFromEnvConfig ¶
func ServerOptionsFromEnvConfig(cfg EnvServerConfig) ServerOptions
Click to show internal directories.
Click to hide internal directories.