dbsaga

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UndoWaitForSharedPool

func UndoWaitForSharedPool(ctx context.Context, in WaitForSharedPoolIn, out WaitForSharedPoolOut) error

Types

type AddonConfig

type AddonConfig struct {
	AddonName        string
	SharedServerName string
	Port             int64
	ReadyTimeout     time.Duration
}

AddonConfig holds database-agnostic configuration that shared saga actions use instead of referencing provider-specific package constants. Inject via saga.Using() and retrieve with saga.Get[*AddonConfig](ctx).

type BaseProvider

type BaseProvider struct {
	Fw  *addon.ProviderFramework
	Log *slog.Logger
}

BaseProvider holds fields and methods common to all on-cluster database addon providers. Embed it in provider structs to avoid duplicating LocalityMode and AdjustEnvVars.

func (*BaseProvider) AdjustEnvVars

func (p *BaseProvider) AdjustEnvVars(_ context.Context, result *addon.ProvisionResult, _ addon.AddonAssociation, _ []string) ([]addon.Variable, error)

func (*BaseProvider) LocalityMode

func (p *BaseProvider) LocalityMode() addon.LocalityMode

type CreateDedicatedServiceIn

type CreateDedicatedServiceIn struct {
	ServiceName string
	AppName     string
	ServerName  string
}

type CreateDedicatedServiceOut

type CreateDedicatedServiceOut struct {
	ServiceID entity.Id
}

type CreateSharedServiceIn

type CreateSharedServiceIn struct{}

type CreateSharedServiceOut

type CreateSharedServiceOut struct {
	ServiceID entity.Id
}

type DecrementAssociationCountIn

type DecrementAssociationCountIn struct {
	SharedServerRef entity.Id
	DatabaseDropped bool
	UserDropped     bool
}

type DecrementAssociationCountOut

type DecrementAssociationCountOut struct {
	RemainingCount int64
}

type DeleteDedicatedPoolIn

type DeleteDedicatedPoolIn struct {
	DedicatedPoolID entity.Id `saga:"dedicatedpoolid"`
}

type DeleteDedicatedPoolOut

type DeleteDedicatedPoolOut struct {
	PoolDeleted bool `saga:"dedicated_pool_deleted"`
}

type DeleteDedicatedServiceIn

type DeleteDedicatedServiceIn struct {
	DedicatedServiceID entity.Id `saga:"dedicatedserviceid"`
}

type DeleteDedicatedServiceOut

type DeleteDedicatedServiceOut struct {
	ServiceDeleted bool `saga:"dedicated_service_deleted"`
}

type IncrementAssociationCountIn

type IncrementAssociationCountIn struct {
	ServerID entity.Id
}

type IncrementAssociationCountOut

type IncrementAssociationCountOut struct {
	Incremented bool
}

type ServerCounter

type ServerCounter interface {
	GetAssociationCount(ctx context.Context, serverID entity.Id) (count int64, revision int64, err error)
	PatchAssociationCount(ctx context.Context, serverID entity.Id, revision int64, newCount int64) error
}

ServerCounter abstracts reading and patching the association count on a database server entity. Each provider implements this for its own entity type. Inject via saga.UsingAs[ServerCounter] and retrieve with saga.Get[ServerCounter](ctx).

type WaitForDedicatedPoolIn

type WaitForDedicatedPoolIn struct {
	PoolID entity.Id
}

type WaitForDedicatedPoolOut

type WaitForDedicatedPoolOut struct {
	Ready bool
}

type WaitForDedicatedServiceIn

type WaitForDedicatedServiceIn struct {
	ServiceID entity.Id
}

type WaitForDedicatedServiceOut

type WaitForDedicatedServiceOut struct {
	ServiceHost string
}

type WaitForSharedPoolIn

type WaitForSharedPoolIn struct {
	PoolID entity.Id
}

type WaitForSharedPoolOut

type WaitForSharedPoolOut struct {
	PoolReady bool
}

type WaitForSharedServiceIn

type WaitForSharedServiceIn struct {
	ServiceID entity.Id
}

type WaitForSharedServiceOut

type WaitForSharedServiceOut struct {
	ServiceHost string
}

Jump to

Keyboard shortcuts

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