Documentation
¶
Index ¶
- func GetActionFromContext(ctx context.Context) proto.Event_Type
- func NewEventContext(action proto.Event_Type, eventMetadata *proto.EventMeta, kind, name string) context.Context
- func WithWatchTopicFeatures(feature watchTopicFeatures) watchTopicOptions
- func WithWatchTopicGroupKind(groupKinds []v1.GroupKind) watchTopicOptions
- type AgentResourceUpdateHandler
- type ComplianceAgentHandler
- type Handler
- func NewACLHandler(agentCacheManager agentcache.Manager) Handler
- func NewAPDHandler(agentCacheManager agentcache.Manager) Handler
- func NewAPISvcHandler(agentCacheManager agentcache.Manager, envName string) Handler
- func NewARDHandler(agentCacheManager agentcache.Manager) Handler
- func NewAccessRequestHandler(prov prov.AccessProvisioner, cache agentcache.Manager, client client, ...) Handler
- func NewAgentResourceHandler(agentResourceManager resource.Manager, sampler sampling) Handler
- func NewCRDHandler(agentCacheManager agentcache.Manager) Handler
- func NewCRRHandler(agentCacheManager agentcache.Manager) Handler
- func NewCredentialHandler(prov credProv, client client, providerRegistry oauth.IdPRegistry) Handler
- func NewEnvironmentHandler(agentCacheManager agentcache.Manager, credentialConfig config.CredentialConfig, ...) Handler
- func NewInstanceHandler(agentCacheManager agentcache.Manager, envName string) Handler
- func NewManagedApplicationHandler(prov prov.ApplicationProvisioner, cache agentcache.Manager, client client) Handler
- func NewManagedApplicationProfileHandler(prov prov.ApplicationProfileProvisioner, cache managedApplicationProfileCache, ...) Handler
- func NewTraceAccessRequestHandler(cache agentcache.Manager, client client) Handler
- func NewTraceManagedApplicationHandler(cache agentcache.Manager) Handler
- func NewWatchResourceHandler(agentCacheManager agentcache.Manager, opts ...watchTopicOptions) Handler
- type ProxyHandler
- type StreamWatchProxyHandler
- type TraceabilityTriggerHandler
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
func WithWatchTopicFeatures ¶ added in v1.1.115
func WithWatchTopicFeatures(feature watchTopicFeatures) watchTopicOptions
func WithWatchTopicGroupKind ¶ added in v1.1.115
Types ¶
type AgentResourceUpdateHandler ¶ added in v1.1.115
type AgentResourceUpdateHandler interface {
AgentResourceUpdate(ctx context.Context, resource *v1.ResourceInstance)
}
Register an AgentResourceUpdateHandler in an agent to trigger events when changes to the resource is made
type ComplianceAgentHandler ¶ added in v1.1.115
type ComplianceAgentHandler interface {
TriggerProcessing()
}
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 NewAPDHandler ¶ added in v1.1.109
func NewAPDHandler(agentCacheManager agentcache.Manager) Handler
NewAPDHandler creates a Handler for Application Profile Definitions
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 prov.AccessProvisioner, cache agentcache.Manager, client client, customUnitHandler customUnitHandler) 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 NewCRRHandler ¶ added in v1.1.118
func NewCRRHandler(agentCacheManager agentcache.Manager) Handler
NewCRRHandler creates a Handler for Compliance Runtime Results
func NewCredentialHandler ¶
func NewCredentialHandler(prov credProv, client client, providerRegistry oauth.IdPRegistry) 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 prov.ApplicationProvisioner, cache agentcache.Manager, client client) Handler
NewManagedApplicationHandler creates a Handler for Credentials
func NewManagedApplicationProfileHandler ¶ added in v1.1.109
func NewManagedApplicationProfileHandler(prov prov.ApplicationProfileProvisioner, cache managedApplicationProfileCache, client client) Handler
NewManagedApplicationProfileHandler 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, opts ...watchTopicOptions) 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
type TraceabilityTriggerHandler ¶ added in v1.1.113
type TraceabilityTriggerHandler interface {
TriggerTraceability()
}
Source Files
¶
- accesscontrollist.go
- accessrequest.go
- accessrequestdefinition.go
- agentresource.go
- apiservice.go
- applicationprofiledefinition.go
- complianceruntimeresult.go
- credential.go
- credentialrequestdefinition.go
- environment.go
- handler.go
- instance.go
- managedapplication.go
- managedapplicationprofile.go
- marketplacehandler.go
- proxy.go
- traceaccessrequest.go
- tracemanagedapplication.go
- watchresource.go