Documentation ¶
Overview ¶
Copyright 2018 BlackRock, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SensorContext ¶ added in v0.13.0
type SensorContext struct {
// contains filtered or unexported fields
}
SensorContext contains execution context for Sensor
func NewSensorContext ¶ added in v0.13.0
func NewSensorContext(kubeClient kubernetes.Interface, dynamicClient dynamic.Interface, sensor *v1alpha1.Sensor, eventBusConfig *eventbusv1alpha1.BusConfig, eventBusSubject, hostname string, metrics *sensormetrics.Metrics) *SensorContext
NewSensorContext returns a new sensor execution context.
func (*SensorContext) GetTrigger ¶ added in v0.13.0
GetTrigger returns a trigger
type Trigger ¶ added in v0.13.0
type Trigger interface { GetTriggerType() apicommon.TriggerType // FetchResource fetches the trigger resource from external source FetchResource(context.Context) (interface{}, error) // ApplyResourceParameters applies parameters to the trigger resource ApplyResourceParameters(events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error) // Execute executes the trigger Execute(ctx context.Context, events map[string]*v1alpha1.Event, resource interface{}) (interface{}, error) // ApplyPolicy applies the policy on the trigger ApplyPolicy(ctx context.Context, resource interface{}) error }
Trigger interface