components

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCronComponent

func NewCronComponent(cron *gocron.Scheduler) *cronComponent

func NewHealthzComponent

func NewHealthzComponent(providers []healthz.Provider, config config.HealthzConfig) *healthzComponent

func NewLifecycleComponent

func NewLifecycleComponent(startups []LifeCycleFunc, run LifeCycleFunc, cleanups []LifeCycleFunc) *lifecycleComponent

func NewMetriczComponent

func NewMetriczComponent(registry *prometheus.Registry, config config.MetricszConfig) *metriczComponent

func NewQueueComponent

func NewQueueComponent(handlers []QueueHandler, options ...queueComponentOption) *queueComponent

func WithHttpServer

func WithHttpServer(httpServer *http.Server) httpComponentOption

func WithQueueClose

func WithQueueClose(close func(ctx context.Context) error) queueComponentOption

func WithServerConfig

func WithServerConfig(serverConfig *config.ServerConfig) httpComponentOption

Types

type GrpcComponent added in v0.1.2

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

func NewGrpcComponent added in v0.1.2

func NewGrpcComponent(server *grpc.Server, lis net.Listener) *GrpcComponent

func (*GrpcComponent) Close added in v0.1.2

func (gc *GrpcComponent) Close(ctx context.Context) error

func (*GrpcComponent) Run added in v0.1.2

func (gc *GrpcComponent) Run() error

func (*GrpcComponent) Startup added in v0.1.2

func (gc *GrpcComponent) Startup() error

type HttpComponent

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

func NewHttpComponent

func NewHttpComponent(handler http.Handler, options ...httpComponentOption) *HttpComponent

func (*HttpComponent) Close

func (hc *HttpComponent) Close(ctx context.Context) error

func (*HttpComponent) GetHandler

func (hc *HttpComponent) GetHandler(t testing.TB) http.Handler

This is just for testing

func (*HttpComponent) Run

func (hc *HttpComponent) Run() error

func (*HttpComponent) Startup

func (hc *HttpComponent) Startup() error

type LifeCycleFunc

type LifeCycleFunc func(ctx context.Context) error

type QueueHandler

type QueueHandler func(chan error) error

Jump to

Keyboard shortcuts

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