test

package
v1.186.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2024 License: MIT Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Compressor = compressor.NewFactory()

Compressor for tests.

View Source
var Environment = env.Environment("dev")

Environment for test.

View Source
var ErrInvalidToken = errors.New("invalid token")

ErrInvalidToken ...

View Source
var Marshaller = marshaller.NewFactory()

Marshaller for tests.

View Source
var Mux = th.NewServeMux()

Mux for test.

View Source
var Version = version.Version("1.0.0")

Version for test.

Functions

func NewBaselimeTracerConfig added in v1.128.0

func NewBaselimeTracerConfig() *tracer.Config

NewBaselimeTracerConfig for test.

func NewCompressor added in v1.57.3

func NewCompressor(err error) compressor.Compressor

NewCompressor for test.

func NewHook added in v1.138.0

func NewHook() *hooks.Config

NewHook for test.

func NewInputConfig added in v1.186.0

func NewInputConfig(flag string) (*cmd.InputConfig, error)

NewInputConfig for test.

func NewInsecureConfig added in v1.174.0

func NewInsecureConfig() *tls.Config

NewSecureClientConfig for test.

func NewInsecureDebugConfig added in v1.154.7

func NewInsecureDebugConfig() *debug.Config

NewInsecureDebugConfig for test.

func NewInsecureTransportConfig added in v1.113.0

func NewInsecureTransportConfig() *transport.Config

NewInsecureTransportConfig for test.

func NewLimiterConfig added in v1.166.0

func NewLimiterConfig(pattern string) *limiter.Config

NewLimiterConfig for test.

func NewLogger added in v1.66.0

func NewLogger(lc fx.Lifecycle) *zap.Logger

NewLogger for test.

func NewMarshaller added in v1.57.3

func NewMarshaller(err error) marshaller.Marshaller

NewMarshaller for test.

func NewOTLPMeter added in v1.172.0

func NewOTLPMeter(lc fx.Lifecycle) metric.Meter

NewOTLPMeter for test.

func NewOTLPMetricsConfig added in v1.152.0

func NewOTLPMetricsConfig() *metrics.Config

NewOTLPMetricsConfig for test.

func NewOTLPTracerConfig added in v1.152.0

func NewOTLPTracerConfig() *tracer.Config

NewOTLPTracerConfig for test.

func NewOutputConfig added in v1.186.0

func NewOutputConfig(flag string) (*cmd.OutputConfig, error)

NewOutputConfig for test.

func NewPGConfig added in v1.66.4

func NewPGConfig() *pg.Config

NewPGConfig for test.

func NewPrometheusMeter added in v1.172.0

func NewPrometheusMeter(lc fx.Lifecycle) metric.Meter

NewPrometheusMeter for test.

func NewPrometheusMetricsConfig added in v1.152.0

func NewPrometheusMetricsConfig() *metrics.Config

NewPrometheusMetricsConfig for test.

func NewRedisConfig added in v1.76.0

func NewRedisConfig(host, compressor, marshaller string) *redis.Config

NewRedisConfig for test.

func NewRetry added in v1.134.0

func NewRetry() *retry.Config

NewRetry for test.

func NewSecureDebugConfig added in v1.154.7

func NewSecureDebugConfig() *debug.Config

NewInsecureDebugConfig for test.

func NewSecureTransportConfig added in v1.113.0

func NewSecureTransportConfig() *transport.Config

NewSecureTransportConfig for test.

func NewTLSClientConfig added in v1.180.0

func NewTLSClientConfig() *tls.Config

NewTLSClientConfig for test.

func NewTLSConfig added in v1.180.0

func NewTLSConfig(c, k string) *tls.Config

NewTLSConfig for test.

func NewTLSServerConfig added in v1.180.0

func NewTLSServerConfig() *tls.Config

NewTLSServerConfig for test.

func Port added in v1.87.2

func Port() string

Port for test.

func Test added in v1.108.0

func Test(ctx context.Context) meta.Valuer

Test retrieves sample info.

func WithTest added in v1.108.0

