Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { CRDClient crd.ClientInt CloudClient cloudprovider.ClientInt PodClient pod.ClientInt EventRecorder record.EventRecorder EventChannel chan aadpodid.EventType NodeClient NodeGetter IsNamespaced bool SyncLoopStarted bool *LeaderElectionConfig // contains filtered or unexported fields }
Client has the required pointers to talk to the api server and interact with the CRD related datastructure.
func NewMICClient ¶
func NewMICClient(cloudconfig string, config *rest.Config, isNamespaced bool, syncRetryInterval time.Duration, leaderElectionConfig *LeaderElectionConfig) (*Client, error)
NewMICClient returnes new mic client
func (*Client) NewLeaderElector ¶
func (c *Client) NewLeaderElector(clientSet *kubernetes.Clientset, recorder record.EventRecorder, leaderElectionConfig *LeaderElectionConfig) (leaderElector *leaderelection.LeaderElector, err error)
NewLeaderElector - does the required leader election initialization
type ClientInt ¶
type ClientInt interface { Start(exit <-chan struct{}) Sync(exit <-chan struct{}) }
ClientInt ...
type LeaderElectionConfig ¶
type LeaderElectionConfig struct { Namespace string Name string Duration time.Duration Instance string }
LeaderElectionConfig - used to keep track of leader election config.
type Log ¶
type Log struct { }
Log - this struct abstracts the logging libraries into single interface.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient handles fetching node details from kubernetes
func (*NodeClient) Get ¶
func (c *NodeClient) Get(name string) (*corev1.Node, error)
Get gets the specified kubernetes node.
Note that this is using a local, eventually consistent cache which may not be up to date with the actual state of the cluster.
func (*NodeClient) Start ¶
func (c *NodeClient) Start(exit <-chan struct{})
Start starts syncing the underlying cache with kubernetes.
The passed in channel should be used to signal that the client should stop syncing. Close this channel when you want syncing to stop.