cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RestApp = "REST"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Start()
	Stop()
}

type AppsManager

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

func NewAppsManager

func NewAppsManager(logger *zap.Logger) *AppsManager

func (*AppsManager) Register

func (am *AppsManager) Register(name string, app App)

func (*AppsManager) Run

func (am *AppsManager) Run(name string)

func (*AppsManager) RunAll

func (am *AppsManager) RunAll()

func (*AppsManager) Stop

func (am *AppsManager) Stop(name string)

func (*AppsManager) StopAll

func (am *AppsManager) StopAll()

func (*AppsManager) WaitForShutdown

func (am *AppsManager) WaitForShutdown()

type Config

type Config struct {
	Apps struct {
		LogLevel string `yaml:"log_level"`
		Rest     struct {
			Port       int `yaml:"port"`
			Validation struct {
				JWTHeaderName      string `yaml:"jwt_header_name"`
				JWTValidationURL   string `yaml:"jwt_validation_url"`
				BoardValidationURL string `yaml:"board_validation_url"`
			} `yaml:"validation"`
		} `yaml:"rest"`
	} `yaml:"apps"`
	Storage struct {
		Users struct {
			Type          string `yaml:"type"`
			RedisAddress  string `yaml:"redis_address"`
			RedisPassword string `yaml:"redis_password"`
			RedisDB       int    `yaml:"redis_db"`
		} `yaml:"users"`
		Rooms struct {
			Type          string `yaml:"type"`
			RedisAddress  string `yaml:"redis_address"`
			RedisPassword string `yaml:"redis_password"`
			RedisDB       int    `yaml:"redis_db"`
		} `yaml:"rooms"`
	} `yaml:"storage"`
}

func ParseConfig

func ParseConfig(path string, logger *zap.Logger) (*Config, error)

Jump to

Keyboard shortcuts

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