func WithTest(ctx context.Context, value meta.Valuer) context.Context

WithTest stores sample info.

Types

type Cache added in v1.172.2

type Cache struct {
	Lifecycle fx.Lifecycle
	Redis     *redis.Config
	Logger    *zap.Logger
	Tracer    *tracer.Config
	Meter     metric.Meter
}

Cache for test.

func (*Cache) NewRedisCache added in v1.172.2

func (c *Cache) NewRedisCache() (*cache.Cache, error)

NewRedisCache for test.

func (*Cache) NewRedisClient added in v1.172.2

func (c *Cache) NewRedisClient() gr.Client

NewRedisClient for test.

func (*Cache) NewRistrettoCache added in v1.172.2

func (c *Cache) NewRistrettoCache() sr.Cache

NewRistrettoCache for test.

type Client added in v1.172.2

type Client struct {
	Lifecycle    fx.Lifecycle
	Logger       *zap.Logger
	Tracer       *tracer.Config
	Transport    *transport.Config
	TLS          *tls.Config
	Credentials  credentials.PerRPCCredentials
	RoundTripper http.RoundTripper
	Meter        metric.Meter
}

Client for test.

func (*Client) NewGRPC added in v1.172.2

func (c *Client) NewGRPC() *grpc.ClientConn

func (*Client) NewHTTP added in v1.172.2

func (c *Client) NewHTTP() *http.Client

NewHTTP client 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

func NewGenerator(token string, err error) *Generator

NewGenerator for test.

func (*Generator) Generate added in v1.32.3

func (g *Generator) Generate(ctx context.Context) (context.Context, []byte, error)

type InvalidMeter added in v1.161.0

type InvalidMeter struct{ embedded.Meter }

InvalidMeter for test.

func (InvalidMeter) Float64Counter added in v1.161.0

func (InvalidMeter) Float64Histogram added in v1.161.0

func (InvalidMeter) Float64ObservableCounter added in v1.161.0

func (InvalidMeter) Float64ObservableGauge added in v1.161.0

func (InvalidMeter) Float64ObservableUpDownCounter added in v1.161.0

func (InvalidMeter) Float64UpDownCounter added in v1.161.0

func (InvalidMeter) Int64Counter added in v1.161.0

func (InvalidMeter) Int64Histogram added in v1.161.0

func (InvalidMeter) Int64ObservableCounter added in v1.161.0

func (InvalidMeter) Int64ObservableGauge added in v1.161.0

func (InvalidMeter) Int64ObservableUpDownCounter added in v1.161.0

func (InvalidMeter) Int64UpDownCounter added in v1.161.0

func (InvalidMeter) RegisterCallback added in v1.161.0

type Server

type Server struct {
	Lifecycle  fx.Lifecycle
	Meter      metric.Meter
	Logger     *zap.Logger
	Tracer     *tracer.Config
	Transport  *transport.Config
	GRPC       *tg.Server
	HTTP       *th.Server
	Handlers   []negroni.Handler
	Unary      []grpc.UnaryServerInterceptor
	Stream     []grpc.StreamServerInterceptor
	VerifyAuth bool
}

Server for test.

func (*Server) Register added in v1.172.2

func (s *Server) Register()

Register server.

type Service added in v1.172.2

type Service struct {
	v1.UnimplementedGreeterServiceServer
	// contains filtered or unexported fields
}

Service ...

func NewService added in v1.172.2

func NewService(verifyAuth bool) *Service

NewService ...

func (*Service) SayHello added in v1.172.2

func (s *Service) SayHello(ctx context.Context, req *v1.SayHelloRequest) (*v1.SayHelloResponse, error)

SayHello ...

func (*Service) SayStreamHello added in v1.172.2

func (s *Service) 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

type Verifier added in v1.32.3

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier for test.

func NewVerifier added in v1.4.0

func NewVerifier(token string) *Verifier

NewVerifier for test.

func (*Verifier) Verify added in v1.32.3

func (v *Verifier) Verify(ctx context.Context, token []byte) (context.Context, error)

Directories

Path Synopsis
greet
v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL