mtping

package
v0.17.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EnvNoShutdownAfter = "K_NO_SHUTDOWN_AFTER"
)

Variables

This section is empty.

Functions

func GetNoShutDownAfterValue added in v0.17.0

func GetNoShutDownAfterValue() int

func NewAdapter added in v0.16.0

func NewAdapter(ctx context.Context, _ adapter.EnvConfigAccessor, ceClient cloudevents.Client) adapter.Adapter

func NewController

func NewController(ctx context.Context, cronRunner *cronJobsRunner) *controller.Impl

NewController initializes the controller and is called by the generated code. Registers event handlers to enqueue events.

func NewCronJobsRunner

func NewCronJobsRunner(ceClient cloudevents.Client, kubeClient kubernetes.Interface, logger *zap.SugaredLogger, opts ...cron.Option) *cronJobsRunner

func NewDelayingContext added in v0.17.0

func NewDelayingContext(ctx context.Context, afterSecond int) context.Context

NewDelayingContext returns a new context delaying the cancellation of the given context.

func NewEnvConfig added in v0.16.0

func NewEnvConfig() adapter.EnvConfigAccessor

func Project added in v0.17.0

func Project(i interface{}) interface{}

Project creates a PingConfig for the given source

Types

type Message

type Message struct {
	Body string `json:"body"`
}

type PingConfig added in v0.17.0

type PingConfig struct {
	corev1.ObjectReference `json:",inline"`

	// Schedule is the cronjob schedule. Defaults to `* * * * *`.
	Schedule string `json:"schedule"`

	// JsonData is json encoded data used as the body of the event posted to
	// the sink. Default is empty. If set, datacontenttype will also be set
	// to "application/json".
	// +optional
	JsonData string `json:"jsonData,omitempty"`

	// Extensions specify what attribute are added or overridden on the
	// outbound event. Each `Extensions` key-value pair are set on the event as
	// an attribute extension independently.
	// +optional
	Extensions map[string]string `json:"extensions,omitempty"`

	// SinkURI is the current active sink URI that has been configured for the
	// Source.
	SinkURI string `json:"sinkUri,omitempty"`
}

type PingConfigs added in v0.17.0

type PingConfigs map[string]PingConfig

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler reconciles PingSources

func (*Reconciler) FinalizeKind

func (r *Reconciler) FinalizeKind(ctx context.Context, source *v1alpha2.PingSource) pkgreconciler.Event

func (*Reconciler) ReconcileKind

func (r *Reconciler) ReconcileKind(ctx context.Context, source *v1alpha2.PingSource) pkgreconciler.Event

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL