informergen

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	// Groups are the groups in this informer factory.
	Groups []parser.Group

	// PackagePath is the package under which these informers will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/informers"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	PackagePath string

	// ClientsetPackagePath is the package under which the cluster-aware client-set will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/clientset/versioned"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	ClientsetPackagePath string

	// SingleClusterClientPackagePath is the root directory under which single-cluster-aware clients exist.
	// e.g. "k8s.io/client-go/kubernetes"
	SingleClusterClientPackagePath string `marker:""`

	// SingleClusterInformerPackagePath is the package under which the cluster-unaware listers are exposed.
	// e.g. "k8s.io/client-go/informers"
	SingleClusterInformerPackagePath string
}

func (*Factory) WriteContent

func (f *Factory) WriteContent(w io.Writer) error

type FactoryInterface

type FactoryInterface struct {
	// ClientsetPackagePath is the package under which the cluster-aware client-set will be exposed.
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	ClientsetPackagePath string

	// SingleClusterClientPackagePath is the root directory under which single-cluster-aware clients exist.
	// e.g. "k8s.io/client-go/kubernetes"
	SingleClusterClientPackagePath string `marker:""`

	// UseUpstreamInterfaces determines if we're generating against existing single-cluster informer interfaces or not.
	UseUpstreamInterfaces bool
}

func (*FactoryInterface) WriteContent

func (f *FactoryInterface) WriteContent(w io.Writer) error

type Generic

type Generic struct {
	// Groups are the groups in this informer factory.
	Groups []types.GroupVersionInfo

	// GroupVersionKinds are all the kinds we need to support,indexed by group and version.
	GroupVersionKinds map[types.Group]map[types.Version][]parser.Kind

	// APIPackagePath is the root directory under which API types exist.
	// e.g. "k8s.io/api"
	APIPackagePath string

	// SingleClusterInformerPackagePath is the package under which the cluster-unaware listers are exposed.
	// e.g. "k8s.io/client-go/informers"
	SingleClusterInformerPackagePath string
}

func (*Generic) WriteContent

func (g *Generic) WriteContent(w io.Writer) error

type GroupInterface

type GroupInterface struct {
	// Group is the group for which we're generating interfaces
	Group parser.Group

	// Versions are the versions of this group for which we're generating interfaces
	Versions []types.Version

	// PackagePath is the package under which these informers will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/informers"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	PackagePath string

	// UseUpstreamInterfaces determines if we're generating against existing single-cluster informer interfaces or not.
	UseUpstreamInterfaces bool
}

func (GroupInterface) WriteContent

func (g GroupInterface) WriteContent(w io.Writer) error

type Informer

type Informer struct {
	// Group is the group in this informer.
	Group types.GroupVersionInfo

	// Kind is the kind in this file.
	Kind parser.Kind

	// APIPackagePath is the root directory under which API types exist.
	// e.g. "k8s.io/api"
	APIPackagePath string

	// PackagePath is the package under which these informers will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/informers"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	PackagePath string

	// ClientsetPackagePath is the package under which the cluster-aware client-set will be exposed.
	// e.g. "github.com/kcp-dev/client-go/kubernetes"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	ClientsetPackagePath string

	// ListerPackagePath is the package under which the cluster-aware listers will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/listers"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	ListerPackagePath string

	// SingleClusterClientPackagePath is the root directory under which single-cluster-aware clients exist.
	// e.g. "k8s.io/client-go/kubernetes"
	SingleClusterClientPackagePath string `marker:""`

	// SingleClusterInformerPackagePath is the package under which the cluster-unaware listers are exposed.
	// e.g. "k8s.io/client-go/informers"
	SingleClusterInformerPackagePath string

	// SingleClusterListerPackagePath is the fully qualified Go package name under which the (pre-existing)
	// listers for single-cluster contexts are defined. Option. e.g. "k8s.io/client-go/listers"
	SingleClusterListerPackagePath string
}

func (*Informer) WriteContent

func (i *Informer) WriteContent(w io.Writer) error

type VersionInterface

type VersionInterface struct {
	// Version is the version of this group that the interface is generated for
	Version types.Version

	// Kinds are the kinds for which this interface exposes informers
	Kinds []parser.Kind

	// PackagePath is the package under which these informers will be exposed.
	// e.g. "github.com/kcp-dev/client-go/clients/informers"
	// TODO(skuznets) we should be able to figure this out from the output dir, ideally
	PackagePath string

	// UseUpstreamInterfaces determines if we're generating against existing single-cluster informer interfaces or not.
	UseUpstreamInterfaces bool
}

func (*VersionInterface) WriteContent

func (v *VersionInterface) WriteContent(w io.Writer) error

Jump to

Keyboard shortcuts

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