Documentation ¶
Index ¶
- Constants
- type HTTPServiceFake
- func (fake *HTTPServiceFake) AttachIPConfigsHandlerMiddleware(cns.IPConfigsHandlerMiddleware)
- func (fake *HTTPServiceFake) GetAssignedIPConfigs() []cns.IPConfigurationStatus
- func (fake *HTTPServiceFake) GetAvailableIPConfigs() []cns.IPConfigurationStatus
- func (fake *HTTPServiceFake) GetOption(string) interface{}
- func (fake *HTTPServiceFake) GetPendingProgramIPConfigs() []cns.IPConfigurationStatus
- func (fake *HTTPServiceFake) GetPendingReleaseIPConfigs() []cns.IPConfigurationStatus
- func (fake *HTTPServiceFake) GetPodIPConfigState() map[string]cns.IPConfigurationStatus
- func (fake *HTTPServiceFake) Init(*common.ServiceConfig) error
- func (fake *HTTPServiceFake) MarkIPAsPendingRelease(numberToMark int) (map[string]cns.IPConfigurationStatus, error)
- func (fake *HTTPServiceFake) MarkNIPsPendingRelease(n int) (map[string]cns.IPConfigurationStatus, error)
- func (fake *HTTPServiceFake) SendNCSnapShotPeriodically(context.Context, int)
- func (fake *HTTPServiceFake) SetNodeOrchestrator(*cns.SetOrchestratorTypeRequest)
- func (fake *HTTPServiceFake) SetNumberOfAssignedIPs(assign int) error
- func (fake *HTTPServiceFake) SetOption(string, interface{})
- func (fake *HTTPServiceFake) Start(*common.ServiceConfig) error
- func (fake *HTTPServiceFake) Stop()
- func (fake *HTTPServiceFake) SyncHostNCVersion(context.Context, string, time.Duration)
- func (fake *HTTPServiceFake) SyncNodeStatus(string, string, string, json.RawMessage) (types.ResponseCode, string)
- type IPStateManager
- func (ipm *IPStateManager) AddIPConfigs(ipconfigs []cns.IPConfigurationStatus)
- func (ipm *IPStateManager) MarkIPAsPendingRelease(numberOfIPsToMark int) (map[string]cns.IPConfigurationStatus, error)
- func (ipm *IPStateManager) MarkNIPsPendingRelease(n int) (map[string]cns.IPConfigurationStatus, error)
- func (ipm *IPStateManager) ReleaseIPConfig(ipconfigID string) (cns.IPConfigurationStatus, error)
- func (ipm *IPStateManager) RemovePendingReleaseIPConfigs(ipconfigNames []string)
- func (ipm *IPStateManager) ReserveIPConfig() (cns.IPConfigurationStatus, error)
- type MonitorFake
- type NMAgentClientFake
- type RequestControllerFake
- func (rc *RequestControllerFake) CarveIPConfigsAndAddToStatusAndCNS(numberOfIPConfigs int64) []cns.IPConfigurationStatus
- func (rc *RequestControllerFake) Init(context.Context) error
- func (rc *RequestControllerFake) IsStarted() bool
- func (rc *RequestControllerFake) Reconcile(removePendingReleaseIPs bool) error
- func (rc *RequestControllerFake) Start(context.Context) error
- type StringStack
- type WireserverClientFake
- type WireserverProxyFake
- func (w *WireserverProxyFake) JoinNetwork(ctx context.Context, vnetID string) (*http.Response, error)
- func (w *WireserverProxyFake) PublishNC(ctx context.Context, ncParams cns.NetworkContainerParameters, payload []byte) (*http.Response, error)
- func (w *WireserverProxyFake) UnpublishNC(ctx context.Context, ncParams cns.NetworkContainerParameters, payload []byte) (*http.Response, error)
Constants ¶
View Source
const ( // HostPrimaryIP 10.0.0.4 HostPrimaryIP = "10.0.0.4" // HostSubnet 10.0.0.0/24 HostSubnet = "10.0.0.0/24" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServiceFake ¶
type HTTPServiceFake struct { IPStateManager IPStateManager PoolMonitor cns.IPAMPoolMonitor }
func NewHTTPServiceFake ¶
func NewHTTPServiceFake() *HTTPServiceFake
func (*HTTPServiceFake) AttachIPConfigsHandlerMiddleware ¶ added in v1.5.19
func (fake *HTTPServiceFake) AttachIPConfigsHandlerMiddleware(cns.IPConfigsHandlerMiddleware)
func (*HTTPServiceFake) GetAssignedIPConfigs ¶
func (fake *HTTPServiceFake) GetAssignedIPConfigs() []cns.IPConfigurationStatus
func (*HTTPServiceFake) GetAvailableIPConfigs ¶
func (fake *HTTPServiceFake) GetAvailableIPConfigs() []cns.IPConfigurationStatus
func (*HTTPServiceFake) GetOption ¶
func (fake *HTTPServiceFake) GetOption(string) interface{}
func (*HTTPServiceFake) GetPendingProgramIPConfigs ¶
func (fake *HTTPServiceFake) GetPendingProgramIPConfigs() []cns.IPConfigurationStatus
func (*HTTPServiceFake) GetPendingReleaseIPConfigs ¶
func (fake *HTTPServiceFake) GetPendingReleaseIPConfigs() []cns.IPConfigurationStatus
func (*HTTPServiceFake) GetPodIPConfigState ¶
func (fake *HTTPServiceFake) GetPodIPConfigState() map[string]cns.IPConfigurationStatus
Return union of all state maps
func (*HTTPServiceFake) Init ¶
func (fake *HTTPServiceFake) Init(*common.ServiceConfig) error
func (*HTTPServiceFake) MarkIPAsPendingRelease ¶
func (fake *HTTPServiceFake) MarkIPAsPendingRelease(numberToMark int) (map[string]cns.IPConfigurationStatus, error)
TODO: Populate on scale down
func (*HTTPServiceFake) MarkNIPsPendingRelease ¶ added in v1.5.21
func (fake *HTTPServiceFake) MarkNIPsPendingRelease(n int) (map[string]cns.IPConfigurationStatus, error)
func (*HTTPServiceFake) SendNCSnapShotPeriodically ¶
func (fake *HTTPServiceFake) SendNCSnapShotPeriodically(context.Context, int)
func (*HTTPServiceFake) SetNodeOrchestrator ¶
func (fake *HTTPServiceFake) SetNodeOrchestrator(*cns.SetOrchestratorTypeRequest)
func (*HTTPServiceFake) SetNumberOfAssignedIPs ¶
func (fake *HTTPServiceFake) SetNumberOfAssignedIPs(assign int) error
func (*HTTPServiceFake) SetOption ¶
func (fake *HTTPServiceFake) SetOption(string, interface{})
func (*HTTPServiceFake) Start ¶
func (fake *HTTPServiceFake) Start(*common.ServiceConfig) error
func (*HTTPServiceFake) Stop ¶
func (fake *HTTPServiceFake) Stop()
func (*HTTPServiceFake) SyncHostNCVersion ¶
SyncHostNCVersion will update HostVersion in containerstatus.
func (*HTTPServiceFake) SyncNodeStatus ¶
func (fake *HTTPServiceFake) SyncNodeStatus(string, string, string, json.RawMessage) (types.ResponseCode, string)
type IPStateManager ¶
type IPStateManager struct { PendingProgramIPConfigState map[string]cns.IPConfigurationStatus AvailableIPConfigState map[string]cns.IPConfigurationStatus AssignedIPConfigState map[string]cns.IPConfigurationStatus PendingReleaseIPConfigState map[string]cns.IPConfigurationStatus AvailableIPIDStack StringStack sync.RWMutex }
func NewIPStateManager ¶
func NewIPStateManager() IPStateManager
func (*IPStateManager) AddIPConfigs ¶
func (ipm *IPStateManager) AddIPConfigs(ipconfigs []cns.IPConfigurationStatus)
func (*IPStateManager) MarkIPAsPendingRelease ¶
func (ipm *IPStateManager) MarkIPAsPendingRelease(numberOfIPsToMark int) (map[string]cns.IPConfigurationStatus, error)
func (*IPStateManager) MarkNIPsPendingRelease ¶ added in v1.5.21
func (ipm *IPStateManager) MarkNIPsPendingRelease(n int) (map[string]cns.IPConfigurationStatus, error)
func (*IPStateManager) ReleaseIPConfig ¶
func (ipm *IPStateManager) ReleaseIPConfig(ipconfigID string) (cns.IPConfigurationStatus, error)
func (*IPStateManager) RemovePendingReleaseIPConfigs ¶
func (ipm *IPStateManager) RemovePendingReleaseIPConfigs(ipconfigNames []string)
func (*IPStateManager) ReserveIPConfig ¶
func (ipm *IPStateManager) ReserveIPConfig() (cns.IPConfigurationStatus, error)
type MonitorFake ¶
type MonitorFake struct { IPsNotInUseCount int64 NodeNetworkConfig *v1alpha.NodeNetworkConfig }
func (*MonitorFake) GetStateSnapshot ¶
func (f *MonitorFake) GetStateSnapshot() cns.IpamPoolMonitorStateSnapshot
func (*MonitorFake) Reconcile ¶
func (*MonitorFake) Reconcile() error
func (*MonitorFake) Update ¶
func (f *MonitorFake) Update(nnc *v1alpha.NodeNetworkConfig) error
type NMAgentClientFake ¶
type NMAgentClientFake struct { SupportedAPIsF func(context.Context) ([]string, error) GetNCVersionListF func(context.Context) (nmagent.NCVersionList, error) GetHomeAzF func(context.Context) (nmagent.AzResponse, error) }
NMAgentClientFake can be used to query to VM Host info.
func (*NMAgentClientFake) GetHomeAz ¶
func (n *NMAgentClientFake) GetHomeAz(ctx context.Context) (nmagent.AzResponse, error)
func (*NMAgentClientFake) GetNCVersionList ¶
func (n *NMAgentClientFake) GetNCVersionList(ctx context.Context) (nmagent.NCVersionList, error)
func (*NMAgentClientFake) SupportedAPIs ¶
func (n *NMAgentClientFake) SupportedAPIs(ctx context.Context) ([]string, error)
type RequestControllerFake ¶
type RequestControllerFake struct { NNC *v1alpha.NodeNetworkConfig // contains filtered or unexported fields }
func NewRequestControllerFake ¶
func NewRequestControllerFake(cnsService *HTTPServiceFake, scalar v1alpha.Scaler, subnetAddressSpace string, numberOfIPConfigs int64) *RequestControllerFake
func (*RequestControllerFake) CarveIPConfigsAndAddToStatusAndCNS ¶
func (rc *RequestControllerFake) CarveIPConfigsAndAddToStatusAndCNS(numberOfIPConfigs int64) []cns.IPConfigurationStatus
func (*RequestControllerFake) IsStarted ¶
func (rc *RequestControllerFake) IsStarted() bool
func (*RequestControllerFake) Reconcile ¶
func (rc *RequestControllerFake) Reconcile(removePendingReleaseIPs bool) error
type StringStack ¶
func NewStack ¶
func NewStack() *StringStack
func (*StringStack) Pop ¶
func (stack *StringStack) Pop() (string, error)
func (*StringStack) Push ¶
func (stack *StringStack) Push(v string)
type WireserverClientFake ¶
type WireserverClientFake struct{}
func (*WireserverClientFake) GetInterfaces ¶
func (c *WireserverClientFake) GetInterfaces(ctx context.Context) (*wireserver.GetInterfacesResult, error)
type WireserverProxyFake ¶
type WireserverProxyFake struct { JoinNetworkFunc func(context.Context, string) (*http.Response, error) PublishNCFunc func(context.Context, cns.NetworkContainerParameters, []byte) (*http.Response, error) UnpublishNCFunc func(context.Context, cns.NetworkContainerParameters, []byte) (*http.Response, error) }
func (*WireserverProxyFake) JoinNetwork ¶
func (*WireserverProxyFake) PublishNC ¶
func (w *WireserverProxyFake) PublishNC(ctx context.Context, ncParams cns.NetworkContainerParameters, payload []byte) (*http.Response, error)
func (*WireserverProxyFake) UnpublishNC ¶
func (w *WireserverProxyFake) UnpublishNC(ctx context.Context, ncParams cns.NetworkContainerParameters, payload []byte) (*http.Response, error)
Click to show internal directories.
Click to hide internal directories.