utils

package
v0.0.0-...-5e932ec Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultGRPCConnectParams = grpc.ConnectParams{
		Backoff: backoff.Config{
			BaseDelay:  100 * time.Millisecond,
			Multiplier: 1.6,
			Jitter:     0.2,
			MaxDelay:   3 * time.Second,
		},
		MinConnectTimeout: 5 * time.Second,
	}
	DefaultGRPCKeepaliveParams = keepalive.ClientParameters{
		Time:                10 * time.Second,
		Timeout:             3 * time.Second,
		PermitWithoutStream: false,
	}
)

Functions

func NewFxPrinter

func NewFxPrinter() fx.Printer

Types

type FxPrinter

type FxPrinter func(string, ...interface{})

func (FxPrinter) Printf

func (p FxPrinter) Printf(format string, args ...interface{})

type ServiceStatus

type ServiceStatus int32

func NewServiceStatus

func NewServiceStatus() *ServiceStatus

func (*ServiceStatus) IsRunning

func (s *ServiceStatus) IsRunning() bool

func (*ServiceStatus) MWHandleStopped

func (s *ServiceStatus) MWHandleStopped(stoppedHandler gin.HandlerFunc) gin.HandlerFunc

func (*ServiceStatus) NewStatusAwareHandler

func (s *ServiceStatus) NewStatusAwareHandler(handler http.Handler, stoppedHandler http.Handler) http.Handler

func (*ServiceStatus) Register

func (s *ServiceStatus) Register(lc fx.Lifecycle)

func (*ServiceStatus) Start

func (s *ServiceStatus) Start()

func (*ServiceStatus) Stop

func (s *ServiceStatus) Stop()

type SysSchema

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

func NewSysSchema

func NewSysSchema() *SysSchema

func ProvideSysSchema

func ProvideSysSchema(lc fx.Lifecycle) *SysSchema

func (*SysSchema) Close

func (c *SysSchema) Close() error

func (*SysSchema) GetTableColumnNames

func (c *SysSchema) GetTableColumnNames(db *gorm.DB, tableName string) ([]string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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