Documentation ¶
Index ¶
- type AdminAPIClientFactory
- type AdminAPIDiscoverer
- func (m *AdminAPIDiscoverer) AdminAPIsFromEndpointSlice(discoveryv1.EndpointSlice) (sets.Set[adminapi.DiscoveredAdminAPI], error)
- func (m *AdminAPIDiscoverer) AdminAPIsFromEndpointSliceCalledTimes() int
- func (m *AdminAPIDiscoverer) GetAdminAPIsForService(context.Context, client.Client, k8stypes.NamespacedName) (sets.Set[adminapi.DiscoveredAdminAPI], error)
- func (m *AdminAPIDiscoverer) GetAdminAPIsForServiceCalledTimes() int
- type AdminAPIHandler
- type AdminAPIHandlerOpt
- type Dataplane
- func (d Dataplane) AreKubernetesObjectReportsEnabled() bool
- func (d Dataplane) DeleteObject(_ client.Object) error
- func (d Dataplane) KubernetesObjectConfigurationStatus(obj client.Object) k8sobj.ConfigurationStatus
- func (d Dataplane) KubernetesObjectIsConfigured(obj client.Object) bool
- func (d Dataplane) Listeners(context.Context) ([]kong.ProxyListener, []kong.StreamListener, error)
- func (d Dataplane) ObjectExists(obj client.Object) (bool, error)
- func (d Dataplane) UpdateObject(_ client.Object) error
- type EventRecorder
- func (r *EventRecorder) AnnotatedEventf(_ runtime.Object, _ map[string]string, eventtype, reason, messageFmt string, ...)
- func (r *EventRecorder) Event(_ runtime.Object, eventtype, reason, message string)
- func (r *EventRecorder) Eventf(_ runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
- func (r *EventRecorder) Events() []string
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPIClientFactory ¶ added in v2.11.0
type AdminAPIClientFactory struct {
// contains filtered or unexported fields
}
AdminAPIClientFactory is a mock implementation of adminapi.ClientFactory.
func NewAdminAPIClientFactory ¶ added in v2.11.0
func NewAdminAPIClientFactory(errorsToReturn map[string]error) *AdminAPIClientFactory
func (*AdminAPIClientFactory) CreateAdminAPIClient ¶ added in v2.11.0
func (m *AdminAPIClientFactory) CreateAdminAPIClient(_ context.Context, api adminapi.DiscoveredAdminAPI) (*adminapi.Client, error)
type AdminAPIDiscoverer ¶ added in v2.11.0
type AdminAPIDiscoverer struct {
// contains filtered or unexported fields
}
AdminAPIDiscoverer is a mock implementation of adminapi.Discoverer.
func NewAdminAPIDiscoverer ¶ added in v2.11.0
func NewAdminAPIDiscoverer(apisToReturn sets.Set[adminapi.DiscoveredAdminAPI], errToReturn error) *AdminAPIDiscoverer
func (*AdminAPIDiscoverer) AdminAPIsFromEndpointSlice ¶ added in v2.11.0
func (m *AdminAPIDiscoverer) AdminAPIsFromEndpointSlice(discoveryv1.EndpointSlice) ( sets.Set[adminapi.DiscoveredAdminAPI], error, )
func (*AdminAPIDiscoverer) AdminAPIsFromEndpointSliceCalledTimes ¶ added in v2.11.0
func (m *AdminAPIDiscoverer) AdminAPIsFromEndpointSliceCalledTimes() int
func (*AdminAPIDiscoverer) GetAdminAPIsForService ¶ added in v2.11.0
func (m *AdminAPIDiscoverer) GetAdminAPIsForService(context.Context, client.Client, k8stypes.NamespacedName) ( sets.Set[adminapi.DiscoveredAdminAPI], error, )
func (*AdminAPIDiscoverer) GetAdminAPIsForServiceCalledTimes ¶ added in v2.11.0
func (m *AdminAPIDiscoverer) GetAdminAPIsForServiceCalledTimes() int
type AdminAPIHandler ¶ added in v2.11.0
type AdminAPIHandler struct {
// contains filtered or unexported fields
}
AdminAPIHandler is a mock implementation of the Admin API. It only implements the endpoints that are required for the tests.
func NewAdminAPIHandler ¶ added in v2.11.0
func NewAdminAPIHandler(t *testing.T, opts ...AdminAPIHandlerOpt) *AdminAPIHandler
func (*AdminAPIHandler) ServeHTTP ¶ added in v2.11.0
func (m *AdminAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*AdminAPIHandler) WasWorkspaceCreated ¶ added in v2.11.0
func (m *AdminAPIHandler) WasWorkspaceCreated() bool
type AdminAPIHandlerOpt ¶ added in v2.11.0
type AdminAPIHandlerOpt func(h *AdminAPIHandler)
func WithConfigurationHash ¶ added in v2.12.0
func WithConfigurationHash(hash string) AdminAPIHandlerOpt
func WithReady ¶ added in v2.11.0
func WithReady(ready bool) AdminAPIHandlerOpt
func WithWorkspaceExists ¶ added in v2.11.0
func WithWorkspaceExists(exists bool) AdminAPIHandlerOpt
type Dataplane ¶ added in v2.11.0
type Dataplane struct { KubernetesObjectReportsEnabled bool // Mapping namespace to name to status // Note: this will come in useful when implementing // https://github.com/Kong/kubernetes-ingress-controller/issues/3793 // which requires the status to be reported for route objects. ObjectsStatuses map[string]map[string]k8sobj.ConfigurationStatus }
func (Dataplane) AreKubernetesObjectReportsEnabled ¶ added in v2.11.0
func (Dataplane) DeleteObject ¶ added in v2.11.0
func (Dataplane) KubernetesObjectConfigurationStatus ¶ added in v2.11.0
func (d Dataplane) KubernetesObjectConfigurationStatus(obj client.Object) k8sobj.ConfigurationStatus
func (Dataplane) KubernetesObjectIsConfigured ¶ added in v2.11.0
func (Dataplane) Listeners ¶ added in v2.11.0
func (d Dataplane) Listeners(context.Context) ([]kong.ProxyListener, []kong.StreamListener, error)
func (Dataplane) ObjectExists ¶ added in v2.11.0
type EventRecorder ¶ added in v2.11.0
type EventRecorder struct {
// contains filtered or unexported fields
}
EventRecorder is a mock implementation of the k8s.io/client-go/tools/record.EventRecorder interface.
func NewEventRecorder ¶ added in v2.11.0
func NewEventRecorder() *EventRecorder
func (*EventRecorder) AnnotatedEventf ¶ added in v2.11.0
func (*EventRecorder) Event ¶ added in v2.11.0
func (r *EventRecorder) Event(_ runtime.Object, eventtype, reason, message string)
func (*EventRecorder) Eventf ¶ added in v2.11.0
func (r *EventRecorder) Eventf(_ runtime.Object, eventtype, reason, messageFmt string, args ...interface{})
func (*EventRecorder) Events ¶ added in v2.11.0
func (r *EventRecorder) Events() []string
Click to show internal directories.
Click to hide internal directories.