Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvaluatorSelector ¶
type EvaluatorSelector func(ctx context.Context, goal goals.Goal, dataSource data.DataSource) (goals.GoalEvaluator, error)
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewPolicyEventHandler ¶
func NewPolicyEventHandler(subscriptionNames []string, evalSelector EvaluatorSelector, opts ...Opt) EventHandler
func (EventHandler) CreateHttpHandler ¶ added in v0.0.38
func (h EventHandler) CreateHttpHandler() func(http.ResponseWriter, *http.Request)
func (EventHandler) ExecuteSyncRequest ¶ added in v0.0.41
func (h EventHandler) ExecuteSyncRequest(ctx context.Context, req skill.RequestContext) ([]goals.GoalEvaluationQueryResult, error)
func (EventHandler) Start ¶
func (h EventHandler) Start()
type Opt ¶
type Opt func(handler *EventHandler)
func WithAsync ¶ added in v0.0.33
func WithAsync() Opt
WithAsync is enabled by default, added last after all other Opts if not explicitly registered early.
func WithAsyncMultiQuery ¶
func WithAsyncMultiQuery() Opt
WithAsyncMultiQuery will enable the async graphql data source to spool results across multiple queries. These intermediate results are stored in the following requests' metadata, and as such risk hitting the upper limit on the metadata field, and failing.
func WithSyncQuery ¶
func WithSyncQuery() Opt
type SyncRequestMetadata ¶ added in v0.0.16
type SyncRequestMetadata struct { QueryResults map[edn.Keyword]edn.RawMessage `edn:"fixedQueryResults"` Packages []Package `edn:"packages"` // todo remove when no longer used User string `edn:"imgConfigUser"` // The user from the image config blob // todo remove when no longer used SBOM string `edn:"sbom"` ContentType string `edn:"contentType"` Encoding string `edn:"encoding"` }
Click to show internal directories.
Click to hide internal directories.