Documentation ¶
Index ¶
- Variables
- func NewBaselimeTracerConfig() *tracer.Config
- func NewCmdConfig(flag string) (*cmd.Config, error)
- func NewCompressor(err error) compressor.Compressor
- func NewGRPCClient(lc fx.Lifecycle, logger *zap.Logger, tcfg *transport.Config, ...) *grpc.ClientConn
- func NewGRPCServer(lc fx.Lifecycle, logger *zap.Logger, cfg *tracer.Config, ...) *tg.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, ...) *th.Server
- func NewHook() *hooks.Config
- func NewInsecureDebugConfig() *debug.Config
- func NewInsecureTransportConfig() *transport.Config
- func NewLogger(lc fx.Lifecycle) *zap.Logger
- func NewMarshaller(err error) marshaller.Marshaller
- func NewMeter(lc fx.Lifecycle) metric.Meter
- func NewOTLPMetricsConfig() *metrics.Config
- func NewOTLPTracerConfig() *tracer.Config
- func NewPGConfig() *pg.Config
- func NewPrometheusMetricsConfig() *metrics.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 NewRetry() *retry.Config
- func NewRistrettoCache(lc fx.Lifecycle, meter metric.Meter) ristretto.Cache
- func NewSecureClientConfig() *security.Config
- func NewSecureDebugConfig() *debug.Config
- func NewSecureGRPCClient(lc fx.Lifecycle, logger *zap.Logger, tcfg *transport.Config, ...) *grpc.ClientConn
- func NewSecureTransportConfig() *transport.Config
- func NewTracer(lc fx.Lifecycle) trace.Tracer
- func Port() string
- func RegisterTransport(lc fx.Lifecycle, gs *tg.Server, hs *th.Server)
- func Test(ctx context.Context) meta.Valuer
- func WithTest(ctx context.Context, value meta.Valuer) context.Context
- type Config
- type Generator
- type Server
- type Shutdowner
- type Verifier
Constants ¶
This section is empty.
Variables ¶
var Environment = env.Environment("dev")
Environment for test.
var ErrInvalidToken = errors.New("invalid token")
ErrInvalidToken ...
var Mux = th.NewServeMux()
Mux ...
var Version = version.Version("1.0.0")
Version for test.
Functions ¶
func NewBaselimeTracerConfig ¶ added in v1.128.0
NewBaselimeTracerConfig for test.
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( 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, meter metric.Meter, unary []grpc.UnaryServerInterceptor, stream []grpc.StreamServerInterceptor, ) *tg.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, handlers []negroni.Handler) *th.Server
NewHTTPServer for test.
func NewInsecureDebugConfig ¶ added in v1.154.7
NewInsecureDebugConfig for test.
func NewInsecureTransportConfig ¶ added in v1.113.0
NewInsecureTransportConfig for test.
func NewMarshaller ¶ added in v1.57.3
func NewMarshaller(err error) marshaller.Marshaller
NewMarshaller for test.
func NewOTLPMetricsConfig ¶ added in v1.152.0
NewOTLPMetricsConfig for test.
func NewOTLPTracerConfig ¶ added in v1.152.0
NewOTLPTracerConfig for test.
func NewPrometheusMetricsConfig ¶ added in v1.152.0
NewPrometheusMetricsConfig 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 NewSecureClientConfig ¶ added in v1.131.0
NewSecureClientConfig for test.
func NewSecureDebugConfig ¶ added in v1.154.7
NewInsecureDebugConfig for test.
func NewSecureGRPCClient ¶ added in v1.113.0
func NewSecureGRPCClient( lc fx.Lifecycle, logger *zap.Logger, tcfg *transport.Config, ocfg *tracer.Config, meter metric.Meter, ) *grpc.ClientConn
NewSecureGRPCClient for test.
func NewSecureTransportConfig ¶ added in v1.113.0
NewSecureTransportConfig for test.
func RegisterTransport ¶ added in v1.70.0
RegisterTransport for test.
Types ¶
type Config ¶ added in v1.71.0
type Config struct { Events *events.Config `yaml:"events,omitempty" json:"events,omitempty" toml:"events,omitempty"` *config.Config `yaml:",inline" json:",inline" toml:",inline"` }
Config 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 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