Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericContext ¶
type GenericContext struct {
*http.Server
// those following components are shared by all generic components
BroadcastAdapter events.EventBroadcasterAdapter
Client *client.GenericClientSet
EmitterPool metricspool.MetricsEmitterPool
// those following informer factories give access to informers for the component.
// actually, for agent, we should be cautious if we decide to start informers (
// to reduce connections with APIServer).
//
// since those variables may be un-initialized in some component, we must be
// very careful when we use them
MetaInformerFactory metadatainformer.SharedInformerFactory
KubeInformerFactory informers.SharedInformerFactory
InternalInformerFactory externalversions.SharedInformerFactory
DynamicInformerFactory dynamicinformer.DynamicSharedInformerFactory
Mapper *dynamicmapper.RegeneratingDiscoveryRESTMapper
// DisabledByDefault is the set of components which is disabled by default
DisabledByDefault sets.String
// contains filtered or unexported fields
}
func GenerateFakeGenericContext ¶
func GenerateFakeGenericContext(objects ...[]runtime.Object) (*GenericContext, error)
func NewGenericContext ¶
func NewGenericContext( clientSet *client.GenericClientSet, labelSelector string, disabledByDefault sets.String, genericConf *generic.GenericConfiguration, component consts.KatalystComponent, ) (*GenericContext, error)
func (*GenericContext) IsEnabled ¶
func (c *GenericContext) IsEnabled(name string, components []string) bool
IsEnabled checks if the context's components enabled or not
func (*GenericContext) Run ¶
func (c *GenericContext) Run(ctx context.Context)
Run starts the generic components
func (*GenericContext) SetDefaultMetricsEmitter ¶
func (c *GenericContext) SetDefaultMetricsEmitter(metricEmitter metrics.MetricEmitter)
SetDefaultMetricsEmitter to set default metrics emitter by custom metric emitter
func (*GenericContext) StartInformer ¶
func (c *GenericContext) StartInformer(ctx context.Context)
StartInformer starts the shared informer factories; informer is reentrant, so it's no need to check if context has been started
type GenericOptions ¶
type GenericOptions func(i interface{})
GenericOptions is used as an extendable way to support
Click to show internal directories.
Click to hide internal directories.