resource

package
v1.4.7-eksbuild.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetNodeResourcesPath    = "/node/"
	GetAllResourcesPath     = "/resources/all"
	GetResourcesSummaryPath = "/resources/summary"
	// Use path "/datastore/all" to get all pods stored in the cache,
	// "/datastore/node/<nodename>" to get list of all pods on a node (ie ListPods output), and list of all running pods on a node (ie GetRunningPodsOnNode output)
	GetDatastoreResourcePrefix = "/datastore/"
	InvalidDSRequestMessage    = "Invalid request, valid requests for datastore are /datastore/all, /datastore/node/<nodename>"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IntrospectHandler

type IntrospectHandler struct {
	Log             logr.Logger
	BindAddress     string
	ResourceManager ResourceManager
	PodAPIWrapper   podWrapper.PodClientAPIWrapper
}

func (*IntrospectHandler) DatastoreResourceHandler

func (i *IntrospectHandler) DatastoreResourceHandler(w http.ResponseWriter, r *http.Request)

func (*IntrospectHandler) NodeResourceHandler

func (i *IntrospectHandler) NodeResourceHandler(w http.ResponseWriter, r *http.Request)

NodeResourceHandler returns all the resources associated with the Node

func (*IntrospectHandler) ResourceHandler

func (i *IntrospectHandler) ResourceHandler(w http.ResponseWriter, _ *http.Request)

ResourceHandler returns all the nodes associated with the resource

func (*IntrospectHandler) ResourceSummaryHandler added in v1.3.0

func (i *IntrospectHandler) ResourceSummaryHandler(w http.ResponseWriter, r *http.Request)

ResourceSummaryHandler returns all the resources associated with the Node

func (*IntrospectHandler) SetupWithManager

func (i *IntrospectHandler) SetupWithManager(mgr ctrl.Manager, healthzHanlder *rcHealthz.HealthzHandler) error

func (*IntrospectHandler) Start

func (i *IntrospectHandler) Start(_ context.Context) error

Start the introspection API

type Manager

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

func (*Manager) GetResourceHandler

func (m *Manager) GetResourceHandler(resourceName string) (handler.Handler, bool)

func (*Manager) GetResourceProvider added in v1.1.8

func (m *Manager) GetResourceProvider(resourceName string) (provider.ResourceProvider, bool)

func (*Manager) GetResourceProviders

func (m *Manager) GetResourceProviders() map[string]provider.ResourceProvider

type Resource

type Resource struct {
	handler.Handler
	provider.ResourceProvider
}

type ResourceManager

type ResourceManager interface {
	GetResourceProviders() map[string]provider.ResourceProvider
	GetResourceProvider(resourceName string) (provider.ResourceProvider, bool)
	GetResourceHandler(resourceName string) (handler.Handler, bool)
}

func NewResourceManager

func NewResourceManager(ctx context.Context, resourceNames []string, wrapper api.Wrapper, log logr.Logger,
	healthzHandler *rcHealthz.HealthzHandler, conditions condition.Conditions) (ResourceManager, error)

Jump to

Keyboard shortcuts

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