pkg

package
v0.0.0-...-311251f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateHostPort

func GenerateHostPort(isHTTPS bool, host string, port string) string

func InitBaseApp

func InitBaseApp() (context.Context, *config.Config, func())

func InitPostgres

func InitPostgres(numRetry int, initDelay time.Duration, dsn string) (*gorm.DB, error)

func InitRedis

func InitRedis(numRetry int, initDelay time.Duration, address string, port string, password string) (*redis.Client, error)

func StringToUint64

func StringToUint64(s string) (uint64, error)

func ToSHA256Hash

func ToSHA256Hash(s string) (string, error)

func UsePostgresCache

func UsePostgresCache(masterDB *gorm.DB, cacher caches.Cacher) error

func UsePostgresReplicas

func UsePostgresReplicas(numRetry int, initDelay time.Duration, masterDB *gorm.DB, slavesDSN []string) error

func WaitShutdownSigterm

func WaitShutdownSigterm(ctx context.Context, shutdownFunc func(), attachedStatusChan chan struct{})

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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