Documentation ¶
Overview ¶
Package agent is the package that contains those implementations to obtain metadata in the specific node, any other component wants to get those data should import this package rather than get directly.
Index ¶
- type MetaAgent
- func (a *MetaAgent) GetUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, namespace, name string) (*unstructured.Unstructured, error)
- func (a *MetaAgent) Run(ctx context.Context)
- func (a *MetaAgent) SetCNCFetcher(c cnc.CNCFetcher)
- func (a *MetaAgent) SetCNRFetcher(c cnr.CNRFetcher)
- func (a *MetaAgent) SetKubeletConfigFetcher(k kubeletconfig.KubeletConfigFetcher)
- func (a *MetaAgent) SetMetricFetcher(m metric.MetricsFetcher)
- func (a *MetaAgent) SetNodeFetcher(n node.NodeFetcher)
- func (a *MetaAgent) SetObjectFetcher(gvr metav1.GroupVersionResource, f ObjectFetcher)
- func (a *MetaAgent) SetPodFetcher(p pod.PodFetcher)
- type ObjectFetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetaAgent ¶
type MetaAgent struct { sync.Mutex // those fetchers provide a dynamic way to collect meta info; // actually, those fetchers call be set by self-defined implementations pod.PodFetcher node.NodeFetcher metric.MetricsFetcher cnr.CNRFetcher cnc.CNCFetcher kubeletconfig.KubeletConfigFetcher // ObjectFetchers provide a way to expand fetcher for objects ObjectFetchers sync.Map // machine info is fetched from once and stored in meta-server *machine.KatalystMachineInfo Conf *config.Configuration // contains filtered or unexported fields }
MetaAgent contains all those implementations for metadata running in this agent.
func NewMetaAgent ¶
func NewMetaAgent(conf *config.Configuration, clientSet *client.GenericClientSet, emitter metrics.MetricEmitter) (*MetaAgent, error)
NewMetaAgent returns the instance of MetaAgent.
func (*MetaAgent) GetUnstructured ¶ added in v0.3.0
func (a *MetaAgent) GetUnstructured(ctx context.Context, gvr metav1.GroupVersionResource, namespace, name string) (*unstructured.Unstructured, error)
func (*MetaAgent) SetCNCFetcher ¶ added in v0.3.0
func (a *MetaAgent) SetCNCFetcher(c cnc.CNCFetcher)
func (*MetaAgent) SetCNRFetcher ¶
func (a *MetaAgent) SetCNRFetcher(c cnr.CNRFetcher)
func (*MetaAgent) SetKubeletConfigFetcher ¶ added in v0.3.0
func (a *MetaAgent) SetKubeletConfigFetcher(k kubeletconfig.KubeletConfigFetcher)
func (*MetaAgent) SetMetricFetcher ¶
func (a *MetaAgent) SetMetricFetcher(m metric.MetricsFetcher)
func (*MetaAgent) SetNodeFetcher ¶
func (a *MetaAgent) SetNodeFetcher(n node.NodeFetcher)
func (*MetaAgent) SetObjectFetcher ¶ added in v0.3.0
func (a *MetaAgent) SetObjectFetcher(gvr metav1.GroupVersionResource, f ObjectFetcher)
func (*MetaAgent) SetPodFetcher ¶
func (a *MetaAgent) SetPodFetcher(p pod.PodFetcher)
type ObjectFetcher ¶ added in v0.3.0
type ObjectFetcher interface { // GetUnstructured returns those latest cUnstructured GetUnstructured(ctx context.Context, namespace, name string) (*unstructured.Unstructured, error) }
ObjectFetcher is used to get object information.
Click to show internal directories.
Click to hide internal directories.