Documentation ¶
Index ¶
- Variables
- func NewCmdConfig(flag string) (*cmd.Config, error)
- func NewCompressor(err error) compressor.Compressor
- func NewGRPCClient(ctx context.Context, lc fx.Lifecycle, logger *zap.Logger, ...) *grpc.ClientConn
- func NewGRPCServer(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, ...) *tgrpc.Server
- func NewHTTPClient(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, ...) *http.Client
- func NewHTTPClientWithRoundTripper(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, ...) *http.Client
- func NewHTTPServer(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, ...) *shttp.Server
- func NewLogger(lc fx.Lifecycle) *zap.Logger
- func NewMarshaller(err error) marshaller.Marshaller
- func NewOAuthConfig() *oauth.Config
- func NewPGConfig() *pg.Config
- func NewRedisCache(lc fx.Lifecycle, host string, logger *zap.Logger, ...) *cache.Cache
- func NewRedisClient(lc fx.Lifecycle, host string, logger *zap.Logger) gr.Client
- func NewRedisConfig(host string) *redis.Config
- func NewRistrettoCache(lc fx.Lifecycle, meter metric.Meter) *ristretto.Cache
- func NewTracerConfig() *tracer.Config
- func NewTransportConfig() *transport.Config
- func Port() string
- func RegisterTransport(lc fx.Lifecycle, cfg *transport.Config, gs *tgrpc.Server, hs *shttp.Server)
- type Config
- func (cfg *Config) GRPCConfig() *grpc.Config
- func (cfg *Config) HTTPConfig() *http.Config
- func (cfg *Config) NSQConfig() *nsq.Config
- func (cfg *Config) OAuthConfig() *oauth.Config
- func (cfg *Config) PGConfig() *pg.Config
- func (cfg *Config) RedisConfig() *redis.Config
- func (cfg *Config) RistrettoConfig() *ristretto.Config
- func (cfg *Config) TransportConfig() *transport.Config
- type Consumer
- type Generator
- type Migrator
- type Server
- type Shutdowner
- type Verifier
Constants ¶
This section is empty.
Variables ¶
View Source
var Environment = env.Environment("dev")
Environment for test.
View Source
var ErrInvalidToken = errors.New("invalid token")
ErrInvalidToken ...
View Source
var Version = version.Version("1.0.0")
Version for test.
Functions ¶
func NewCmdConfig ¶ added in v1.80.0
NewCmdConfig for test.
func NewCompressor ¶ added in v1.57.3
func NewCompressor(err error) compressor.Compressor
NewCompressor for test.
func NewGRPCClient ¶ added in v1.65.5
func NewGRPCClient( ctx context.Context, lc fx.Lifecycle, logger *zap.Logger, tcfg *transport.Config, ocfg *tracer.Config, cred credentials.PerRPCCredentials, meter metric.Meter, ) *grpc.ClientConn
NewGRPCClient for test.
func NewGRPCServer ¶ added in v1.65.5
func NewGRPCServer( lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, verifyAuth bool, unary []grpc.UnaryServerInterceptor, stream []grpc.StreamServerInterceptor, meter metric.Meter, ) *tgrpc.Server
NewGRPCServer for test.
func NewHTTPClient ¶ added in v1.30.0
func NewHTTPClient(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, meter metric.Meter) *http.Client
NewHTTPClient for test.
func NewHTTPClientWithRoundTripper ¶ added in v1.30.0
func NewHTTPClientWithRoundTripper(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, rt http.RoundTripper, meter metric.Meter) *http.Client
NewHTTPClientWithRoundTripper for test.
func NewHTTPServer ¶ added in v1.65.5
func NewHTTPServer(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, tcfg *transport.Config, meter metric.Meter) *shttp.Server
NewHTTPServer for test.
func NewMarshaller ¶ added in v1.57.3
func NewMarshaller(err error) marshaller.Marshaller
NewMarshaller for test.
func NewOAuthConfig ¶ added in v1.103.0
NewOAuthConfig for test.
func NewRedisCache ¶ added in v1.65.4
func NewRedisCache(lc fx.Lifecycle, host string, logger *zap.Logger, compressor compressor.Compressor, marshaller marshaller.Marshaller, meter metric.Meter) *cache.Cache
NewRedisCache for test.
func NewRedisClient ¶ added in v1.75.0
NewRedisClient for test.
func NewRedisConfig ¶ added in v1.76.0
NewRedisConfig for test.
func NewRistrettoCache ¶ added in v1.66.0
NewRistrettoCache for test.
func NewTracerConfig ¶ added in v1.91.0
NewTracerConfig for test.
func NewTransportConfig ¶ added in v1.70.0
NewTransportConfig for test.
Types ¶
type Config ¶ added in v1.71.0
type Config struct{}
Config for test.
func (*Config) GRPCConfig ¶ added in v1.71.0
func (*Config) HTTPConfig ¶ added in v1.71.0
func (*Config) OAuthConfig ¶ added in v1.103.0
func (*Config) RedisConfig ¶ added in v1.71.0
func (*Config) RistrettoConfig ¶ added in v1.71.0
func (*Config) TransportConfig ¶ added in v1.71.0
type Consumer ¶ added in v1.106.0
type Consumer struct {
// contains filtered or unexported fields
}
Consumer for test.
type Generator ¶ added in v1.32.3
type Generator struct {
// contains filtered or unexported fields
}
Generator for test.
func NewGenerator ¶ added in v1.4.0
NewGenerator for test.
type Migrator ¶ added in v1.66.4
type Migrator struct {
// contains filtered or unexported fields
}
Migrator for test.
type Server ¶
type Server struct { v1.UnimplementedGreeterServiceServer // contains filtered or unexported fields }
Server ...
func (*Server) SayHello ¶
func (s *Server) SayHello(ctx context.Context, req *v1.SayHelloRequest) (*v1.SayHelloResponse, error)
SayHello ...
func (*Server) SayStreamHello ¶
func (s *Server) SayStreamHello(stream v1.GreeterService_SayStreamHelloServer) error
SayStreamHello ...
type Shutdowner ¶
type Shutdowner struct {
// contains filtered or unexported fields
}
func NewShutdowner ¶
func NewShutdowner() *Shutdowner
func (*Shutdowner) Called ¶ added in v1.66.4
func (s *Shutdowner) Called() bool
func (*Shutdowner) Shutdown ¶
func (s *Shutdowner) Shutdown(...fx.ShutdownOption) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.