warp

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringInSlice

func StringInSlice(a string, list []string) bool

Types

type ConfigReader

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

ConfigReader reads the configuration for the warp menu from etcd

func (*ConfigReader) Read

func (reader *ConfigReader) Read(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 {
	ReadAndUnmarshalDogu(registry types.WatchConfigurationContext, key string, 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 ExternalConverter

type ExternalConverter interface {
	ReadAndUnmarshalExternal(registry types.WatchConfigurationContext, key 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 Reader

type Reader interface {
	Read(configuration *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, registry cesRegistry, namespace string, recorder eventRecorder) (*Watcher, error)

NewWatcher creates a new Watcher instance to build the warp menu

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context) error

Run creates the warp menu and update the menu whenever a relevant etcd key was changed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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