Help us shape the future of Go! Take the 2026 Go Developer Survey

test

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Host            *Host
	Config          *Config
	ServiceProvider *ServiceProvider

	Component *MockComponent
}

func (*App) ConfigureLogger

func (app *App) ConfigureLogger(logger *log.Logger)

func (*App) ConfigureTextMapPropagator

func (app *App) ConfigureTextMapPropagator()

func (*App) ConfigureTracerProvider

func (app *App) ConfigureTracerProvider()

func (*App) Init

func (app *App) Init()

func (*App) Logger

func (app *App) Logger() *log.Logger

func (*App) OnInit

func (app *App) OnInit()

func (*App) OnInitComplete

func (app *App) OnInitComplete()

func (*App) OnStart

func (app *App) OnStart(ctx context.Context)

func (*App) OnStop

func (app *App) OnStop(ctx context.Context)

func (*App) TextMapPropagator

func (app *App) TextMapPropagator() propagation.TextMapPropagator

func (*App) TracerProvider

func (app *App) TracerProvider() *trace.SeverityTracerProvider

type Config

type Config struct {
	// server
	ListenAddress  string `arg:"address"`
	EnableCompress bool   `arg:"compress"`

	// redis
	RedisHost     string `env:"*REDIS_HOST"       yaml:"redisHost"`
	RedisPassword string `env:"*REDIS_PASSWORD"   yaml:"redisPassword"`
	RedisDB       int    `env:"REDIS_DB"          yaml:"redisDB"`
	RedisPoolSize int    `env:"REDIS_POOL_SIZE"   yaml:"redisPoolSize"`
	Workspace     string `env:"-"                 yaml:"workspace"`
}

type Host

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

func (*Host) Init

func (host *Host) Init(conf *Config)

func (*Host) OnError

func (host *Host) OnError(err error) (disposed bool)

func (*Host) Start

func (host *Host) Start(ctx context.Context)

func (*Host) Stop

func (host *Host) Stop(ctx context.Context) error

type MockComponent

type MockComponent struct {
}

func (*MockComponent) Runner

func (c *MockComponent) Runner() host.Runner

type MockComponentRunner

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

func (*MockComponentRunner) Start

func (c *MockComponentRunner) Start()

func (*MockComponentRunner) Stop

func (c *MockComponentRunner) Stop()

type MockRedis

type MockRedis struct {
	Host     string
	Password string
	DB       int
	PoolSize int
}

type ServiceProvider

type ServiceProvider struct {
	RedisClient *MockRedis
}

func (*ServiceProvider) Init

func (provider *ServiceProvider) Init(conf *Config, app *App)

Jump to

Keyboard shortcuts

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