api

package
v0.0.0-...-2d9dd87 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package api defines a set of Handlers to be used for implementing a fake API server, designed specifically to make Cluster API and the Kubeadm Control Plane provider happy during a stress test (it is not complete or production ready, and it will never be).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIServerHandler

func NewAPIServerHandler(manager cmanager.Manager, log logr.Logger, resolver ResourceGroupResolver) http.Handler

NewAPIServerHandler returns an http.Handler for a fake API server.

func NewDebugHandler

func NewDebugHandler(manager cmanager.Manager, log logr.Logger, infoProvider DebugInfoProvider) http.Handler

NewDebugHandler returns an http.Handler for debugging the server.

Types

type DebugInfoProvider

type DebugInfoProvider interface {
	ListListeners() map[string]string
}

DebugInfoProvider defines the methods the server must implement to provide debug info.

type ResourceGroupResolver

type ResourceGroupResolver func(host string) (string, error)

ResourceGroupResolver defines a func that can identify which workloadCluster/resourceGroup a request targets.

Directories

Path Synopsis
Package portforward implements support for implementing a fake port forward service in the api.
Package portforward implements support for implementing a fake port forward service in the api.

Jump to

Keyboard shortcuts

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