server

package
v0.0.0-...-e59a564 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseConnect

func DatabaseConnect(ctx context.Context, cbleConfig *config.Config) (*ent.Client, error)

Types

type CBLEServer

type CBLEServer struct {
	Config     *config.Config
	Ent        *ent.Client
	Webserver  *CBLEWebserver
	GRPCServer *providers.CBLEServer
}

func NewServer

func NewServer(ctx context.Context, configFile string) (*CBLEServer, error)

func (*CBLEServer) Initialize

func (s *CBLEServer) Initialize(ctx context.Context) error

Initialize should be called before Run

func (*CBLEServer) Run

func (s *CBLEServer) Run(ctx context.Context, wg *sync.WaitGroup)

Run is called to start all of the CBLE runtimes

func (*CBLEServer) Shutdown

func (s *CBLEServer) Shutdown() error

Shutdown should be called after Run returns

type CBLEWebserver

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

func NewWebserver

func NewWebserver(config *config.Config, client *ent.Client, cbleServer *providers.CBLEServer) *CBLEWebserver

func (*CBLEWebserver) Listen

func (w *CBLEWebserver) Listen(ctx context.Context, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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