router

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ExtensionBundleLocationKey = "tekton-dashboard-bundle-location"

ExtensionBundleLocationKey IS the UI bundle location annotation key

View Source
const ExtensionDisplayNameKey = "tekton-dashboard-display-name"

ExtensionDisplayNameKey is the display name annotation key

View Source
const ExtensionEndpointDelimiter = "."

ExtensionEndpointDelimiter is the Delimiter to be used between the extension endpoints annotation value

View Source
const ExtensionLabelKey = "tekton-dashboard-extension"

ExtensionLabelKey is the label key required by services to be registered as a dashboard extension

View Source
const ExtensionLabelValue = "true"

ExtensionLabelValue is the label value required by services to be registered as a dashboard extension

View Source
const ExtensionRoot = "/v1/extensions"

ExtensionRoot is the URL root when accessing extensions

View Source
const ExtensionURLKey = "tekton-dashboard-endpoints"

ExtensionURLKey specifies the valid extension paths, defaults to "/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Extension

type Extension struct {
	Name           string   `json:"name"`
	URL            *url.URL `json:"url"`
	Port           string   `json:"port"`
	DisplayName    string   `json:"displayname"`
	BundleLocation string   `json:"bundlelocation"`
	// contains filtered or unexported fields
}

Extension is the back-end representation of an extension. A service is an extension when it is in the dashboard namespace with the dashboard label key/value pair. Endpoints are specified with the extension URL annotation

func (Extension) MarshalJSON added in v0.4.0

func (e Extension) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Extension into JSON. This override is explicitly declared since url.URL will marshal each component, where a single field of the string representation is desired. An alias for Extension is used to prevent a stack overflow

type Handler added in v0.4.0

type Handler struct {
	*restful.Container

	sync.RWMutex
	// contains filtered or unexported fields
}

Handler is an HTTP handler with internal configuration to avoid global state

func Register

func Register(resource endpoints.Resource) *Handler

Register returns an HTTP handler that has the Dashboard REST API registered

func (*Handler) RegisterExtension added in v0.4.0

func (h *Handler) RegisterExtension(extensionService *corev1.Service) *Extension

RegisterExtension registers a discovered extension service as a webservice to the container/mux. The extension should have a unique name

func (*Handler) UnregisterExtension added in v0.4.0

func (h *Handler) UnregisterExtension(extensionService *corev1.Service) *Extension

UnregisterExtension unregisters an extension. This should be called BEFORE registration of extensionService on informer update

func (*Handler) UnregisterExtensionByMeta added in v0.6.1

func (h *Handler) UnregisterExtensionByMeta(extensionService metav1.Object) *Extension

UnregisterExtensionByMeta unregisters an extension by its metadata. This should be called BEFORE registration of extensionService on informer update

type RedactedExtension added in v0.5.3

type RedactedExtension struct {
	Name           string `json:"name"`
	DisplayName    string `json:"displayname"`
	BundleLocation string `json:"bundlelocation"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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