Documentation ¶
Index ¶
- func GetActionFromContext(ctx context.Context) proto.Event_Type
- func NewEventContext(action proto.Event_Type, eventMetadata *proto.EventMeta, kind, name string) context.Context
- type Handler
- func NewACLHandler(agentCacheManager agentcache.Manager) Handler
- func NewAPISvcHandler(agentCacheManager agentcache.Manager) Handler
- func NewARDHandler(agentCacheManager agentcache.Manager) Handler
- func NewAccessRequestHandler(prov arProvisioner, cache agentcache.Manager, client client) Handler
- func NewAgentResourceHandler(agentResourceManager resource.Manager) Handler
- func NewCRDHandler(agentCacheManager agentcache.Manager) Handler
- func NewCategoryHandler(agentCacheManager agentcache.Manager) Handler
- func NewCredentialHandler(prov credProv, client client, providerRegistry oauth.ProviderRegistry) Handler
- func NewInstanceHandler(agentCacheManager agentcache.Manager) Handler
- func NewManagedApplicationHandler(prov managedAppProvision, cache agentcache.Manager, client client) Handler
- func NewTraceAccessRequestHandler(cache agentcache.Manager, client client) Handler
- func NewTraceManagedApplicationHandler(cache agentcache.Manager) Handler
- func NewWatchResourceHandler(agentCacheManager agentcache.Manager, feature watchTopicFeatures) Handler
- type ProxyHandler
- type StreamWatchProxyHandler
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) 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 ¶
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 NewInstanceHandler ¶
func NewInstanceHandler(agentCacheManager agentcache.Manager) 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