handler

package
v1.1.81 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetActionFromContext

func GetActionFromContext(ctx context.Context) proto.Event_Type

GetActionFromContext retrieve event type from the context

func NewEventContext

func NewEventContext(action proto.Event_Type, eventMetadata *proto.EventMeta, kind, name string) context.Context

NewEventContext - create a context for the new event

Types

type Handler

type Handler interface {
	// Handle receives the type of the event context, event metadata and the API Server resource, if it exists.
	Handle(ctx context.Context, eventMetadata *proto.EventMeta, resource *v1.ResourceInstance) error
}

Handler interface used by the EventListener to process events.

func NewACLHandler

func NewACLHandler(agentCacheManager agentcache.Manager) Handler

NewACLHandler creates a Handler for Access Requests

func NewAPISvcHandler

func NewAPISvcHandler(agentCacheManager agentcache.Manager, envName string) Handler

NewAPISvcHandler creates a Handler for API Services.

func NewARDHandler

func NewARDHandler(agentCacheManager agentcache.Manager) Handler

NewARDHandler creates a Handler for Access Requests

func NewAccessRequestHandler

func NewAccessRequestHandler(prov arProvisioner, cache agentcache.Manager, client client) Handler

NewAccessRequestHandler creates a Handler for Access Requests

func NewAgentResourceHandler

func NewAgentResourceHandler(agentResourceManager resource.Manager) Handler

NewAgentResourceHandler - creates a Handler for Agent resources

func NewCRDHandler

func NewCRDHandler(agentCacheManager agentcache.Manager) Handler

NewCRDHandler creates a Handler for Credential Request Definitions

func NewCategoryHandler

func NewCategoryHandler(agentCacheManager agentcache.Manager) Handler

NewCategoryHandler creates a Handler for Categories.

func NewCredentialHandler

func NewCredentialHandler(prov credProv, client client, providerRegistry oauth.ProviderRegistry) Handler

NewCredentialHandler creates a Handler for Credentials

func NewEnvironmentHandler added in v1.1.52

func NewEnvironmentHandler(agentCacheManager agentcache.Manager, credentialConfig config.CredentialConfig, envName string) Handler

NewEnvironmentHandler creates a Handler for Environments.

func NewInstanceHandler

func NewInstanceHandler(agentCacheManager agentcache.Manager, envName string) Handler

NewInstanceHandler creates a Handler for API Service Instances.

func NewManagedApplicationHandler

func NewManagedApplicationHandler(prov managedAppProvision, cache agentcache.Manager, client client) Handler

NewManagedApplicationHandler creates a Handler for Credentials

func NewTraceAccessRequestHandler

func NewTraceAccessRequestHandler(cache agentcache.Manager, client client) Handler

NewTraceAccessRequestHandler creates a Handler for Access Requests for trace agent

func NewTraceManagedApplicationHandler

func NewTraceManagedApplicationHandler(cache agentcache.Manager) Handler

NewTraceManagedApplicationHandler creates a Handler for Access Requests for trace agent

func NewWatchResourceHandler

func NewWatchResourceHandler(agentCacheManager agentcache.Manager, feature watchTopicFeatures) Handler

NewWatchResourceHandler creates a Handler for custom watch resources to store resource in agent cache

type ProxyHandler

type ProxyHandler interface {
	// RegisterTargetHandler adds the target handler
	RegisterTargetHandler(name string, resourceHandler Handler)
	// UnregisterTargetHandler removes the specified handler
	UnregisterTargetHandler(name string)
}

ProxyHandler interface to represent the proxy resource handler.

type StreamWatchProxyHandler

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

StreamWatchProxyHandler - proxy handler for stream watch

func NewStreamWatchProxyHandler

func NewStreamWatchProxyHandler() *StreamWatchProxyHandler

NewStreamWatchProxyHandler - creates a Handler to proxy target resource handler

func (*StreamWatchProxyHandler) Handle

func (h *StreamWatchProxyHandler) Handle(ctx context.Context, eventMetadata *proto.EventMeta, resource *v1.ResourceInstance) error

Handle receives the type of the event (add, update, delete), event metadata and updated API Server resource

func (*StreamWatchProxyHandler) RegisterTargetHandler

func (h *StreamWatchProxyHandler) RegisterTargetHandler(name string, resourceHandler Handler)

RegisterTargetHandler adds the target handler

func (*StreamWatchProxyHandler) UnregisterTargetHandler

func (h *StreamWatchProxyHandler) UnregisterTargetHandler(name string)

UnregisterTargetHandler removes the specified handler

Jump to

Keyboard shortcuts

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