crdexample

package
v0.0.0-...-0bdd209 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package crdexample defines flavor used for the netmesh agent.

Index

Constants

View Source
const (
	// MicroserviceLabel is the microservice label used by netmesh.
	MicroserviceLabel = "crdexample"

	// KubeConfigAdmin is the default location of kubeconfig with admin credentials.
	KubeConfigAdmin = "/etc/kubernetes/admin.conf"

	// KubeConfigUsage explains the purpose of 'kube-config' flag.
	KubeConfigUsage = "Path to the kubeconfig file to use for the client connection to K8s cluster"
)

Variables

This section is empty.

Functions

func NewAgent

func NewAgent(opts ...core.Option) *core.Agent

NewAgent returns a new instance of the Agent with plugins. It is an alias for core.NewAgent() to implicit use of the FlavorExampleCrd

func WithPlugins

func WithPlugins(listPlugins func(local *FlavorCrdExample) []*core.NamedPlugin) core.WithPluginsOpt

WithPlugins for adding custom plugins to your Agent <listPlugins> is a callback that uses flavor input to inject dependencies for custom plugins that are in output

Types

type FlavorCrdExample

type FlavorCrdExample struct {
	// Local flavor is used to access the Infra (logger, service label, status check)
	*local.FlavorLocal
	// RPC flavor for REST-based management.
	*rpc.FlavorRPC
	// Kubernetes State Reflector plugin works as a reflector for policies, pods
	// and namespaces.
	CRD exampleplugincrd.Plugin
	// contains filtered or unexported fields
}

FlavorCrdExample glues together multiple plugins to watch selected k8s resources and causes all changes to be reflected in a given store.

func (*FlavorCrdExample) Inject

func (f *FlavorCrdExample) Inject() (allReadyInjected bool)

Inject sets inter-plugin references.

func (*FlavorCrdExample) Plugins

func (f *FlavorCrdExample) Plugins() []*core.NamedPlugin

Plugins combines all plugins in the flavor into a slice.

Jump to

Keyboard shortcuts

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