azuresqlfailovergroup

package
v0.0.0-...-f3301ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoesResourceMatchAzure

func DoesResourceMatchAzure(expected sql.FailoverGroup, actual sql.FailoverGroup) bool

Types

type AzureSqlFailoverGroupManager

type AzureSqlFailoverGroupManager struct {
	Creds        config.Credentials
	SecretClient secrets.SecretClient
	Scheme       *runtime.Scheme
}

func NewAzureSqlFailoverGroupManager

func NewAzureSqlFailoverGroupManager(creds config.Credentials, secretClient secrets.SecretClient, scheme *runtime.Scheme) *AzureSqlFailoverGroupManager

func (*AzureSqlFailoverGroupManager) CreateOrUpdateFailoverGroup

func (m *AzureSqlFailoverGroupManager) CreateOrUpdateFailoverGroup(
	ctx context.Context,
	subscriptionID string,
	resourceGroup string,
	server string,
	failoverGroupName string,
	failoverGroupProperties sql.FailoverGroup) (sql.FailoverGroupsCreateOrUpdateFuture, error)

CreateOrUpdateFailoverGroup creates a failover group

func (*AzureSqlFailoverGroupManager) Delete

Delete drops a sqlfailovergroup

func (*AzureSqlFailoverGroupManager) DeleteFailoverGroup

func (m *AzureSqlFailoverGroupManager) DeleteFailoverGroup(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	failoverGroupName string,
) (result autorest.Response, err error)

DeleteFailoverGroup deletes a failover group

func (*AzureSqlFailoverGroupManager) Ensure

Ensure creates a sqlfailovergroup

func (*AzureSqlFailoverGroupManager) GetDB

func (m *AzureSqlFailoverGroupManager) GetDB(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	databaseName string,
) (sql.Database, error)

GetDB retrieves a database

func (*AzureSqlFailoverGroupManager) GetFailoverGroup

func (m *AzureSqlFailoverGroupManager) GetFailoverGroup(
	ctx context.Context,
	subscriptionID string,
	resourceGroupName string,
	serverName string,
	failovergroupname string,
) (sql.FailoverGroup, error)

TODO: Delete this? GetFailoverGroup retrieves a failover group

func (*AzureSqlFailoverGroupManager) GetParents

GetParents returns the parents of sqlfailovergroup

func (*AzureSqlFailoverGroupManager) GetServer

func (m *AzureSqlFailoverGroupManager) GetServer(ctx context.Context, subscriptionID string, resourceGroupName string, serverName string) (result sql.Server, err error)

GetServer returns a SQL server

func (*AzureSqlFailoverGroupManager) GetStatus

GetStatus gets the ASOStatus

func (*AzureSqlFailoverGroupManager) NewSecret

func (*AzureSqlFailoverGroupManager) TransformToSQLFailoverGroup

func (m *AzureSqlFailoverGroupManager) TransformToSQLFailoverGroup(ctx context.Context, instance *v1beta1.AzureSqlFailoverGroup) (sql.FailoverGroup, error)

TransformToSQLFailoverGroup translates the Kubernetes shaped v1beta1.AzureSqlFailoverGroup into the Azure SDK sql.FailoverGroup. This function makes a number of remote calls and so should be called sparingly.

type SqlFailoverGroupManager

type SqlFailoverGroupManager interface {
	CreateOrUpdateFailoverGroup(
		ctx context.Context,
		resourceGroup string,
		server string,
		failoverGroupName string,
		failoverGroupProperties sql.FailoverGroup) (sql.FailoverGroupsCreateOrUpdateFuture, error)
	DeleteFailoverGroup(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result autorest.Response, err error)
	GetFailoverGroup(ctx context.Context, resourceGroupName string, serverName string, failovergroupname string) (sql.FailoverGroup, error)
	GetServer(ctx context.Context, resourceGroupName string, serverName string) (result sql.Server, err error)
	GetDB(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (sql.Database, error)
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL