app

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewApplication

func NewApplication(config *config.Config, opts ...contracts.Option) contracts.ApplicationInterface

func NewKubeClient

func NewKubeClient(kubeconfig []byte) (client kubernetes.Interface, restConfig *restclient.Config, err error)

NewKubeClient TODO metrics: record initialized time

Types

type Application

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

func (*Application) AddServer

func (app *Application) AddServer(server contracts.Server)

func (*Application) Auth

func (app *Application) Auth() contracts.AuthInterface

func (*Application) BeforeServerRunHooks

func (app *Application) BeforeServerRunHooks(cb contracts.Callback)

func (*Application) Bootstrap

func (app *Application) Bootstrap() error

func (*Application) Config

func (app *Application) Config() *config.Config

func (*Application) DBManager

func (app *Application) DBManager() contracts.DBManager

func (*Application) Done

func (app *Application) Done() <-chan struct{}

func (*Application) EventDispatcher

func (app *Application) EventDispatcher() contracts.DispatcherInterface

func (*Application) GetPluginByName

func (app *Application) GetPluginByName(name string) contracts.PluginInterface

func (*Application) GetPlugins

func (app *Application) GetPlugins() map[string]contracts.PluginInterface

func (*Application) IsDebug

func (app *Application) IsDebug() bool

func (*Application) LoadKubeClient

func (app *Application) LoadKubeClient(name string, kubeConfig []byte, namespace string) (contracts.K8s, error)

func (*Application) Metrics

func (app *Application) Metrics() contracts.Metrics

func (*Application) Oidc

func (app *Application) Oidc() contracts.OidcConfig

func (*Application) RegisterAfterShutdownFunc

func (app *Application) RegisterAfterShutdownFunc(fn contracts.Callback)

func (*Application) RegisterBeforeShutdownFunc

func (app *Application) RegisterBeforeShutdownFunc(fn contracts.Callback)

func (*Application) ReleaseAllKubeClient

func (app *Application) ReleaseAllKubeClient() error

func (*Application) ReleaseKubeClient

func (app *Application) ReleaseKubeClient(name string) error

func (*Application) Run

func (app *Application) Run() context.Context

func (*Application) RunServerHooks

func (app *Application) RunServerHooks(hook Hook)

func (*Application) SetAuth

func (app *Application) SetAuth(auth contracts.AuthInterface)

func (*Application) SetEventDispatcher

func (app *Application) SetEventDispatcher(dispatcher contracts.DispatcherInterface)

func (*Application) SetMetrics

func (app *Application) SetMetrics(metrics contracts.Metrics)

func (*Application) SetOidc

func (app *Application) SetOidc(provider contracts.OidcConfig)

func (*Application) SetPlugins

func (app *Application) SetPlugins(plugins map[string]contracts.PluginInterface)

func (*Application) SetUploader

func (app *Application) SetUploader(uploader contracts.Uploader)

func (*Application) Shutdown

func (app *Application) Shutdown()

func (*Application) Uploader

func (app *Application) Uploader() contracts.Uploader

type Hook

type Hook string
const (
	BeforeRunHook  Hook = "before_run"
	BeforeDownHook Hook = "before_down"
	AfterDownHook  Hook = "after_down"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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