app

package
v0.0.86 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplication

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

func NewKubeClient

func NewKubeClient(kubeconfig []byte) (kubernetes.Interface, *restclient.Config, 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) Oidc

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

func (*Application) ProxyManager added in v0.0.56

func (app *Application) ProxyManager() contracts.ProxyManagerInterface

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, namespace 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) SetOidc

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

func (*Application) SetPlugins

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

func (*Application) SetProxyManager added in v0.0.56

func (app *Application) SetProxyManager(proxyManager contracts.ProxyManagerInterface)

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"
)

type Option added in v0.0.56

type Option func(*Application)

func WithBootstrappers added in v0.0.56

func WithBootstrappers(bootstrappers ...contracts.Bootstrapper) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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