Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringInSlice ¶
Types ¶
type ConfigReader ¶
type ConfigReader struct {
// contains filtered or unexported fields
}
ConfigReader reads the configuration for the warp menu from the global configuration
func (*ConfigReader) Read ¶
func (reader *ConfigReader) Read(ctx context.Context, configuration *config.Configuration) (types.Categories, error)
Read reads sources specified in a configuration and build warp menu categories for them.
type DoguConverter ¶
type DoguConverter interface {
CreateEntryWithCategoryFromDogu(dogu *core.Dogu, tag string) (types.EntryWithCategory, error)
}
DoguConverter is used to Read dogus from the registry and convert them to objects fitting in the warp menu
type DoguVersionRegistry ¶ added in v0.15.1
type DoguVersionRegistry interface { WatchAllCurrent(context.Context) (<-chan dogu.CurrentVersionsWatchResult, error) GetCurrentOfAll(context.Context) ([]dogu.DoguVersion, error) }
type ExternalConverter ¶
type ExternalConverter interface {
ReadAndUnmarshalExternal(link string) (types.EntryWithCategory, error)
}
ExternalConverter is used to Read external links from the registry and convert them to objects fitting in the warp menu
type GlobalConfigRepository ¶ added in v0.15.1
type GlobalConfigRepository interface { Watch(context.Context, ...libconfig.WatchFilter) (<-chan repository.GlobalConfigWatchResult, error) Get(context.Context) (libconfig.GlobalConfig, error) }
type LocalDoguRepo ¶ added in v0.15.1
type LocalDoguRepo interface {
GetAll(context.Context, []dogu.DoguVersion) (map[dogu.DoguVersion]*core.Dogu, error)
}
type Reader ¶
type Reader interface {
Read(context.Context, *config.Configuration) (types.Categories, error)
}
Reader is used to fetch warp categories with a configuration
type Watcher ¶
type Watcher struct { ConfigReader Reader // contains filtered or unexported fields }
Watcher is used to watch a registry and for every change he reads from the registry a specific config path, build warp menu categories and writes them to a configmap.
func NewWatcher ¶
func NewWatcher(ctx context.Context, k8sClient client.Client, doguVersionRegistry DoguVersionRegistry, localDoguRepo LocalDoguRepo, namespace string, recorder eventRecorder, globalConfigRepo GlobalConfigRepository) (*Watcher, error)
NewWatcher creates a new Watcher instance to build the warp menu