input

package
v0.1.0 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) Reconcile

func (k *Kubernetes) Reconcile(req reconcile.Request) (reconcile.Result, error)

Reconcile implements the required controller interface

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 {
	Group    string    `json:"group" yaml:"group"`
	Version  string    `json:"version" yaml:"version"`
	Kind     string    `json:"kind" yaml:"kind"`
	Selector *selector `json:"selector,omitempty" yaml:"selector,omitempty"`
}

KubernetesConfig defines runtime configuration for a kubernetes input

func NewKubernetesConfig

func NewKubernetesConfig() *KubernetesConfig

NewKubernetesConfig creates a new KubernetesConfig with default values

func (*KubernetesConfig) GVK

GVK returns a GroupVersionKind value

func (*KubernetesConfig) Predicates

func (c *KubernetesConfig) Predicates() ([]predicate.Predicate, error)

Predicates 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