Documentation
¶
Overview ¶
Package mock provides a mock implementation of the resource.Provider interface for testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFloatingIP ¶
func NewFloatingIP(name, location, networkZone string, ip netip.Addr) resource.FloatingIP
NewFloatingIP creates a new mock floating IP.
func NewFloatingIPv4 ¶
func NewFloatingIPv4(name, location, networkZone string) resource.FloatingIP
NewFloatingIPv4 creates a new mock floating IP with an unspecified IPv4 address.
func NewFloatingIPv6 ¶
func NewFloatingIPv6(name, location, networkZone string) resource.FloatingIP
NewFloatingIPv6 creates a new mock floating IP with an unspecified IPv6 address.
Types ¶
type Provider ¶
type Provider struct { FloatingIPs []resource.FloatingIP Servers []resource.Server PollDelay time.Duration AssignFloatingIPDelay time.Duration PollError error AssignFloatingIPError error }
Provider is a mock provider for testing.
func (*Provider) AssignFloatingIP ¶
func (p *Provider) AssignFloatingIP(_ context.Context, fip resource.FloatingIP, server resource.Server) error
AssignFloatingIP assigns a floating IP to a server.
func (*Provider) Name ¶
func (p *Provider) Name() resource.ProviderName
Name returns the name of the mock provider, "mock".
Click to show internal directories.
Click to hide internal directories.