hitrix

package module
v0.0.3-0...-b3ca8fe Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: GPL-3.0 Imports: 34 Imported by: 0

README

codecov Go Report Card GPL3 license

Official documentation

For Contributors

Every new feature or change already existing feature should be described into the documentation. To change the documentation you need to execute next steps:

  1. Go to /docs/docs folder
  2. Change the documentation using .md files
  3. If you want to change sidebar or navbar you can do it in /docs/docs/.vuepress/config.js
  4. Run it on localhost from, folder /docs using yarn docs:dev
  5. Push your changes

If you create a new service and write documentation for it please follow next template:

  1. service definition - what this service can be used for
  2. register service - how the service should be registered
  3. access service - how the service can be accessed
  4. technical documentation - details about the service, examples and different use cases

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Goroutine

func Goroutine(fn func())

func GoroutineWithRestart

func GoroutineWithRestart(fn func())

func InitGin

func InitGin(server graphql.ExecutableSchema, ginInitHandler GinInitHandler, gqlServerInitHandler GQLServerInitHandler) *gin.Engine

func Validate

func Validate(ctx context.Context, callback func() bool) bool

func ValidateDirective

func ValidateDirective() func(ctx context.Context, obj interface{}, next graphql.Resolver, rules string) (interface{}, error)

Types

type BackgroundProcessor

type BackgroundProcessor struct {
	Server *Hitrix
}

func (*BackgroundProcessor) RunAsyncOrmConsumer

func (processor *BackgroundProcessor) RunAsyncOrmConsumer()

func (*BackgroundProcessor) RunAsyncRequestLoggerCleaner

func (processor *BackgroundProcessor) RunAsyncRequestLoggerCleaner()

func (*BackgroundProcessor) RunScript

func (processor *BackgroundProcessor) RunScript(s app.IScript)

type GQLServerInitHandler

type GQLServerInitHandler func(server *handler.Server)

type GinInitHandler

type GinInitHandler func(ginEngine *gin.Engine)

type Hitrix

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

func (*Hitrix) RunBackgroundProcess

func (h *Hitrix) RunBackgroundProcess(callback func(b *BackgroundProcessor))

func (*Hitrix) RunServer

func (h *Hitrix) RunServer(
	defaultPort uint,
	server graphql.ExecutableSchema,
	ginInitHandler GinInitHandler,
	gqlServerInitHandler GQLServerInitHandler,
)

type Registry

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

func New

func New(appName string, secret string) *Registry

func (*Registry) Build

func (r *Registry) Build() (*Hitrix, func())

func (*Registry) RegisterDIGlobalService

func (r *Registry) RegisterDIGlobalService(service ...*service.DefinitionGlobal) *Registry

func (*Registry) RegisterDIRequestService

func (r *Registry) RegisterDIRequestService(service ...*service.DefinitionRequest) *Registry

func (*Registry) RegisterDevPanel

func (r *Registry) RegisterDevPanel(devPanelUserEntity app.IDevPanelUserEntity, router func(ginEngine *gin.Engine)) *Registry

func (*Registry) RegisterRedisPools

func (r *Registry) RegisterRedisPools(pools *app.RedisPools) *Registry

func (*Registry) SetParallelTestID

func (r *Registry) SetParallelTestID(parallelTestID string) *Registry

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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