input

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKubernetes

func NewKubernetes(
	conf KubernetesConfig,
	mgr types.Manager,
	log log.Modular,
	stats metrics.Type,
) (input.Type, error)

NewKubernetes creates a new kubernetes input type

Types

type Kubernetes

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

Kubernetes input watches one or more k8s resources

func (*Kubernetes) CloseAsync

func (k *Kubernetes) CloseAsync()

CloseAsync shuts down the input and stops processing requests.

func (*Kubernetes) Connected

func (k *Kubernetes) Connected() bool

Connected returns true if this input is currently connected to its target.

func (*Kubernetes) Reconciler added in v0.2.0

Reconciler returns a reconciler function scoped to the specified GVK

func (*Kubernetes) TransactionChan

func (k *Kubernetes) TransactionChan() <-chan types.Transaction

TransactionChan returns a transactions channel for consuming messages from this input type.

func (*Kubernetes) WaitForClose

func (k *Kubernetes) WaitForClose(timeout time.Duration) error

WaitForClose blocks until the input has closed down.

type KubernetesConfig

type KubernetesConfig struct {
	Watches []Watch `json:"watches,omitempty" yaml:"watches,omitempty"`
}

KubernetesConfig defines runtime configuration for a kubernetes input

func NewKubernetesConfig

func NewKubernetesConfig() *KubernetesConfig

NewKubernetesConfig creates a new KubernetesConfig with default values

type Watch added in v0.2.0

type Watch struct {
	Group      string    `json:"group" yaml:"group"`
	Version    string    `json:"version" yaml:"version"`
	Kind       string    `json:"kind" yaml:"kind"`
	Namespaces []string  `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
	Selector   *selector `json:"selector,omitempty" yaml:"selector,omitempty"`
}

Watch defines a controller configuration

func (*Watch) GVK added in v0.2.0

func (w *Watch) GVK() schema.GroupVersionKind

GVK returns a GroupVersionKind value

func (*Watch) Options added in v0.2.0

func (w *Watch) Options() ([]builder.ForOption, error)

Options returns a list of watch predicates using runtime config

Jump to

Keyboard shortcuts

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