Documentation
¶
Index ¶
- Variables
- func NewProductPrice(instanceType string, price float64) client.Item
- type AgentPoolsAPI
- func (a AgentPoolsAPI) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse], ...)
- func (a AgentPoolsAPI) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, ...) (*runtime.Poller[armcontainerservice.AgentPoolsClientDeleteResponse], error)
- func (a AgentPoolsAPI) Get(ctx context.Context, resourceGroupName string, resourceName string, ...) (armcontainerservice.AgentPoolsClientGetResponse, error)
- type AtomicError
- type AtomicErrorOption
- type AtomicPtr
- type AtomicPtrStack
- type MockHandler
- type MockedFunction
- type MockedLRO
- type PricingAPI
- type PricingBehavior
- type ResourceSKUsAPI
Constants ¶
This section is empty.
Variables ¶
var ResourceSkus = []compute.ResourceSku{ { Name: lo.ToPtr("Standard_D2s_v3"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("D2s_v3"), Family: lo.ToPtr("standardDSv3Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("16384")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1,V2")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("4")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("ACUs"), Value: lo.ToPtr("160")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("4000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("33554432")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("33554432")}, {Name: lo.ToPtr("CachedDiskBytes"), Value: lo.ToPtr("53687091200")}, {Name: lo.ToPtr("UncachedDiskIOPS"), Value: lo.ToPtr("3200")}, {Name: lo.ToPtr("UncachedDiskBytesPerSecond"), Value: lo.ToPtr("50331648")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "2", "1", }, }, }, }, { Name: lo.ToPtr("Standard_D2_v2"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("D2_v2"), Family: lo.ToPtr("standardDv2Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("102400")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("7")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS,PaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("ACUs"), Value: lo.ToPtr("210")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("1")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("6000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("97517568")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("48234496")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "2", "1", }, }, }, }, { Name: lo.ToPtr("Standard_D2_v3"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("D2_v3"), Family: lo.ToPtr("standardDv3Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("51200")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("4")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS,PaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("ACUs"), Value: lo.ToPtr("160")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("3000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("48234496")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("24117248")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "2", "1", }, }, }, }, { Name: lo.ToPtr("Standard_D2_v5"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("D2_v5"), Family: lo.ToPtr("standardDv5Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("0")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1,V2")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("4")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("19000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("131072000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("131072000")}, {Name: lo.ToPtr("UncachedDiskIOPS"), Value: lo.ToPtr("3750")}, {Name: lo.ToPtr("UncachedDiskBytesPerSecond"), Value: lo.ToPtr("89128960")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "1", "2", }, }, }, }, { Name: lo.ToPtr("Standard_DS2_v2"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("DS2_v2"), Family: lo.ToPtr("standardDSv2Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("14336")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1,V2")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("7")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("ACUs"), Value: lo.ToPtr("210")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("1")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("8000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("65536000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("65536000")}, {Name: lo.ToPtr("CachedDiskBytes"), Value: lo.ToPtr("92341796864")}, {Name: lo.ToPtr("UncachedDiskIOPS"), Value: lo.ToPtr("6400")}, {Name: lo.ToPtr("UncachedDiskBytesPerSecond"), Value: lo.ToPtr("96000000")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "2", "1", }, }, }, }, { Name: lo.ToPtr("Standard_F16s_v2"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("F16s_v2"), Family: lo.ToPtr("standardFSv2Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("131072")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("16")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V1,V2")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("32")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("32")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("16")}, {Name: lo.ToPtr("ACUs"), Value: lo.ToPtr("195")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("2")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("32000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("262144000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("262144000")}, {Name: lo.ToPtr("CachedDiskBytes"), Value: lo.ToPtr("274877906944")}, {Name: lo.ToPtr("UncachedDiskIOPS"), Value: lo.ToPtr("25600")}, {Name: lo.ToPtr("UncachedDiskBytesPerSecond"), Value: lo.ToPtr("384000000")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("4")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", "1", "2", }, }, }, }, { Name: lo.ToPtr("Standard_NC24ads_A100_v4"), Tier: lo.ToPtr("Standard"), Kind: lo.ToPtr(""), Size: lo.ToPtr("NC24ads_A100_v4"), Family: lo.ToPtr("StandardNCADSA100v4Family"), ResourceType: lo.ToPtr("virtualMachines"), APIVersions: &[]string{}, Costs: &[]compute.ResourceSkuCosts{}, Restrictions: &[]compute.ResourceSkuRestrictions{}, Capabilities: &[]compute.ResourceSkuCapabilities{ {Name: lo.ToPtr("MaxResourceVolumeMB"), Value: lo.ToPtr("65536")}, {Name: lo.ToPtr("OSVhdSizeMB"), Value: lo.ToPtr("1047552")}, {Name: lo.ToPtr("vCPUs"), Value: lo.ToPtr("24")}, {Name: lo.ToPtr("MemoryPreservingMaintenanceSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("HyperVGenerations"), Value: lo.ToPtr("V2")}, {Name: lo.ToPtr("MemoryGB"), Value: lo.ToPtr("220")}, {Name: lo.ToPtr("MaxDataDiskCount"), Value: lo.ToPtr("8")}, {Name: lo.ToPtr("CpuArchitectureType"), Value: lo.ToPtr("x64")}, {Name: lo.ToPtr("LowPriorityCapable"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("PremiumIO"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("VMDeploymentTypes"), Value: lo.ToPtr("IaaS")}, {Name: lo.ToPtr("vCPUsAvailable"), Value: lo.ToPtr("24")}, {Name: lo.ToPtr("GPUs"), Value: lo.ToPtr("1")}, {Name: lo.ToPtr("vCPUsPerCore"), Value: lo.ToPtr("1")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedIOPS"), Value: lo.ToPtr("75000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedReadBytesPerSecond"), Value: lo.ToPtr("1000000000")}, {Name: lo.ToPtr("CombinedTempDiskAndCachedWriteBytesPerSecond"), Value: lo.ToPtr("1000000000")}, {Name: lo.ToPtr("CachedDiskBytes"), Value: lo.ToPtr("274877906944")}, {Name: lo.ToPtr("UncachedDiskIOPS"), Value: lo.ToPtr("25600")}, {Name: lo.ToPtr("UncachedDiskBytesPerSecond"), Value: lo.ToPtr("384000000")}, {Name: lo.ToPtr("NvmeDiskSizeInMiB"), Value: lo.ToPtr("915456")}, {Name: lo.ToPtr("EphemeralOSDiskSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("EncryptionAtHostSupported"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("CapacityReservationSupported"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("AcceleratedNetworkingEnabled"), Value: lo.ToPtr("True")}, {Name: lo.ToPtr("RdmaEnabled"), Value: lo.ToPtr("False")}, {Name: lo.ToPtr("MaxNetworkInterfaces"), Value: lo.ToPtr("2")}, }, Locations: &[]string{""}, LocationInfo: &[]compute.ResourceSkuLocationInfo{{Location: lo.ToPtr(""), Zones: &[]string{ "3", }, }, }, }, }
ResourceSkus is a list of all available skus from azure
Functions ¶
Types ¶
type AgentPoolsAPI ¶
type AgentPoolsAPI struct {
}
func (AgentPoolsAPI) BeginCreateOrUpdate ¶
func (a AgentPoolsAPI) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters armcontainerservice.AgentPool, options *armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse], error)
func (AgentPoolsAPI) BeginDelete ¶
func (a AgentPoolsAPI) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientBeginDeleteOptions) (*runtime.Poller[armcontainerservice.AgentPoolsClientDeleteResponse], error)
func (AgentPoolsAPI) Get ¶
func (a AgentPoolsAPI) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientGetOptions) (armcontainerservice.AgentPoolsClientGetResponse, error)
type AtomicError ¶
type AtomicError struct {
// contains filtered or unexported fields
}
func (*AtomicError) Get ¶
func (e *AtomicError) Get() error
Get is equivalent to the error being called, so we increase number of calls in this function
func (*AtomicError) IsNil ¶
func (e *AtomicError) IsNil() bool
func (*AtomicError) Reset ¶
func (e *AtomicError) Reset()
func (*AtomicError) Set ¶
func (e *AtomicError) Set(err error, opts ...AtomicErrorOption)
type AtomicErrorOption ¶
type AtomicErrorOption func(atomicError *AtomicError)
func MaxCalls ¶
func MaxCalls(maxCalls int) AtomicErrorOption
type AtomicPtr ¶
type AtomicPtr[T any] struct { // contains filtered or unexported fields }
AtomicPtr is intended for use in mocks to easily expose variables for use in testing. It makes setting and retrieving the values race free by wrapping the pointer itself in a mutex. There is no Get() method, but instead a Clone() method deep copies the object being stored by serializing/de-serializing it from JSON. This pattern shouldn't be followed anywhere else but is an easy way to eliminate races in our tests. nolint: structcheck
type AtomicPtrStack ¶
type AtomicPtrStack[T any] struct { // contains filtered or unexported fields }
AtomicPtrStack exposes a slice of a pointer type in a race-free manner. The interface is just enough to replace the set.Set usage in our previous tests. nolint: structcheck
func (*AtomicPtrStack[T]) Add ¶
func (a *AtomicPtrStack[T]) Add(input *T)
func (*AtomicPtrStack[T]) Len ¶
func (a *AtomicPtrStack[T]) Len() int
func (*AtomicPtrStack[T]) Pop ¶
func (a *AtomicPtrStack[T]) Pop() *T
func (*AtomicPtrStack[T]) Reset ¶
func (a *AtomicPtrStack[T]) Reset()
type MockHandler ¶
type MockHandler[T any] struct { // contains filtered or unexported fields }
MockHandler returns a pre-defined result or error. nolint: structcheck
func (MockHandler[T]) Done ¶
func (h MockHandler[T]) Done() bool
Done returns true if the LRO has reached a terminal state. TrivialHanlder is always done.
type MockedFunction ¶
type MockedFunction[I any, O any] struct { Output AtomicPtr[O] // Output to return on call to this function CalledWithInput AtomicPtrStack[I] // Stack used to keep track of passed input to this function Error AtomicError // Error to return a certain number of times defined by custom error options // contains filtered or unexported fields }
func (*MockedFunction[I, O]) Calls ¶
func (m *MockedFunction[I, O]) Calls() int
func (*MockedFunction[I, O]) FailedCalls ¶
func (m *MockedFunction[I, O]) FailedCalls() int
func (*MockedFunction[I, O]) Invoke ¶
func (m *MockedFunction[I, O]) Invoke(input *I, defaultTransformer func(*I) (O, error)) (O, error)
func (*MockedFunction[I, O]) Reset ¶
func (m *MockedFunction[I, O]) Reset()
Reset must be called between tests otherwise tests will pollute each other.
func (*MockedFunction[I, O]) SuccessfulCalls ¶
func (m *MockedFunction[I, O]) SuccessfulCalls() int
type MockedLRO ¶
type MockedLRO[I any, O any] struct { MockedFunction[I, O] BeginError AtomicError // Error to return a certain number of times defined by custom error options (for Begin) }
func (*MockedLRO[I, O]) FailedCalls ¶
func (*MockedLRO[I, O]) Reset ¶
func (m *MockedLRO[I, O]) Reset()
Reset must be called between tests otherwise tests will pollute each other.
func (*MockedLRO[I, O]) SuccessfulCalls ¶
type PricingAPI ¶
type PricingAPI struct {
client.PricingAPI
PricingBehavior
}
func (*PricingAPI) GetProductsPricePages ¶
func (p *PricingAPI) GetProductsPricePages(_ context.Context, _ []*client.Filter, fn func(output *client.ProductsPricePage)) error
func (*PricingAPI) Reset ¶
func (p *PricingAPI) Reset()
type PricingBehavior ¶
type PricingBehavior struct {
NextError AtomicError
ProductsPricePage AtomicPtr[client.ProductsPricePage]
}
type ResourceSKUsAPI ¶
type ResourceSKUsAPI struct {
}
func (*ResourceSKUsAPI) ListComplete ¶
func (s *ResourceSKUsAPI) ListComplete(_ context.Context, _, _ string) (compute.ResourceSkusResultIterator, error)
func (*ResourceSKUsAPI) Reset ¶
func (s *ResourceSKUsAPI) Reset()
Reset must be called between tests otherwise tests will pollute each other.