Documentation
¶
Index ¶
- Constants
- func GetFirstTerminationMessage(pod *corev1.Pod) string
- func IsJobComplete(job *batchv1.Job) bool
- func IsJobFailed(job *batchv1.Job) bool
- func MakeJob(feed *v1alpha1.Feed, spec *v1alpha1.EventSourceSpec, op FeedOperation, ...) (*batchv1.Job, error)
- func RunEventSource(es EventSource)
- type ContainerEventSource
- type EventSource
- type EventTrigger
- type FeedContext
- type FeedOperation
Constants ¶
View Source
const ( // START specifies a Feed should be started StartFeed FeedOperation = "START" // STOP specifies a Feed should be stopped StopFeed FeedOperation = "STOP" // FeedOperationKey is the Env variable that gets set to requested FeedOperationKey FeedOperationKey string = "FEED_OPERATION" // FeedTriggerKey is the Env variable that gets set to serialized trigger configuration FeedTriggerKey string = "FEED_TRIGGER" // FeedTargetKey is the Env variable that gets set to target of the feed FeedTargetKey string = "FEED_TARGET" // FeedContextKey is the Env variable that gets set to serialized FeedContext if stopping FeedContextKey string = "FEED_CONTEXT" // EventSourceParametersKey is the Env variable that gets set to serialized EventSourceSpec EventSourceParametersKey string = "EVENT_SOURCE_PARAMETERS" // FeedNamespaceKey is the Env variable that gets set to namespace of the container performing // the Feed lifecycle operation (aka, namespace of the feed). Uses downward api FeedNamespaceKey string = "FEED_NAMESPACE" // FeedServiceAccount is the Env variable that gets set to serviceaccount of the // container performing the Feed operation. Uses downward api FeedServiceAccountKey string = "FEED_SERVICE_ACCOUNT" )
View Source
const ( // EventTriggerKey is the Env variable that gets set to EventTrigger EventTriggerKey string = "EVENT_TRIGGER" )
Variables ¶
This section is empty.
Functions ¶
func IsJobComplete ¶
func IsJobFailed ¶
func MakeJob ¶
func MakeJob(feed *v1alpha1.Feed, spec *v1alpha1.EventSourceSpec, op FeedOperation, trigger EventTrigger, route string, feedContext FeedContext) (*batchv1.Job, error)
MakeJob creates a Job to complete a start or stop operation for a Feed.
func RunEventSource ¶
func RunEventSource(es EventSource)
Types ¶
type ContainerEventSource ¶
type ContainerEventSource struct {
// Namespace to run the container in
Namespace string
// ServiceAccount to run as
ServiceAccountName string
// Feed for this operation
Feed *v1alpha1.Feed
// EventSourceSpec for the actual underlying source
EventSourceSpec *v1alpha1.EventSourceSpec
// contains filtered or unexported fields
}
func (*ContainerEventSource) StartFeed ¶
func (t *ContainerEventSource) StartFeed(trigger EventTrigger, route string) (*FeedContext, error)
func (*ContainerEventSource) StopFeed ¶
func (t *ContainerEventSource) StopFeed(trigger EventTrigger, feedContext FeedContext) error
type EventSource ¶
type EventSource interface {
StartFeed(trigger EventTrigger, route string) (*FeedContext, error)
StopFeed(trigger EventTrigger, feedContext FeedContext) error
}
func NewContainerEventSource ¶
func NewContainerEventSource(feed *v1alpha1.Feed, kubeclientset kubernetes.Interface, spec *v1alpha1.EventSourceSpec) EventSource
type EventTrigger ¶
type EventTrigger struct {
// EventType is the type of event to be observed
EventType string `json:"eventType"`
// Resource is the resource(s) from which to observe events.
Resource string `json:"resource"`
// Service is the hostname of the service that should be observed.
Service string `json:"service"`
// Parameters is an opaque map of configuration needed by the EventSource.
Parameters map[string]interface{} `json:"params"`
}
EventTrigger is a version of v1alpha1.EventTrigger where parameters have been resolved.
type FeedContext ¶
type FeedContext struct {
Context map[string]interface{}
}
type FeedOperation ¶
type FeedOperation string
FeedOperation specifies whether we're starting or stopping
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
receive_adapter
command
|
|
|
feedlet
command
|
|
|
receive_adapter
command
|
|
|
receive_adapter
command
|
Click to show internal directories.
Click to hide internal directories.