app

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() (config.Config, error)

func GetCurrentDirectory

func GetCurrentDirectory() (string, error)

Types

type App

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

App application struct

func NewApp

func NewApp(cfgProvider *config.Provider, version string, logger *zap.Logger) *App

NewApp creates a new App application struct

func (*App) DomReady

func (b *App) DomReady(ctx context.Context)

DomReady is called after the front-end dom has been loaded

func (*App) Shutdown

func (b *App) Shutdown(ctx context.Context)

Shutdown is called at application termination

func (*App) Startup

func (b *App) Startup(ctx context.Context)

Startup is called at application startup

type Bindings

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

func GetBindings

func GetBindings(app *App) *Bindings

func (*Bindings) AddPlugin

func (b *Bindings) AddPlugin(name string, url string) error

func (*Bindings) GetAPIURL

func (b *Bindings) GetAPIURL() string

func (*Bindings) GetAPIVersion

func (b *Bindings) GetAPIVersion() string

func (*Bindings) GetAppDirectory

func (b *Bindings) GetAppDirectory() string

func (*Bindings) GetConfig

func (b *Bindings) GetConfig() config.Config

func (*Bindings) GetPlugins

func (b *Bindings) GetPlugins() map[string]handlers.PluginInfo

func (*Bindings) GetStreams

func (b *Bindings) GetStreams() []StreamInfo

func (*Bindings) GetVersion

func (b *Bindings) GetVersion() string

func (*Bindings) OpenAppDirectory

func (b *Bindings) OpenAppDirectory()

func (*Bindings) RemovePlugin

func (b *Bindings) RemovePlugin(name string) error

func (*Bindings) WaitForStartup

func (b *Bindings) WaitForStartup()

type EventWatcher

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

EventWatcher emits app events whenever events are triggered

func NewEventWatcher

func NewEventWatcher(
	streamEventSource models.StreamEventSource,
	cfgNotify *hub.NotifyHub,
	authHandler *handlers.Auth,
	ctx context.Context,
	logger *zap.Logger,
) *EventWatcher

NewEventWatcher returns a new EventWatcher

func (*EventWatcher) Serve

func (s *EventWatcher) Serve()

Serve runs the service for the app event watcher

func (*EventWatcher) Stop

func (s *EventWatcher) Stop()

Stop will shutdown this service and wait on it to stop before returning.

type StreamInfo

type StreamInfo struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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